Skip to content

Commit e811ecb

Browse files
authored
Merge pull request #75 from SWIFTSIM/centrals-mask
Added mask for centrals and satellites to the catalogue.
2 parents e370182 + d35c7c4 commit e811ecb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

velociraptor/catalogue/catalogue.py

+14
Original file line numberDiff line numberDiff line change
@@ -412,3 +412,17 @@ def register_derived_quantities(self, registration_file_path: str) -> None:
412412
self.derived_quantities = DerivedQuantities(registration_file_path, self)
413413

414414
return
415+
416+
@property
417+
def centrals(self):
418+
if hasattr(self.structure_type, "structuretype"):
419+
return self.structure_type.structuretype == 10
420+
else:
421+
return np.s_[:]
422+
423+
@property
424+
def satellites(self):
425+
if hasattr(self.structure_type, "structuretype"):
426+
return self.structure_type.structuretype != 10
427+
else:
428+
return np.s_[:]

0 commit comments

Comments
 (0)