commit d0529a23cdc224804729bf442cfc119c3fdf4a65
parent a86fe15bfcb2051a00b8e399c32cfda747d54396
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 15 Feb 2022 11:27:32 +0100
Fix the lower state energy domain of a transition
It can be null.
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/shitran_transitions.c b/src/shitran_transitions.c
@@ -128,7 +128,7 @@ parse_transition(struct shitran_transitions* transitions, struct txtrdr* txtrdr)
PARSE(&tr.gamma_air, 5, double, "air broadening half-width", 0,INF,0,1);
PARSE(&tr.gamma_self, 5, double, "self broadening half-width", 0,INF,0,1);
- PARSE(&tr.lower_state_energy, 10, double, "lower state energy", 0,INF,0,1);
+ PARSE(&tr.lower_state_energy, 10, double, "lower state energy", 0,INF,1,1);
PARSE(&tr.n_air, 4, double, "temperature-dependent exponent", 0,INF,0,1);
PARSE(&tr.delta_air, 8, double, "air-pressure wavenumber shift", -INF,INF,1,1);
diff --git a/src/test_shitran_transitions.c b/src/test_shitran_transitions.c
@@ -178,7 +178,7 @@ test_load_failures(struct shitran* shitran)
test_transition(shitran, &tr, RES_BAD_ARG);
/* Invalid lower state energy */
- tr = tr_ref; tr.lower_state_energy = 0;
+ tr = tr_ref; tr.lower_state_energy = -1;
test_transition(shitran, &tr, RES_BAD_ARG);
/* Invalid n_air */