isofit.core.forward

class ForwardModel(full_config)[source]

Bases: object

ForwardModel contains all the information about how to calculate radiance measurements at a specific spectral calibration, given a state vector. It also manages the distributions of unretrieved, unknown parameters of the state vector (i.e. the S_b and K_b matrices of Rodgers et al.

State vector elements always go in the following order:
  1. Surface parameters

  2. Radiative Transfer (RT) parameters

  3. Instrument parameters

The parameter bounds, scales, initial values, and names are all ordered in this way. The variable self.statevec contains the name of each state vector element, in the proper ordering.

The “b” vector corresponds to the K_b calculations in Rogers (2000); the variables bvec and bval represent the model unknowns’ names and their magnitudes, respectively. Larger magnitudes correspond to a larger variance in the unknown values. This acts as additional noise for the purpose of weighting the measurement information against the prior.

out_of_bounds(x)[source]

Check if state vector is within bounds.

xa(x, geom)[source]

Calculate the prior mean of the state vector (the concatenation of state vectors for the surface, Radiative Transfer model, and instrument).

NOTE: the surface prior mean depends on the current state; this is so we can calculate the local prior.

Sa(x, geom)[source]

Calculate the prior covariance of the state vector (the concatenation of state vectors for the surface and radiative transfer model).

NOTE: the surface prior depends on the current state; this is so we can calculate the local prior.

calc_rdn(x, geom, rfl=None, Ls=None)[source]

Calculate the high-resolution radiance, permitting overrides. Project to top-of-atmosphere and translate to radiance. The radiative transfer calculations may take place at higher resolution so we upsample surface terms.

calc_meas(x, geom, rfl=None, Ls=None)[source]

Calculate the model observation at instrument wavelengths.

calc_Ls(x, geom)[source]

Calculate the surface emission.

calc_rfl(x, geom)[source]

Calculate the surface reflectance.

calc_lamb(x, geom)[source]

Calculate the Lambertian surface reflectance.

Seps(x, meas, geom)[source]

Calculate the total uncertainty of the observation, including up to three terms: (1) the instrument noise; (2) the uncertainty due to explicit unmodeled variables, i.e. the S_epsilon matrix of Rodgers et al.; and (3) an aggregate ‘model discrepancy’ term, Gamma.

K(x, geom)[source]

Derivative of observation with respect to state vector. This is the concatenation of jacobians with respect to parameters of the surface and radiative transfer model.

Kb(x, geom)[source]

Derivative of measurement with respect to unmodeled & unretrieved unknown variables, e.g. S_b. This is the concatenation of Jacobians with respect to parameters of the surface, radiative transfer model, and instrument. Currently we only treat uncertainties in the instrument and RT model.

summarize(x, geom)[source]

State vector summary.

calibration(x)[source]

Calculate measured wavelengths and fwhm.

upsample(wl, q)[source]

Linear interpolation to RT wavelengths.

unpack(x)[source]

Unpack the state vector in appropriate index ordering.