htrdr

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

commit fc07ff8fe5671eec8b769d2adbab6523e02a0fc8
parent 41843e344a6ca9e130afc951dedbee9cef131d4d
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue, 17 Mar 2020 17:50:25 +0100

Fix a dumb issue on converting nanometers to meters

Diffstat:
Msrc/htrdr.c | 4++--
Msrc/htrdr_compute_radiance_lw.c | 8++++----
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/htrdr.c b/src/htrdr.c @@ -392,8 +392,8 @@ setup_lw_cdf(struct htrdr* htrdr) HTSKY(get_spectral_band_bounds(htrdr->sky, iband, wlens)); /* Convert from nanometer to meter */ - wlens[0] = wlens[0] * 1.e9; - wlens[1] = wlens[1] * 1.e9; + wlens[0] = wlens[0] * 1.e-9; + wlens[1] = wlens[1] * 1.e-9; /* Compute the probability of the current band */ pdf[i] = planck(wlens[0], wlens[1], Tref); diff --git a/src/htrdr_compute_radiance_lw.c b/src/htrdr_compute_radiance_lw.c @@ -160,14 +160,14 @@ htrdr_compute_radiance_lw /* Retrieve the band boundaries */ htsky_get_spectral_band_bounds(htrdr->sky, iband, band_bounds); - + /* Arbitrarly use the wavelength at the center of the band as the wavelength * to use for data that depend on wavelength rather than spectral band as the * BRDF */ wlen = (band_bounds[0] + band_bounds[1]) * 0.5; - band_bounds_m[0] = band_bounds[0] * 1e9; - band_bounds_m[1] = band_bounds[1] * 1e9; - + band_bounds_m[0] = band_bounds[0] * 1e-9; + band_bounds_m[1] = band_bounds[1] * 1e-9; + /* Setup the phase function for this spectral band & quadrature point */ CHK(RES_OK == ssf_phase_create (&htrdr->lifo_allocators[ithread], &ssf_phase_hg, &phase_hg));