#include "FluspectB.h"#include "Context.h"#include "global.h"#include <algorithm>#include <cmath>#include <limits>Go to the source code of this file.
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. | |
Implementation of Fluspect-B leaf fluorescence model.
Definition in file FluspectB.cpp.
| 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.
| [in] | biochem | Leaf biochemistry inputs. |
| [in] | optipar | Optipar coefficients loaded via loadFluspectOptipar. |
| [in] | excitation_step_nm | Excitation wavelength grid spacing in nm. Must be > 0. The grid is 400 nm to 750 nm inclusive. |
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.
| 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.
| [in] | xml_path | Absolute path to fluspect_B_optipar.xml (resolved by caller). |
| [out] | optipar | Destination coefficient set. |
| helios_runtime_error | on any missing coefficient or grid-mismatch. |
Definition at line 189 of file FluspectB.cpp.