fips.InverseProblem#

class fips.InverseProblem(obs, prior, forward_operator, modeldata_mismatch, prior_error, constant=None, round_index=6)[source]#

Inverse problem combining observations, priors, and forward model.

Organizes state vectors, observations, forward operators, and error covariances into a unified framework for solving inverse problems via different estimators.

Parameters:
  • obs (VectorLike) – Observation vector.

  • prior (VectorLike) – Prior state vector.

  • forward_operator (MatrixLike) – Forward operator mapping state space to observation space.

  • modeldata_mismatch (MatrixLike) – Covariance matrix representing model-data mismatch (observation error).

  • prior_error (MatrixLike) – Covariance matrix representing prior error.

  • constant (VectorLike or float, optional) – Optional constant term added to the forward model (e.g., background or bias).

  • round_index (int, optional) – Number of decimal places to round to. If None, no rounding is performed.

Attributes

averaging_kernel

Averaging kernel matrix (A).

desroziers

Desroziers et al. (2005) diagnosed observation error covariance.

estimator

Return the fitted estimator (raises if not solved).

kalman_gain

Kalman gain matrix (K).

n_obs

Return number of observations.

n_state

Return number of state variables.

obs_index

Return the observation space index.

posterior

Posterior state estimate.

posterior_error

Posterior error covariance.

posterior_obs

Modeled observations (H @ posterior).

prior_obs

Modeled observations using the prior (H @ prior).

state_index

Return the state space index.

obs

Observation vector.

prior

Prior state vector.

forward_operator

Forward operator mapping state space to observation space.

prior_error

Covariance matrix representing prior error.

modeldata_mismatch

Covariance matrix representing model-data mismatch (observation error).

constant

Optional constant term added to the forward model (e.g., background or bias).

Methods

from_file(path)

Load object from a pickle file.

get_block(component, block[, crossblock])

Get block from a component (Vector or Matrix).

solve(estimator, **kwargs)

Solve the inverse problem using the specified estimator.

to_file(path)

Save object to a pickle file.