htmie

Optical properties of water droplets
git clone git://git.meso-star.fr/htmie.git
Log | Files | Refs | README | LICENSE

commit 30c8c29f5ec3274e34fa99319a6c035c7a640fea
parent 2f9261a5cb11c26faa9ed069d35e10f95c4e49d3
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Fri, 13 Jul 2018 12:49:55 +0200

Fix an issue in the "compute cross section average" function

Diffstat:
Msrc/htmie.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/htmie.c b/src/htmie.c @@ -523,7 +523,7 @@ min_max(const double wavelength, const double data, void* ctx) ASSERT(ctx); (void)wavelength; bounds[0] = MMIN(bounds[0], data); - bounds[1] = MMIN(bounds[1], data); + bounds[1] = MMAX(bounds[1], data); } static FINLINE void @@ -586,6 +586,8 @@ for_each_wavelength_in_spectral_band data_upp = interpolate_data(htmie, band[1], type, iupp, data); } + if(wlens[ilow] == band[0]) ++ilow; + op(band[0], data_low, context); FOR_EACH(i, ilow, iupp) { op(wlens[i], data[i], context);