SNEWS2 / snewpy

A Python package for working with supernova neutrinos
https://snewpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
24 stars 17 forks source link

Change Fornax_2022 input to progenitor_mass #302

Closed Sheshuk closed 4 months ago

Sheshuk commented 4 months ago

Closes #293. Change Fornax_2022 input from "progenitor" string to progenitor_mass.Store 'Black hole' flag in metadata. Also I changed the description values for the progenitor_mass from ["9.0".."26.99"] to the full list of options. This helps the user to see what was the problem, if they provide non-existing input. In my opinion this is more helpful:

ValueError: Invalid parameter value for 'progenitor_mass'=12.3 solMass. Allowed values are: [ 9.    9.25  9.5   9.75 10.   10.25 10.5  10.75 11.   11.25 11.5  11.75
 12.   12.03 12.07 12.1  12.13 12.15 12.18 12.2  12.25 12.33 12.4  12.45
 12.5  12.54 12.6  12.63 12.7  12.72 12.75 12.8  12.85 12.9  12.93 12.97
 13.   13.05 13.11 13.25 13.27 13.32 13.4  13.45 13.5  13.6  13.75 13.82
 13.9  13.96 14.01 14.13 14.25 14.4  14.41 14.43 14.44 14.7  14.87 15.
 15.01 15.04 15.05 15.38 16.43 16.65 16.99 17.   17.07 17.1  17.4  17.48
 17.5  17.51 17.83 18.04 18.05 18.09 18.1  18.5  19.02 19.56 19.83 19.99
 20.08 20.09 20.18 20.37 21.   21.68 22.   22.3  22.82 23.   23.04 23.43
 24.   25.   26.   26.99] solMass