isofit.core.forward

Attributes

Logger

Classes

ForwardModel

ForwardModel contains all the information about how to calculate

Module Contents

Logger[source]
class ForwardModel(full_config: Config, cache_RT: isofit.radiative_transfer.radiative_transfer.RadiativeTransfer = None)[source]

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.

full_config[source]
instrument[source]
n_meas[source]
surface[source]
bounds[source]
scale[source]
init[source]
statevec[source]
nstate[source]
bvec[source]
nbvec = 1[source]

Set up state vector indices - MUST MATCH ORDER FROM ABOVE ASSIGNMENT

Sometimes, it’s convenient to have the index of the entire surface as one variable, and sometimes you want the sub-components Split surface state vector indices to cover cases where we retrieve additional non-reflectance surface parameters

idx_surface[source]
idx_surf_rfl[source]
idx_surf_nonrfl[source]
idx_RT[source]
idx_instrument[source]
surface_b_inds[source]
RT_b_inds[source]
instrument_b_inds[source]
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.

Sb(x, meas, geom)[source]

Accumulate the uncertainty due to unmodeled variables within respective forward model portions.

calc_meas(x, geom, rfl=[])[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.