commit 5d2d3a7d65a5b0c697c9fa622a52fb2e74e13538
parent f2a3b6adb05a8e8bd10fdb275a03d1f7e85b969e
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 28 Sep 2022 09:03:48 +0200
Update the rnatm_cell_get_radcoef_args structure
Removes "wavelength" member variable: only band index and quadrature
point index are required.
Diffstat:
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/rnatm.h b/src/rnatm.h
@@ -98,7 +98,6 @@ struct rnatm_cell_get_radcoef_args {
double barycentric_coords[4]; /* Position into and relative to the cell */
size_t iband; /* Index of the spectral band to query */
size_t iquad; /* Index of the quadrature point to query in the band */
- double wavelength; /* Wavenlength in the queried band (in nanometers) */
enum rnatm_radcoef radcoef;
@@ -109,7 +108,7 @@ struct rnatm_cell_get_radcoef_args {
#define RNATM_CELL_GET_RADCOEF_ARGS_NULL__ { \
RNATM_CELL_NULL__, \
{0, 0, 0, 0}, /* Barycentric coordinates */ \
- 0, 0, 0, /* Spectral data (band, quadrature point, wavelength) */ \
+ 0, 0, /* Spectral data (band, quadrature pointh) */ \
RNATM_RADCOEFS_COUNT__, \
-DBL_MAX, DBL_MAX /* For debug: Radcoef range */ \
}
diff --git a/src/rnatm_properties.c b/src/rnatm_properties.c
@@ -40,7 +40,6 @@ check_rnatm_cell_get_radcoef_args
(const struct rnatm* atm,
const struct rnatm_cell_get_radcoef_args* args)
{
- struct sck_band band;
double sum_bcoords;
size_t i, n;
ASSERT(darray_band_size_get(&atm->bands));
@@ -78,11 +77,6 @@ check_rnatm_cell_get_radcoef_args
if(args->iquad >= darray_band_cdata_get(&atm->bands)[i].nquad_pts)
return RES_BAD_ARG;
- /* Invalid wavelength */
- SCK(get_band(atm->gas.ck, args->iband, &band));
- if(args->wavelength < band.lower || args->wavelength > band.upper)
- return RES_BAD_ARG;
-
/* Invalid K range */
if(args->k_min > args->k_max)
return RES_BAD_ARG;