flaresimulations / synthesizer

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

generate sfzh methods should return more informative errors #245

Closed christopherlovell closed 1 year ago

christopherlovell commented 1 year ago

Following methods are all similar, but where incorrect arguments are provided (e.g. a single age to generate_sfzh_from_array) they fail without explaining that there are other methods.

generate_sfh generate_instant_sfzh generate_sfzh generate_sfzh_from_array

Arguably these methods could all be combined and handle the various arguments under the hood.

https://github.com/flaresimulations/synthesizer/blob/048662537079c165c8758578b4e3a272f47301b4/synthesizer/parametric/sfzh.py#L144

WillJRoper commented 1 year ago

Missed this issue. I totally agree! Although, I feel as if these functions should all really be implemented in the __init__ of BinnedSFZH and a star formation/metallicity equivalent rather than stand alone functions.