commit edc2211881b3af77eb8fc4177b5439641d93c9b2
parent ed53868fa7436745e98c0f75c49a712ae33b91fd
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 4 May 2022 16:41:12 +0200
Fix the computation of the partition function
The submitted local isotope id was not correct
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/sln_line.c b/src/sln_line.c
@@ -105,11 +105,10 @@ line_profile_factor
density = (AVOGADRO_NUMBER * Ps) / (PERFECT_GAZ_CONSTANT * tree->temperature);
density = density * 1e-6; /* Convert in molec.cm^-3 */
- /* Compute the partition function TODO check that Q296K is equal to the
- * partition function returned by BD_TIPS_2017(T_REF) */
+ /* Compute the partition function. TODO precompute it for molid/isoid */
Q_Tref = isotope->Q296K;
molid = shtr_line->molecule_id;
- isoid = shtr_line->isotope_id_local;
+ isoid = shtr_line->isotope_id_local+1/*Local indices start at 1 in BD_TIPS*/;
T = tree->temperature;
BD_TIPS_2017(&molid, &T, &isoid, &gj, &Q_T);
if(Q_T <= 0) {