ARTS  2.3.1285(git:92a29ea9-dirty)
oem.h File Reference

Defines the ARTS interface to the invlib library. More...

#include <type_traits>
#include "invlib/algebra.h"
#include "invlib/algebra/precision_matrix.h"
#include "invlib/algebra/solvers.h"
#include "invlib/interfaces/arts_wrapper.h"
#include "invlib/map.h"
#include "invlib/optimization.h"
#include "invlib/profiling/timer.h"

Go to the source code of this file.

Classes

class  oem::NormalizingSolver< TransformationMatrixType, SolverType >
 Normalizing solver. More...
 
struct  oem::OptimizerLog< T >
 Log customization for different optimization methods. More...
 
struct  oem::OptimizerLog< invlib::LevenbergMarquardt< RealType, DampingMatrix, Solver > >
 Log customization for LM method. More...
 
struct  oem::OptimizerLog< invlib::GaussNewton< RealType, Solver > >
 Log customization for GN method. More...
 
class  oem::ArtsLog< type >
 OEM log output. More...
 
class  oem::AgendaWrapper
 Interface to ARTS inversion_iterate_agenda. More...
 

Namespaces

 oem
 

Typedefs

using oem::Vector = invlib::Vector< ArtsVector >
 invlib wrapper type for ARTS vectors. More...
 
using oem::Matrix = invlib::Matrix< ArtsMatrix >
 invlib wrapper type for ARTS matrices. More...
 
using oem::MatrixReference = invlib::Matrix< ArtsMatrixReference<::Matrix > >
 invlib wrapper type for ARTS matrices to be passed by reference. More...
 
using oem::CovarianceMatrix = invlib::Matrix< ArtsCovarianceMatrixWrapper >
 invlib wrapper type for ARTS the ARTS covariance class. More...
 
using oem::Identity = invlib::MatrixIdentity< Matrix >
 
template<typename ForwardModel >
using oem::OEM_STANDARD = invlib::MAP< ForwardModel, Matrix, CovarianceMatrix, CovarianceMatrix, Vector, Formulation::STANDARD, invlib::Rodgers531 >
 OEM standard form. More...
 
template<typename ForwardModel >
using oem::OEM_NFORM = invlib::MAP< ForwardModel, Matrix, CovarianceMatrix, CovarianceMatrix, Vector, Formulation::NFORM >
 OEM n form. More...
 
template<typename ForwardModel >
using oem::OEM_MFORM = invlib::MAP< ForwardModel, Matrix, CovarianceMatrix, CovarianceMatrix, Vector, Formulation::MFORM >
 OEM m form. More...
 
using oem::Std = NormalizingSolver< Matrix, invlib::Standard >
 The invlib standard solver. More...
 
using oem::CG = NormalizingSolver< Matrix, invlib::ConjugateGradient<> >
 The invlib CG solver. More...
 
using oem::GN = invlib::GaussNewton< Numeric, Std >
 OEM Gauss-Newton optimization using normed ARTS QR solver. More...
 
using oem::GN_CG = invlib::GaussNewton< Numeric, CG >
 Gauss-Newton (GN) optimization using normed CG solver. More...
 
using oem::LM = invlib::LevenbergMarquardt< Numeric, CovarianceMatrix, Std >
 Levenberg-Marquardt (LM) optimization using normed ARTS QR solver. More...
 
using oem::LM_CG = invlib::LevenbergMarquardt< Numeric, CovarianceMatrix, CG >
 Levenberg-Marquardt (LM) optimization using normed CG solver. More...
 

Functions

template<typename E >
std::vector< std::string > oem::handle_nested_exception (const E &e, int level=0)
 Handle exception encountered within invlib. More...
 
void Tensor4Clip (Tensor4 &x, const Index &iq, const Numeric &limit_low, const Numeric &limit_high)
 Clip Tensor4. More...
 
void OEM_checks (Workspace &ws, Vector &x, Vector &yf, Matrix &jacobian, const Agenda &inversion_iterate_agenda, const Vector &xa, const CovarianceMatrix &covmat_sx, const Vector &y, const CovarianceMatrix &covmat_se, const ArrayOfRetrievalQuantity &jacobian_quantities, const String &method, const Vector &x_norm, const Index &max_iter, const Numeric &stop_dx, const Vector &lm_ga_settings, const Index &clear_matrices, const Index &display_progress)
 Error checking for OEM method. More...
 

Detailed Description

Defines the ARTS interface to the invlib library.

Author
Simon Pfreundschuh simon.nosp@m.pf@c.nosp@m.halme.nosp@m.rs.s.nosp@m.e
Date
Fri March 25 15:53:54 2016

Since invlib is a template library, the interface is defined mostly through type definitions that instantiate the generic invlib classes with the corresponding ARTS types.

Definition in file oem.h.

Function Documentation

◆ OEM_checks()

void OEM_checks ( Workspace ws,
Vector x,
Vector yf,
Matrix jacobian,
const Agenda inversion_iterate_agenda,
const Vector xa,
const CovarianceMatrix covmat_sx,
const Vector y,
const CovarianceMatrix covmat_se,
const ArrayOfRetrievalQuantity jacobian_quantities,
const String method,
const Vector x_norm,
const Index max_iter,
const Numeric stop_dx,
const Vector lm_ga_settings,
const Index clear_matrices,
const Index display_progress 
)

Error checking for OEM method.

Parameters
[in,out]xChecked to have size consistent with xa or zero. Set to xa if empty.
[in,out]yfChecked to have size consistent with y or zero. Computed by execution inversion_iterate_agenda if necessary.
[in,out]jacobianChecked to be consistent with xa and covmat_se or empty. Computed by executin inversion_iterate_agenda if necessary.
[in]inversion_iterate_agendaThe inversion_iterate_agenda to execute to compute yf.
[in]xaThe a priori vector
[in]covmat_sxThe state-space covariance matrix. Checked to be square and consistent with xa.
[in]yThe observation vector to fit.
[in]covmat_seThe observation error covariance matrix. Checked to by square and consistent with y.
[in]jacobian_quantitiesThe Jacobian quantities array checked to be consistent with jacobian_indices
[in]methodThe method string. Checked to be a valid OEM method string.
[in]x_normVector to use to normalize linear systems occurring in the OEM minimization. Checked to be same size as x or empty.
[in]max_iterMaximum number of OEM iteration. Checked to be positive.
[in]stop_dxThe convergence criterion for the OEM iteration. Checked to be positive.
[in]lm_ga_settingsVector containint setting for the Levenberg-Marquardt method. Checked to contain 6 elements that are all greater or equal zero.
clear_matricesFlag whether or not to clear matrices after OEM run. Checked to be 1 or 0.
display_progressWhether or not to display iteration progress. Checked to be 1 or 0.

Definition at line 666 of file oem.h.

References ConstMatrixView::empty(), inversion_iterate_agendaExecute(), jac_ranges_indices(), min, n, CovarianceMatrix::ncols(), ConstMatrixView::ncols(), Array< base >::nelem(), ConstVectorView::nelem(), CovarianceMatrix::nrows(), and ConstMatrixView::nrows().

Referenced by OEM(), and x2artsSpectroscopy().

◆ Tensor4Clip()

void Tensor4Clip ( Tensor4 x,
const Index iq,
const Numeric limit_low,
const Numeric limit_high 
)

Clip Tensor4.

Parameters
[in]Thetensor to which to apply the clipping.
[in]Thebook index to which to apply the clipping.
[in]limit_lowLower limit below which to clip values.
[in]limit_highUpper limit below which to clip values.

Definition at line 582 of file oem.h.

References i, ConstTensor4View::nbooks(), ConstTensor4View::npages(), ConstTensor4View::nrows(), r, and _CS_basic_sstream_base< _CS_cT, _CS_Tr, _CS_Al >::str().

Referenced by particle_bulkprop_fieldClip(), and vmr_fieldClip().