xpsi-group / xpsi

X-PSI: X-ray Pulse Simulation and Inference
Other
34 stars 21 forks source link

Make Cython crash in a clean way (or catch the errors) when atmosphere extensions are wrong #325

Open sguillot opened 1 year ago

sguillot commented 1 year ago

Currently a wrong atmosphere extension (different than 1, 2, or 3) will default to blackbody (=1) with a warning to the user. This warning may go unnoticed by the user, and it would be preferable to have a clean crash or an error catching.

Nonetheless, there are checks being done before that should ensure than no values different than 1, 2 or 3 are passed to the atmosphere cython extensions.