commit 6605f6e2afe06d85c969b8a09fd7583a8af86530
parent d8c217066d55d97524b27bb2c50bd545e05451a7
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Tue, 30 Aug 2022 11:18:00 +0200
Spectral bands are defined in nanometers
Diffstat:
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/doc/sck.5.scd b/doc/sck.5.scd
@@ -45,7 +45,7 @@ the volumetric mesh to which these coefficients are attached.
After the header comes the list of spectral bands sorted in ascending order
relative to their interval. Each spectral band begins with 2 double-precision
floating-point numbers that represent the lower and upper limits of the band in
-cm^-1. Another 64-bit integer then gives the number of quadrature points in
+nanometers. Another 64-bit integer then gives the number of quadrature points in
the band. Finally, the weights of the quadrature points are stored in a list of
floating numbers with double precision.
@@ -79,8 +79,8 @@ significant bytes are stored first.
<band> ::= <band-low> <band-upp> <#quad-pts> <quad-pt-list>
<band-id> ::= UINT64
-<band-low> ::= DOUBLE # In cm^-1 (inclusive)
-<band-upp> ::= DOUBLE # In cm^-1 (exclusive)
+<band-low> ::= DOUBLE # In nm (inclusive)
+<band-upp> ::= DOUBLE # In nm (exclusive)
<#quad-pts> ::= UINT64
---
diff --git a/src/sck.h b/src/sck.h
@@ -51,8 +51,8 @@ static const struct sck_create_args SCK_CREATE_ARGS_DEFAULT =
SCK_CREATE_ARGS_DEFAULT__;
struct sck_band {
- double lower; /* Lower band wavenumber in cm^-1 (inclusive) */
- double upper; /* Upper band wavenumber in cm^-1 (exclusive) */
+ double lower; /* Lower band wavelength in nm (inclusive) */
+ double upper; /* Upper band wavelength in nm (exclusive) */
size_t quad_pts_count; /* #quadrature points */
size_t id;
diff --git a/src/sck_c.h b/src/sck_c.h
@@ -49,8 +49,8 @@ quad_pt_release
#include <rsys/dynamic_array.h>
struct band {
- double low; /* Lower bound in nm */
- double upp; /* Upper bound in nm */
+ double low; /* Lower bound in nm (inclusive) */
+ double upp; /* Upper bound in nm (exclusive) */
size_t map_len;
float* ks_list; /* Per node ks */
struct darray_quad_pt quad_pts;
diff --git a/src/test_sck_load.c b/src/test_sck_load.c
@@ -335,7 +335,7 @@ test_load_files(struct sck* sck, int argc, char** argv)
size_t iqpt;
CHK(sck_get_band(sck, iband, &band) == RES_OK);
- printf("band %lu in [%g, %g] nm with %lu quadrature points\n",
+ printf("band %lu in [%g, %g[ nm with %lu quadrature points\n",
(unsigned long)band.id,
band.lower, band.upper,
(unsigned long)band.quad_pts_count);