Closed MatthieuSchaller closed 2 years ago
I had a quick look at the code and I'm not sure there is an elegant way to do this. The autoplotter already has support for masks, so in that sense this feature already exists. But I guess what you want is to be able to use something like catalogue.centrals.masses.m_200crit
; so you want to use the catalogue directly as if it only contained those halos. That would imply catalogue.centrals
(and catalogue.satellites
if you want) is a new type of sub-catalogue object that stores an additional mask and then applies this mask whenever a dataset attribute is accessed. Since creation of the mask implies reading the structure_type
, you probably only want to create this object when someone actually accesses catalogue.centrals
. That's probably all possible, but it is a non-trivial change that sounds a lot like the magic used to read the datasets.
@JBorrow what do you think?
Ah that's more advanced than what I had in mind.
My thought was just to have an array of true
/false
generated by structure_type == 10
. That means people would not have to know about the magical 10. It would still have to be used as a mask on the other arrays.
So for instance:
catalogue.masses.m_200crit[catalogue.centrals]
We have quite a few users getting incorrect results for halos as they include all objects rather than just the centrals.
I was hence wondering whether we could provide an automated mask called
centrals
or something very explicit like, which would just be a mask arraystructrure_type == 10
.