Closed stephenmwilkins closed 10 months ago
To reduce the bloat I’d be tempted to modify the mass method to simply take an arbitrary property argument and have the user pass in the property to that argument.
I think it's a little more complicated than that I'm afraid. For example:
np.sum()
?Good point, those specific examples will require different functionality. The optional function won't work with the implementation though, an average flag would work though. In that case each pixel's count could be accumulated and then divide the sum by those counts.
why couldn't the optional function work? By default it hasnp.sum
but you can e.g. give it np.median
a bit like scipy.binned_statistic
.
Add a method to create mass, SFR, dust, average metallicity, average age, sSFR maps to ParticleGalaxy