Commit 28f50767 authored by Yannick Roehlly's avatar Yannick Roehlly
Browse files

[quenching mod] Raise an exception if quenching age > galaxy age

Actually raise an exception indicating to the users to change their
parameters if the quenching age happens to be superior to the galaxy
age.

Fixes #2
parent 5e6e41b9
......@@ -63,6 +63,11 @@ class SfhQuench(CreationModule):
# Read the star formation history of the SED
time, sfr = sed.sfh
if quenching_age > time[-1]:
raise Exception("[sfh_quenching] The quenching age is greater "
"than the galaxy age. Please fix your parameters.")
# We assume the time in the star formation history is evenly spaced to
# compute the reverse index (i.e. from the end of the array) of the SFH
# step corresponding to the quenching age.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment