toolsrtm.fluspect
FLUSPECT-B / FLUSPECT-B-Cx leaf model: PROSPECT reflectance/transmittance
plus chlorophyll-fluorescence excitation-emission matrices. Direct port
of ToolsRTM/R/fluspect_B.R (getFluspect.B) and fluspect_Cx.R
(getFluspect.Cx).
FLUSPECT-B / FLUSPECT-B-Cx leaf model: PROSPECT reflectance/transmittance plus chlorophyll-fluorescence excitation-emission matrices, via Verhoef’s doubling method applied to the leaf mesophyll layer alone (leaf-air interfaces removed before doubling, re-added after).
Direct port of ToolsRTM/R/fluspect_B.R (getFluspect.B) and
ToolsRTM/R/fluspect_Cx.R (getFluspect.Cx). These are two separate,
duplicated R functions (not a shared core with a mode flag), so they’re
ported as two separate Python functions here too, since their
fluorescence-matrix output shapes genuinely differ (MbI/MbII/
MfI/MfII split by photosystem for the B version, vs a single
Mb/Mf pair for the Cx version).
Reuses toolsrtm.leaf._one_layer() / toolsrtm.leaf._stokes_n_layers()
for the PROSPECT part (identical math, alpha fixed at 59 degrees here
instead of a caller-supplied angle, matching ToolsRTM::calctav(59, nr)
in both R functions).
- class toolsrtm.fluspect.FluspectBResult(lambda_: 'np.ndarray', refl: 'np.ndarray', tran: 'np.ndarray', kChlrel: 'np.ndarray', MbI: 'np.ndarray', MbII: 'np.ndarray', MfI: 'np.ndarray', MfII: 'np.ndarray')[source]
Bases:
object- Parameters:
- class toolsrtm.fluspect.FluspectCxResult(lambda_: 'np.ndarray', refl: 'np.ndarray', tran: 'np.ndarray', kChlrel: 'np.ndarray', kCarrel: 'np.ndarray', Mb: 'np.ndarray', Mf: 'np.ndarray')[source]
Bases:
object- Parameters:
- toolsrtm.fluspect.fluspect_b(Cab, Car, EWT, LMA, Cs, N, fqe, Cx, Prot=None, CBC=None, Anth=None)[source]
FLUSPECT-B leaf model. Direct port of
ToolsRTM::getFluspect.B.- Parameters:
Cab (float) – Chlorophyll a+b, carotenoid content (ug/cm2).
Car (float) – Chlorophyll a+b, carotenoid content (ug/cm2).
EWT (float) – Equivalent water thickness, leaf mass per area (g/cm2 both).
LMA (float) – Equivalent water thickness, leaf mass per area (g/cm2 both).
Cs (float) – Senescent/brown pigment content.
N (float) – Leaf structure parameter.
fqe (float) – Fluorescence quantum efficiency. If
fqe <= 0,MbI/MbII/MfI/MfIIcome back all-zero (no fluorescence) –refl/tranare still computed and returned normally either way, since they never depend on fqe at all.Cx (float) – Violaxanthin-zeaxanthin transition state, 0-1 (or -999 to use a fixed carotenoid absorption spectrum instead of the Cx-interpolated one).
Prot (float, optional) – If all three are given, matches R’s
"Prot" %in% colnames(inputsLeaf)auto-detection: the PROSPECT-PROKallformula (with Anth/Prot/CBC terms) is used instead of the plain PROSPECT-D one. Note this auto-detection overrides any notion of aversionargument in R too – there is no way to force PROSPECT-D once these are supplied, matching R exactly.CBC (float, optional) – If all three are given, matches R’s
"Prot" %in% colnames(inputsLeaf)auto-detection: the PROSPECT-PROKallformula (with Anth/Prot/CBC terms) is used instead of the plain PROSPECT-D one. Note this auto-detection overrides any notion of aversionargument in R too – there is no way to force PROSPECT-D once these are supplied, matching R exactly.Anth (float, optional) – If all three are given, matches R’s
"Prot" %in% colnames(inputsLeaf)auto-detection: the PROSPECT-PROKallformula (with Anth/Prot/CBC terms) is used instead of the plain PROSPECT-D one. Note this auto-detection overrides any notion of aversionargument in R too – there is no way to force PROSPECT-D once these are supplied, matching R exactly.
- Return type:
Notes
R’s
ToolsRTM::getFluspect.Bused to havereturn(LRT)inside itsif (fqe_ > 0) {...}block – since refl/tran are computed unconditionally above that block but the function’s only return statement lived inside it,fqe_ == 0made the whole function silently return R’sNULLinstead of a proper result (an implicit fall-through, not an error), which propagated into a zero-length rdot/rsot several calls downstream instead of failing loudly. This port originally mirrored that by returningNoneand required callers to check for it (toolsrtm.canopy._leaf_optics()used to raiseValueErroronNonerather than silently propagating a NULL like R did). Now that the R source computes and returns refl/tran/zero-Mb/Mf unconditionally (seeToolsRTM/R/fluspect_B.R’s own comment), this port matches that instead of raising.
- toolsrtm.fluspect.fluspect_cx(Cab, Car, EWT, LMA, Cs, N, fqe, Cx, Prot, CBC, Anth)[source]
FLUSPECT-B-Cx leaf model. Direct port of
ToolsRTM::getFluspect.Cx.Always uses the PROSPECT-PRO
Kallformula (Prot/CBC/Anth required, no auto-detection likefluspect_b()). Iffqe <= 0,Mb/Mfcome back all-zero (no fluorescence) –refl/tranare still computed and returned normally either way (seefluspect_b()’s own docstring for why this isn’t aNonereturn, like it used to be).This function computes the physically-intended 640-850 nm fluorescence emission range (
_IWLF_CORRECT).- Parameters:
Cab (float)
Car (float)
EWT (float)
LMA (float)
Cs (float)
N (float)
fqe (float)
Cx (float)
Prot (float)
CBC (float)
Anth (float)
- Return type: