skretrieval.retrieval.statevector.StateVector#

class skretrieval.retrieval.statevector.StateVector(elements: Iterable[StateVectorElement])[source]#

Bases: object

A full state vector made up of a collection of state vector elements.

Parameters:

elements (Iterable[StateVectorElement]) – A collection of state vector elements

__init__(elements: Iterable[StateVectorElement])[source]#

A full state vector made up of a collection of state vector elements.

Parameters:

elements (Iterable[StateVectorElement]) – A collection of state vector elements

Methods

__init__(elements)

A full state vector made up of a collection of state vector elements.

averaging_kernel_resolution_coordinates()

Combine resolution coordinates from enabled state elements.

averaging_kernel_row_sum_groups()

Build globally unique row-sum groups from enabled state elements.

check_linearization_product_support()

Reject enabled state elements that cannot map JVP/VJP products.

describe(rodgers_output, **kwargs)

linearization_gradient(gradient, ...)

Map a SASKTRAN2 VJP result back into retrieval-state space.

linearization_parameter_names(tangent_template)

Return the active SASKTRAN2 derivative parameter names.

linearization_tangent(x, tangent_template)

Map a retrieval-state direction into SASKTRAN2 parameter space.

prior_precision_factor()

Block together prior-residual factors for enabled state elements.

update_sasktran_radiance(radiance[, drop_old_wf])

Modifies radiances output from sasktran based on the state vector elements if applicable, e.g., if a state vector element is a wavelength shift this will apply it.

Attributes

state_elements

averaging_kernel_resolution_coordinates() → dict[str, ndarray][source]#

Combine resolution coordinates from enabled state elements.

averaging_kernel_row_sum_groups() → ndarray[source]#

Build globally unique row-sum groups from enabled state elements.

check_linearization_product_support()[source]#

Reject enabled state elements that cannot map JVP/VJP products.

linearization_gradient(gradient: Dataset, tangent_template: Dataset) → ndarray[source]#

Map a SASKTRAN2 VJP result back into retrieval-state space.

linearization_parameter_names(tangent_template: Dataset) → tuple[str, ...][source]#

Return the active SASKTRAN2 derivative parameter names.

linearization_tangent(x: ndarray, tangent_template: Dataset) → Dataset[source]#

Map a retrieval-state direction into SASKTRAN2 parameter space.

prior_precision_factor()[source]#

Block together prior-residual factors for enabled state elements.

update_sasktran_radiance(radiance: Dataset, drop_old_wf: bool = False)[source]#

Modifies radiances output from sasktran based on the state vector elements if applicable, e.g., if a state vector element is a wavelength shift this will apply it.

Propagates weighting functions from the sasktran radiance raw output to weighting functions for each state vector element.

If drop_old_wf is set to true then the old weighting functions are removed from the radiance.

Parameters:
  • radiance (xr.Dataset) – Output from sk.Engine.calculate_radiance(output_format=’xarray’)

  • drop_old_wf (bool, Optional) – If true then the old weighting functions are removed after being propagated to the state vector. Default False

Returns:

radiance – Modified radiance with a new key ‘wf’ that is the jacobian with respect to the full state vector.

Return type:

xr.Dataset