isofit.surface.surface_lut

Classes

LUTSurface

A model of the surface based on an N-dimensional lookup table

Module Contents

class LUTSurface(full_config: Config)[source]

Bases: isofit.surface.surface.Surface

A model of the surface based on an N-dimensional lookup table indexed by one or more state vector elements. We calculate the reflectance by multilinear interpolation. This is good for surfaces like aquatic ecosystems or snow that can be described with just a few degrees of freedom.

The lookup table must be precalculated based on the wavelengths of the instrument. It is stored with other metadata in a matlab- format file. For an n-dimensional lookup table, it contains the following fields:

  • grids: an object array containing n lists of gridpoints

  • data: an n+1 dimensional array containing the reflectances

    for each gridpoint

  • bounds: a list of n [min,max] tuples representing the bounds

    for all state vector elements

  • statevec_names: an array of n strings representing state

    vector element names

  • mean: an array of n prior mean values, one for each state

    vector element

  • sigma: an array of n prior standard deviations, one for each

    state vector element

  • scale: an array of n scale values, one for each state vector

    element

lut_grid[source]
lut_names[source]
statevec_names[source]
data[source]
wl[source]
n_wl[source]
bounds[source]
scale[source]
init[source]
mean[source]
sigma[source]
n_state[source]
n_lut[source]
idx_lut[source]
idx_lamb[source]
itp[source]
analytical_iv_idx[source]
xa(x_surface, geom)[source]

Mean of prior distribution.

Sa(x_surface, geom)[source]

Covariance of prior distribution, calculated at state x.

Sb()[source]

Uncertainty due to unmodeled variables.

fit_params(rfl_meas, geom, *args)[source]

Given a reflectance estimate, fit a state vector.

calc_rfl(x_surface, geom)[source]

Non-Lambertian reflectance.

Inputs: x_surface : np.ndarray

Surface portion of the statevector element

geomGeometry

Isofit geometry object

Outputs: rho_dir_dir : np.ndarray

Reflectance quantity for downward direct photon paths

rho_dif_dirnp.ndarray

Reflectance quantity for downward diffuse photon paths

Note

We do not handle direct and diffuse photon path reflectance quantities differently for the multicomponent surface model. This is why we return the same quantity for both outputs.

calc_lamb(x_surface, geom)[source]

Lambertian reflectance. Be sure to incorporate BRDF-related LUT dimensions such as solar and view zenith.

drfl_dsurface(x_surface, geom)[source]

Partial derivative of reflectance with respect to state vector, calculated at x_surface.

dlamb_dsurface(x_surface, geom)[source]

Partial derivative of Lambertian reflectance with respect to state vector, calculated at x_surface. We calculate the reflectance with multilinear interpolation so the finite difference derivative is exact.

drdn_drfl(L_tot, s_alb, rho_dif_dir)[source]

Partial derivative of radiance with respect to surface reflectance

calc_Ls(x_surface, geom)[source]

Emission of surface, as a radiance.

dLs_dsurface(x_surface, geom)[source]

Partial derivative of surface emission with respect to state vector, calculated at x_surface.

drdn_dLs(t_total_up)[source]

Partial derivative of radiance with respect to surface emission

drdn_dsurface(rho_dif_dir, drfl_dsurface, dLs_dsurface, s_alb, t_total_up, L_tot, L_down_dir)[source]

Derivative of radiance with respect to full surface vector

analytical_model(background, L_down_dir, L_down_dif, L_tot, geom, L_dir_dir=None, L_dir_dif=None, L_dif_dir=None, L_dif_dif=None)[source]

Linearization of the surface reflectance terms to use in the AOE inner loop (see Susiluoto, 2025). We set the quadratic spherical albedo term to a constant background, which simplifies the linearization background - s * rho_bg

NOTE FOR SURFACE_LUT: This assumes that the only surface statevector terms are surface reflectance terms. Any additional surface state elements have to be explicitely handled in this function. How they are handled is dependent on the nature of the surface rfl model. The n-columns of H is equal to the number of statevector elements. Here, set to the number of wavelengths.

summarize(x_surface, geom)[source]

Summary of state vector.