commit d5953ed7951c4ae659c7176446f92e7be3f462bc
parent bf8ab799386ce8553692c53fc531424ee0b56351
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Thu, 30 Sep 2021 11:10:23 +0200
Fix the htrdr_ran_wlen_continue routine
The returned pdf was wrong.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/htrdr_ran_wlen.c b/src/core/htrdr_ran_wlen.c
@@ -199,7 +199,7 @@ wlen_ran_sample_continue
const double B_lambda = htrdr_planck(lambda_m, lambda_m, Tref);
const double B_mean = htrdr_planck(range_m[0], range_m[1], Tref);
*pdf = B_lambda / (B_mean * (range_m[1]-range_m[0]));
- *pdf = 1.e-9; /* Transform from m^-1 to nm^-1 */
+ *pdf *= 1.e-9; /* Transform from m^-1 to nm^-1 */
}
return lambda_m * 1.e9; /* Convert in nanometers */