131 mquantumidentifier(),
133 mintegration_flag(false) {
150 const Index& analytical,
155 msubsubtag(subsubtag),
157 manalytical(analytical),
158 mperturbation(perturbation),
160 mquantumidentifier(),
162 mintegration_flag(false) {
299 for (
Index j = 0; j < mgrids.nelem(); ++j) {
300 i *= mgrids[j].nelem();
312 return mquantumidentifier;
343 bool HasAffine()
const {
return !transformation_matrix.empty(); }
405 #define FOR_ANALYTICAL_JACOBIANS_DO(what_to_do) \ 406 for (Index iq = 0; iq < jacobian_quantities.nelem(); iq++) { \ 407 if (jacobian_quantities[iq].Analytical()) { \ 412 #define FOR_ANALYTICAL_JACOBIANS_DO2(what_to_do) \ 413 for (Index iq = 0; iq < jacobian_quantities.nelem(); iq++) { \ 414 if (jacobian_quantities[iq].Analytical() || \ 415 jacobian_quantities[iq].MainTag() == SURFACE_MAINTAG) { \ 444 const bool& before_affine =
false);
482 bool revert_functional_transforms =
true);
525 const String& p_retr_name,
526 const String& lat_retr_name,
527 const String& lon_retr_name,
562 const String& lat_retr_name,
563 const String& lon_retr_name,
582 const Index& atmosphere_dim,
602 const Index& atmosphere_dim,
635 const Index& cloudbox_on,
694 const Index& mblock_index,
695 const Sparse& sensor_response,
697 const Vector& sensor_response_f_grid,
698 const Matrix& sensor_response_dlos_grid,
700 const Index rq_index,
794 const Index stokes_dim,
795 const bool transmission_only =
false);
1148 const Index species,
1199 #endif // jacobian_h void iso(Array< IsotopologueRecord >::iterator &ii, String name, const ArrayOfNumeric &coeff, const ArrayOfNumeric &temp_range, const Index &coefftype)
Initialize isotopologue and move iterator to next one.
INDEX Index
The type to use for all integer numbers and indices.
bool is_pressure_broadening_G0(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a G0 derivative.
bool is_pressure_broadening_Y(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a Y derivative.
void transform_x_back(Vector &x_t, const ArrayOfRetrievalQuantity &jqs, bool revert_functional_transforms=true)
Handles back-transformations of the state vector.
JacPropMatType PropMatType() const
Returns the propagation matrix derivative type.
bool is_nlte_parameter(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a NLTE parameter.
String propmattype_string(const RetrievalQuantity &rq)
Returns a string of the retrieval quantity propagation matrix type.
const ArrayOfVector & Grids() const
Returns the grids of the retrieval.
bool supports_lookup(const ArrayOfRetrievalQuantity &js)
Returns if the array supports lookup table derivatives.
void SetTransformationFunc(const String &s)
Transformation.
void transform_jacobian(Matrix &jacobian, const Vector x, const ArrayOfRetrievalQuantity &jqs)
Applies both functional and affine transformations.
bool is_magnetic_parameter(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a magnetic parameter.
bool is_pressure_broadening_D0(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a D0 derivative.
const QuantumIdentifier & QuantumIdentity() const
Returns the identity of this Jacobian.
const Index & Analytical() const
Returns the analytical tag.
bool species_match(const RetrievalQuantity &rq, const ArrayOfSpeciesTag &ast)
Returns if the Retrieval quantity is VMR derivative for all the species in the species tags...
bool do_frequency_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants a frequency derivative.
bool check_retrieval_grids(ArrayOfVector &grids, ostringstream &os, const Vector &p_grid, const Vector &lat_grid, const Vector &lon_grid, const Vector &p_retr, const Vector &lat_retr, const Vector &lon_retr, const String &p_retr_name, const String &lat_retr_name, const String &lon_retr_name, const Index &dim)
Check that the retrieval grids are defined for each atmosphere dim.
Matrix & Transformation()
String & TransformationFunc()
bool supports_LBL_without_phase(const ArrayOfRetrievalQuantity &js)
Returns if the array supports line-by-line derivatives without requiring the phase.
bool is_lineshape_parameter_X0(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a X0 derivative.
void IntegrationOff()
Sets the integration flag to false.
bool is_derived_magnetic_parameter(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a derived magnetic parameter.
bool is_line_parameter(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is related to the absorption line.
const String & SubSubtag() const
Returns the sub-sub-tag.
bool supports_continuum(const ArrayOfRetrievalQuantity &js)
Returns if the array supports continuum derivatives.
Array< RetrievalQuantity > ArrayOfRetrievalQuantity
const QuantumIdentifier & qid
const Vector & OffsetVector() const
void jacobian_type_extrapol(ArrayOfGridPos &gp)
Adopts grid positions to extrapolation used for jacobians.
void SetTFuncParameters(const Vector &p)
bool operator==(const QuantumIdentifier &a, const QuantumIdentifier &b)
Is everything the same between the identifiers.
bool species_iso_match(const RetrievalQuantity &rq, const Index species, const Index iso)
Returns if the Retrieval quantity is VMR derivative for all the species in the species tags...
void Subtag(const String &st)
Sets the sub-tag.
void SubSubtag(const String &sst)
Sets the sub-sub-tag.
Header file for interpolation.cc.
void get_pointers_for_analytical_jacobians(ArrayOfIndex &abs_species_i, ArrayOfIndex &scat_species_i, ArrayOfIndex &is_t, ArrayOfIndex &wind_i, ArrayOfIndex &magfield_i, const ArrayOfRetrievalQuantity &jacobian_quantities, const ArrayOfArrayOfSpeciesTag &abs_species, const Index &cloudbox_on, const ArrayOfString &scat_species)
Help function for analytical jacobian calculations.
bool do_magnetic_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants a magnetic derivative.
bool is_lineshape_parameter_X2(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a X2 derivative.
bool supports_relaxation_matrix(const ArrayOfRetrievalQuantity &js)
Returns if the array supports relaxation matrix derivatives.
static bool validProptype(JacPropMatType x) noexcept
Numeric frequency_perturbation(const ArrayOfRetrievalQuantity &js) noexcept
Returns the frequency perturbation if it exists.
bool operator!=(const JacPropMatType t) const
Returns "not operator==(t)".
void Perturbation(const Numeric &p)
Sets the size of perturbation.
bool is_pressure_broadening_FVC(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a FVC derivative.
Deals with internal derivatives, Jacobian definition, and OEM calculations.
This file contains the definition of Array.
JacPropMatType
List of Jacobian properties for analytical line shape related derivatives.
bool is_frequency_parameter(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a frequency parameter in propagation matrix calculations.
Index equivalent_propmattype_index(const ArrayOfRetrievalQuantity &js, const Index i) noexcept
Returns a list of positions for the derivatives in Propagation Matrix calculations.
void transform_x(Vector &x, const ArrayOfRetrievalQuantity &jqs)
Handles transformations of the state vector.
void IntegrationOn()
Sets the integration flag to true.
ostream & operator<<(ostream &os, const RetrievalQuantity &ot)
Output operator for RetrievalQuantity.
bool is_pressure_broadening_D2(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a D2 derivative.
ArrayOfTransmissionMatrix cumulative_transmission(const ArrayOfTransmissionMatrix &T, const CumulativeTransmission type)
Accumulate the transmission matrix over all layers.
Numeric magnetic_field_perturbation(const ArrayOfRetrievalQuantity &js) noexcept
Returns the magnetic field perturbation if it exists.
const Matrix & TransformationMatrix() const
void QuantumIdentity(const QuantumIdentifier &qi)
Sets the identity of this Jacobian.
const String & Mode() const
Returns the mode.
Declarations for agendas.
void get_diydx(VectorView diy1, VectorView diy2, ConstMatrixView ImT, ConstMatrixView cumulative_transmission, ConstMatrixView dT1, ConstMatrixView dT2, ConstVectorView iYmJ, ConstVectorView dJ1, ConstVectorView dJ2, const Index stokes_dim, const bool transmission_only=false)
This file contains the class declaration of bifstream.
RetrievalQuantity(const String &maintag, const String &subtag, const String &subsubtag, const String &mode, const Index &analytical, const Numeric &perturbation, const ArrayOfVector &grids)
Constructor that sets the values.
bool supports_hitran_xsec(const ArrayOfRetrievalQuantity &js)
Returns if the array supports HITRAN cross-section derivatives.
void calcBaselineFit(Vector &y_baseline, const Vector &x, const Index &mblock_index, const Sparse &sensor_response, const ArrayOfIndex &sensor_response_pol_grid, const Vector &sensor_response_f_grid, const Matrix &sensor_response_dlos_grid, const RetrievalQuantity &rq, const Index rq_index, const ArrayOfArrayOfIndex &jacobian_indices)
Calculate baseline fit.
bool HasSameInternalsAs(const RetrievalQuantity &a) const
Checks that all the internal variables of *this match with those of the input.
bool Integration() const
Do integration?
const String & MainTag() const
Returns the main tag.
void Analytical(const Index &m)
Sets the analytical tag.
ArrayOfIndex equivalent_propmattype_indexes(const ArrayOfRetrievalQuantity &js)
Returns a list of positions for the derivatives in Propagation Matrix calculations.
bool do_temperature_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants the temperature derivative.
Class to identify and match lines by their quantum numbers.
void vmrunitscf(Numeric &x, const String &unit, const Numeric &vmr, const Numeric &p, const Numeric &t)
Scale factor for conversion between gas species units.
Matrix transformation_matrix
bool supports_faraday(const ArrayOfRetrievalQuantity &js)
Returns if the array supports Faraday derivatives.
void Grids(const ArrayOfVector &g)
Sets the grids of the retrieval.
NUMERIC Numeric
The type to use for all floating point numbers.
QuantumIdentifier mquantumidentifier
RetrievalQuantity()
Default constructor.
bool is_pressure_broadening_G(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a G derivative.
jacobianVMRcheck do_vmr_jacobian(const ArrayOfRetrievalQuantity &js, const QuantumIdentifier &line_qid) noexcept
Returns the required info for VMR Jacobian.
void diy_from_pos_to_rgrids(Tensor3View diy_dx, const RetrievalQuantity &jacobian_quantity, ConstMatrixView diy_dpos, const Index &atmosphere_dim, ConstVectorView rtp_pos)
diy_from_pos_to_rgrids
void PropType(const JacPropMatType t)
Sets the propagation matrix derivative type.
Implementation of Matrix, Vector, and such stuff.
Vector & TFuncParameters()
Propagation path structure and functions.
const String & TransformationFunc() const
Header file for logic.cc.
JacPropMatType Proptype() const
const Vector & TFuncParameters() const
Numeric temperature_perturbation(const ArrayOfRetrievalQuantity &js) noexcept
Returns the temperature perturbation if it exists.
void SetOffsetVector(const Vector &b)
bool is_lineshape_parameter_X1(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a X1 derivative.
A constant view of a Tensor3.
A constant view of a Vector.
A constant view of a Matrix.
void MainTag(const String &mt)
Sets the main tag.
void dxdvmrscf(Numeric &x, const String &unit, const Numeric &vmr, const Numeric &p, const Numeric &t)
Scale factor for conversion of derivatives with respect to VMR.
bool supports_particles(const ArrayOfRetrievalQuantity &js)
Returns if the array supports particulate derivatives.
bool supports_propmat_clearsky(const ArrayOfRetrievalQuantity &js)
Returns if the array supports propagation matrix derivatives.
void diy_from_path_to_rgrids(Tensor3View diy_dx, const RetrievalQuantity &jacobian_quantity, ConstTensor3View diy_dpath, const Index &atmosphere_dim, const Ppath &ppath, ConstVectorView ppath_p)
Maps jacobian data for points along the propagation path, to jacobian retrieval grid data...
QuantumIdentifier & QuantumIdentity()
bool is_wind_parameter(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a wind parameter.
void Mode(const String &m)
Sets the mode.
void polynomial_basis_func(Vector &b, const Vector &x, const Index &poly_coeff)
Calculates polynomial basis functions.
Deals with whether or not we should do a VMR derivative.
bool operator==(const JacPropMatType t) const
Checks if this represents the propagation matrix derivative type.
JacobianType
Enum for knowing what Jacobian scheme is in-play in the m_rte.cc methods.
The structure to describe a propagation path and releated quantities.
Index nelem() const
Number of elements in the grids.
Index Proptype(JacPropMatType x)
const String & Subtag() const
Returns the sub-tag.
bool supports_CIA(const ArrayOfRetrievalQuantity &js)
Returns if the array supports CIA derivatives.
void jac_ranges_indices(ArrayOfArrayOfIndex &jis, bool &any_affine, const ArrayOfRetrievalQuantity &jqs, const bool &before_affine=false)
Determines the index range inside x and the Jacobian for each retrieval quantity. ...
bool is_pressure_broadening_G2(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a G0 derivative.
const Numeric & Perturbation() const
Returns the size of perturbation.
void SetTransformationMatrix(const Matrix &A)
bool is_pressure_broadening_ETA(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a ETA derivative.
bool is_lineshape_parameter(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a G0, D0, G2, D2, ETA, FVC, Y, G, DV derivative.
bool is_pressure_broadening_DV(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a DV derivative.
Declaration of the class MdRecord.
bool is_lineshape_parameter_bar_linemixing(const RetrievalQuantity &t) noexcept
Returns if the Retrieval quantity is a G0, D0, G2, D2, ETA, FVC derivative.
String transformation_func
This file contains the definition of String, the ARTS string class.
bool supports_zeeman(const ArrayOfRetrievalQuantity &js)
Returns if the array supports Zeeman derivatives.
bool do_line_center_jacobian(const ArrayOfRetrievalQuantity &js) noexcept
Returns if the array wants a line center derivative.