Experimental Helpers
These exported helpers are available to callers, but they do not yet have a documented end-to-end product workflow. In particular, SIF fixture policy is a product decision rather than a documentation decision.
SIF Data Helpers
vSmartMOM.sif_data_path Function
sif_data_path(filename) -> StringAbsolute path to filename inside src/SIF_emission/. Benchmark scripts should use this helper rather than hardcoded absolute paths so that the package remains relocatable via pkgdir(vSmartMOM).
vSmartMOM.load_sif_spectrum Function
load_sif_spectrum(path=sif_data_path("sif-spectra.csv"); column=:SIF_OLD,
rescale_to_peak=true) -> (ν::Vector, jSIF::Vector)Load a SIF emission spectrum from a CSV file and return (ν, jSIF) sorted by increasing wavenumber (cm⁻¹).
νis the wavenumber grid in cm⁻¹ (converted from the file's nm column).jSIFis the SIF flux in mW/m²/cm⁻¹ (converted from mW/m²/nm via the dλ/dν = 1e7/ν² Jacobian).
column selects which SIF spectrum to read — the sif-spectra.csv file ships three: :SIF_OLD, :SIF_NEW, :SIF_DEF. Defaults to :SIF_OLD to match the benchmark scripts.
TODO: The (0.5π / maximum(J_SIF)) rescaling is an intentional hack to make SIF magnitude data-independent for grid generation. This normalizes shape but discards absolute physical magnitude. Revisit: confirm the downstream physics depends only on SIF shape (not absolute flux), or replace with physical units (mW/m²/cm⁻¹). Not a merge blocker.
sourcevSmartMOM.load_ficus_reflectance Function
load_ficus_reflectance(path=sif_data_path("ficus_refl_600to800nm.dat")) ->
(λ_μm::Vector, R::Vector)Load a leaf-reflectance sample from a simple two-column file (λ in μm, reflectance in %). The 600-800 nm file has no header; the full-range ficus_refl.dat file has a metadata header and the numeric block starts after the first blank line. Both are handled. Returned reflectance is dimensionless (the % is divided out).
vSmartMOM.build_sif_source Function
build_sif_source(RS_type, ν_model, ν_sif, jSIF; pol_component=1)Interpolate (ν_sif, jSIF) onto ν_model (both in cm⁻¹) and write the result into RS_type.SIF₀[pol_component, :]. Other Stokes components are left untouched (default-zero for Lambertian/unpolarized SIF).
Requires RS_type to have a SIF₀::Array{FT,2} field already sized to (pol_type.n, length(ν_model)). rt_run and rt_run_ss resize RS_type.SIF₀ before first use, so call build_sif_source after one of them has run or after a manual resize.