OEM

Workspace.OEM(self, model_state_vector: pyarts.arts.Vector | None = None, measurement_vector_fitted: pyarts.arts.Vector | None = None, measurement_jacobian: pyarts.arts.Matrix | None = None, measurement_gain_matrix: pyarts.arts.Matrix | None = None, oem_diagnostics: pyarts.arts.Vector | None = None, lm_ga_history: pyarts.arts.Vector | None = None, errors: pyarts.arts.ArrayOfString | None = None, model_state_vector_apriori: pyarts.arts.Vector | None = None, model_state_covariance_matrix: pyarts.arts.CovarianceMatrix | None = None, measurement_vector: pyarts.arts.Vector | None = None, measurement_vector_error_covariance_matrix: pyarts.arts.CovarianceMatrix | None = None, inversion_iterate_agenda: pyarts.arts.Agenda | None = None, method: pyarts.arts.String | None = None, max_start_cost: pyarts.arts.Numeric | None = None, model_state_covariance_matrix_normalization: pyarts.arts.Vector | None = None, max_iter: pyarts.arts.Index | None = None, stop_dx: pyarts.arts.Numeric | None = None, lm_ga_settings: pyarts.arts.Vector | None = None, clear_matrices: pyarts.arts.Index | None = None, display_progress: pyarts.arts.Index | None = None) None

Inversion by the so called optimal estimation method (OEM).

Work in progress …

The cost function to minimise, including a normalisation with length of measurement_vector, is:

cost = cost_y + cost_x

where:

cost_y = 1/m * [y-yf]’ * covmat_se_inv * [y-yf] cost_x = 1/m * [x-xa]’ * covmat_sx_inv * [x-xa]

The current implementation provides 3 methods for the minimization of the cost functional: Linear, Gauss-Newton and Levenberg-Marquardt. The Gauss-Newton minimizer attempts to find a minimum solution by fitting a quadratic function to the cost functional. The linear minimizer is a special case of the Gauss-Newton method, since for a linear forward model the exact solution of the minimization problem is obtained after the first step. The Levenberg-Marquardt method adaptively constrains the search region for the next iteration step by means of the so-called gamma-factor. This makes the method more suitable for strongly non-linear problems. If the gamma-factor is 0, Levenberg-Marquardt and Gauss-Newton method are identical. Each minimization method (li,gn,lm) has an indirect variant (li_cg,gn_cg,lm_cg), which uses the conjugate gradient solver for the linear system that has to be solved in each minimzation step. This of advantage for very large problems, that would otherwise require the computation of expensive matrix products.

Description of the special input arguments:

  • method:

    • "li": A linear problem is assumed and a single iteration is performed.

    • "li_cg": A linear problem is assumed and solved using the CG solver.

    • "gn": Non-linear, with Gauss-Newton iteration scheme.

    • "gn_cg": Non-linear, with Gauss-Newton and conjugate gradient solver.

    • "lm": Non-linear, with Levenberg-Marquardt (LM) iteration scheme.

    • "lm_cg": Non-linear, with Levenberg-Marquardt (LM) iteration scheme and conjugate gradient solver.

  • max_start_cost:

    No inversion is done if the cost matching the a priori state is above this value. If set to a negative value, all values are accepted. This argument also controls if the start cost is calculated. If set to <= 0, the start cost in oem_diagnostics is set to NaN when using “li” and “gn”.

  • x_norm:

    A normalisation vector for model_state_vector. A normalisation of model_state_vector can be needed due to limited numerical precision. If this vector is set to be empty no normalisation is done (defualt case). Otherwise, this must be a vector with same length as model_state_vector, just having values above zero. Elementwise division between model_state_vector and x_norm (x./x_norm) shall give a vector where all values are in the order of unity. Maybe the best way to set x_norm is x_norm = sqrt( diag( Sx ) ).

  • max_iter:

    Maximum number of iterations to perform. No effect for “li”.

  • stop_dx:n”

    Iteration stop criterion. The criterion used is the same as given in Rodgers' “Inverse Methods for Atmospheric Sounding”

  • lm_ga_settings:

    Settings controlling the gamma factor, part of the “LM” method. This is a vector of length 6, having the elements (0-based index):

    1. Start value.

    2. Fractional decrease after succesfull iteration.

    3. Fractional increase after unsuccessful iteration.

    4. Maximum allowed value. If the value is passed, the inversion is halted.

    5. Lower treshold. If the threshold is passed, gamma is set to zero. If gamma must be increased from zero, gamma is set to this value.

    6. Gamma limit. This is an additional stop criterion. Convergence is not considered until there has been one succesful iteration having a gamma <= this value.

    The default setting triggers an error if “lm” is selected.

  • clear matrices:

    With this flag set to 1, measurement_jacobian and measurement_gain_matrix are returned as empty matrices.

  • display_progress:

    Controls if there is any screen output. The overall report level is ignored by this WSM.

Author(s): Patrick Eriksson

Parameters:
  • model_state_vector (Vector, optional) – A state vector of the model. See model_state_vector, defaults to self.model_state_vector [INOUT]

  • measurement_vector_fitted (Vector, optional) – As measurement_vector, but fitted to the model. See measurement_vector_fitted, defaults to self.measurement_vector_fitted [INOUT]

  • measurement_jacobian (Matrix, optional) – The partial derivatives of the measurement_vector. See measurement_jacobian, defaults to self.measurement_jacobian [INOUT]

  • measurement_gain_matrix (Matrix, optional) – Contribution function (or gain) matrix. See measurement_gain_matrix, defaults to self.measurement_gain_matrix [OUT]

  • oem_diagnostics (Vector) – Basic diagnostics of an OEM type inversion. Defaults to create and/or use self.oem_diagnostics : Vector. [OUT]

  • lm_ga_history (Vector) – The series of gamma values for a Marquardt-levenberg inversion. Defaults to create and/or use self.lm_ga_history : Vector. [OUT]

  • errors (ArrayOfString) – Errors encountered during OEM execution. Defaults to create and/or use self.errors : ArrayOfString. [OUT]

  • model_state_vector_apriori (Vector, optional) – An apriori state vector of the model. See model_state_vector_apriori, defaults to self.model_state_vector_apriori [IN]

  • model_state_covariance_matrix (CovarianceMatrix, optional) – Covariance matrix of a priori distribution. See model_state_covariance_matrix, defaults to self.model_state_covariance_matrix [IN]

  • measurement_vector (Vector, optional) – The measurment vector for, e.g., a sensor. See measurement_vector, defaults to self.measurement_vector [IN]

  • measurement_vector_error_covariance_matrix (CovarianceMatrix, optional) – Covariance matrix for observation uncertainties. See measurement_vector_error_covariance_matrix, defaults to self.measurement_vector_error_covariance_matrix [IN]

  • inversion_iterate_agenda (Agenda, optional) – Work in progress … See inversion_iterate_agenda, defaults to self.inversion_iterate_agenda [IN]

  • method (String) – Iteration method. For this and all options below, see further above. [IN]

  • max_start_cost (Numeric, optional) – , optionalMaximum allowed value of cost function at start. [IN]

  • model_state_covariance_matrix_normalization (Vector, optional) – , optionalNormalisation of Sx. [IN]

  • max_iter (Index, optional) – , optionalMaximum number of iterations. [IN]

  • stop_dx (Numeric, optional) – , optionalStop criterion for iterative inversions. [IN]

  • lm_ga_settings (Vector, optional) – , optionalSettings associated with the ga factor of the LM method. [IN]

  • clear_matrices (Index, optional) – , optionalAn option to save memory. [IN]

  • display_progress (Index, optional) – , optionalFlag to control if inversion diagnostics shall be printed on the screen. [IN]