Commit c472649f authored by Shuai Feng's avatar Shuai Feng
Browse files

add justification of input pars range

parent 5d321fc4
Pipeline #6997 passed with stage
in 0 seconds
...@@ -1120,10 +1120,15 @@ class SingleStar(): ...@@ -1120,10 +1120,15 @@ class SingleStar():
print("Notice: Your input magnitude (mag) is > 26 mag or < 8 mag.") print("Notice: Your input magnitude (mag) is > 26 mag or < 8 mag.")
if (teff < 2820) or (teff > 20129): if (teff < 2820) or (teff > 20129):
print("Notice: Your input effective tempreture (teff) is beyond the range of stellar template [2820, 20129], which will be automatically adjusted to the upper/lower limit.") print("Notice: Your input effective tempreture (teff) is beyond the range of stellar template [2820, 20129], which will be automatically adjusted to the upper/lower limit.")
if (feh > 0.81) or (feh < -2.69): if (teff < 2820):
teff = 2820
if (teff > 20129):
teff = 20129
if (feh > 0.81):
print("Notice: Your input metallicity (feh) is beyond the range of stellar template [-2.69, 0.81], which will be automatically adjusted to the upper limit.") print("Notice: Your input metallicity (feh) is beyond the range of stellar template [-2.69, 0.81], which will be automatically adjusted to the upper limit.")
#if (feh < -2.69): feh = 0.81
# raise Exception('Your input metallicity (feh) is beyond the range of stellar template [-2.69, 0.81]') if (feh < -2.69):
raise Exception('Your input metallicity (feh) is beyond the range of stellar template [-2.69, 0.81]')
StarTemp = template.templates StarTemp = template.templates
......
Supports Markdown
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