1.3.72
 
Loading...
Searching...
No Matches
FluspectB.h File Reference
#include <cstddef>
#include <string>
#include <vector>

Go to the source code of this file.

Data Structures

struct  helios::FluspectBiochemistry
 Fluspect-B leaf biochemistry inputs (PROSPECT-PRO + CX pigments + fluorescence parameters). More...
 
struct  helios::FluspectOptipar
 
struct  helios::FluspectKernel
 Output of Fluspect-B computation for one leaf biochemistry. More...
 

Functions

void helios::loadFluspectOptipar (const std::string &xml_path, FluspectOptipar &optipar)
 Load Fluspect-B Optipar coefficients from a Helios spectral-library XML asset.
 
FluspectKernel helios::computeFluspectKernel (const FluspectBiochemistry &biochem, const FluspectOptipar &optipar, float excitation_step_nm=5.f)
 Compute Fluspect-B leaf optics + fluorescence matrices for a single leaf biochemistry.
 

Detailed Description

Fluspect-B leaf fluorescence model (Vilfan et al. 2016) for Helios RadiationModel SIF plugin.

This module ports the fluspect_B_CX.m routine from SCOPE v2.0 (https://github.com/Christiaanvandertol/SCOPE) to C++. Given leaf biochemistry (PROSPECT-PRO + CX inputs) and Optipar specific-absorption coefficients, it computes: (a) PROSPECT-PRO-CX leaf reflectance and transmittance over 400-2400 nm (b) Forward and backward fluorescence excitation-emission matrices M_f[wlf, wle] and M_b[wlf, wle] (units: dimensionless fluorescence efficiency per excitation-emission wavelength pair). The M matrices, when multiplied by incoming excitation flux and the fluorescence quantum yield Phi_F, give the per-leaf fluorescence emission at each emission wavelength.

Inputs and outputs closely follow the MATLAB reference; see SCOPE's src/RTMs/fluspect_B_CX.m. Optipar specific-absorption coefficients are loaded from plugins/radiation/spectral_data/fluspect_B_optipar.xml.

Definition in file FluspectB.h.

Function Documentation

◆ computeFluspectKernel()

FluspectKernel helios::computeFluspectKernel ( const FluspectBiochemistry biochem,
const FluspectOptipar optipar,
float  excitation_step_nm = 5.f 
)

Compute Fluspect-B leaf optics + fluorescence matrices for a single leaf biochemistry.

Implements the doubling-method algorithm from fluspect_B_CX.m (SCOPE v2.0). The excitation grid is 400-750 nm at excitation_step_nm spacing (default 5 nm to match SCOPE's int=5 internal resolution). The emission grid is 640-848 nm at 4 nm spacing (Fluspect native; corresponds to wlf = 640:4:850 with MATLAB's inclusive/exclusive endpoint convention yielding 848 as the last sample).

Numerical agreement with MATLAB fluspect_B_CX is to within ~1e-6 per Mf/Mb element given identical Optipar coefficients.

Parameters
[in]biochemLeaf biochemistry inputs.
[in]optiparOptipar coefficients loaded via loadFluspectOptipar.
[in]excitation_step_nmExcitation wavelength grid spacing in nm. Must be > 0. The grid is 400 nm to 750 nm inclusive.
Returns
Filled FluspectKernel. If biochem.fqe <= 0, Mf/Mb are left empty (caller should treat as no fluorescence). Callers that want a quantum-yield-agnostic kernel can pass fqe = 1 and multiply by their own Phi_F externally — this is how RadiationModel uses the kernel so that leaves sharing biochemistry but differing in J/Jmax can share a cached kernel.

Definition at line 209 of file FluspectB.cpp.

◆ loadFluspectOptipar()

void helios::loadFluspectOptipar ( const std::string &  xml_path,
FluspectOptipar optipar 
)

Load Fluspect-B Optipar coefficients from a Helios spectral-library XML asset.

Reads globaldata_vec2 entries named fluspect_optipar_<field> (nr, Kab, Kca, KcaV, KcaZ, Kdm, Kw, Ks, Kant, Kp, Kcbc, phi) from Context global data. If any entries are missing from Context global data but present in the named XML file on disk, loads them first via Context::loadXML.

Parameters
[in]xml_pathAbsolute path to fluspect_B_optipar.xml (resolved by caller).
[out]optiparDestination coefficient set.
Exceptions
helios_runtime_erroron any missing coefficient or grid-mismatch.

Definition at line 189 of file FluspectB.cpp.