flaresimulations / synthesizer

Synthesizer - a code for creating synthetic astrophysical observables
https://flaresimulations.github.io/synthesizer/
GNU General Public License v3.0
17 stars 8 forks source link

Add a method to create mass, SFR, dust, metallicity, age, sSFR maps to ParticleGalaxy #77

Closed stephenmwilkins closed 10 months ago

stephenmwilkins commented 1 year ago

Add a method to create mass, SFR, dust, average metallicity, average age, sSFR maps to ParticleGalaxy

WillJRoper commented 1 year 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.

stephenmwilkins commented 1 year ago

I think it's a little more complicated than that I'm afraid. For example:

WillJRoper commented 1 year ago

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.

stephenmwilkins commented 1 year ago

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.