htrdr

Solving radiative transfer in heterogeneous media
git clone git://git.meso-star.fr/htrdr.git
Log | Files | Refs | README | LICENSE

commit 9f0fca34a1281dc54521c04c852c940f48601da0
parent 9f5c9931da292ee10b49c04a18686db904d7e47d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 23 Nov 2022 17:40:38 +0100

Add minor comments

Diffstat:
Msrc/core/htrdr_ran_wlen_planck.c | 7+++++--
Msrc/planeto/htrdr_planeto_compute_radiance.c | 2+-
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/core/htrdr_ran_wlen_planck.c b/src/core/htrdr_ran_wlen_planck.c @@ -196,11 +196,14 @@ wlen_ran_sample_continue } if(pdf) { - const double Tref = planck->ref_temperature; + const double Tref = planck->ref_temperature; /* K */ + + /* W/m²/sr/m */ 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⁻¹ to nm⁻¹ */ } return lambda_m * 1.e9; /* Convert in nanometers */ diff --git a/src/planeto/htrdr_planeto_compute_radiance.c b/src/planeto/htrdr_planeto_compute_radiance.c @@ -604,7 +604,7 @@ planeto_compute_radiance longwave = cmd->spectral_domain.spectral_type == HTRDR_SPECTRAL_LW; if(!longwave && htrdr_planeto_source_is_targeted(cmd->source, pos, dir)) { - L = direct_contribution(cmd, args, pos, dir, NULL); + L = direct_contribution(cmd, args, pos, dir, NULL); /* In W/m²/sr/m */ } for(;;) {