ARTS  2.4.0(git:4fb77825)
linalg Namespace Reference

Functions

void avg (VectorView y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
 Compute the average of the ranged ys. More...
 
void std (VectorView std, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
 Compute the standard deviation of the ranged ys. More...
 
void var (VectorView var, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
 Compute the variance of the ranged ys. More...
 
void cov (MatrixView cov, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
 Compute the covariance matrix of the ranged ys. More...
 
Numeric median (const ConstVectorView v, const ArrayOfIndex &pos=ArrayOfIndex{})
 Get the median of the vector in the range. More...
 

Function Documentation

◆ avg()

void linalg::avg ( VectorView  y,
const ArrayOfVector ys,
const Index  start = 0,
const Index  end = -1 
)

Compute the average of the ranged ys.

The range of ys is [start, end) if end is positive or [start, ys.nelem()+end] otherwise

Parameters
[in,out]yN-dimensional Vector; Averages of y in given range
[in]yslist of N-dimensional Vector(s) to average
[in]startFirst index in ys
[in]endPast last index representation

Definition at line 32 of file raw.cc.

References Zeeman::end(), Array< base >::nelem(), Zeeman::start(), and ARTS::Var::y().

◆ cov()

void linalg::cov ( MatrixView  cov,
const Vector y,
const ArrayOfVector ys,
const Index  start = 0,
const Index  end = -1 
)

Compute the covariance matrix of the ranged ys.

The range of ys is [start, end) if end is positive or [start, ys.nelem()+end] otherwise

Parameters
[in,out]covN-by-N-dimensional Matrix; Covariance matrix
[in]yAverages of y in given range
[in]yslist of N-dimensional Vector(s) to average
[in]startFirst index in ys
[in]endPast last index representation

Definition at line 72 of file raw.cc.

References Zeeman::end(), Array< base >::nelem(), and Zeeman::start().

◆ median()

Numeric linalg::median ( const ConstVectorView  v,
const ArrayOfIndex pos = ArrayOfIndex{} 
)

Get the median of the vector in the range.

If pos is empty, use all numbers

Parameters
[in]vA Vector of any length
[in]posPositions to use in the vector

Definition at line 90 of file raw.cc.

References Array< base >::nelem(), and ConstVectorView::nelem().

Referenced by ybatchTroposphericCorrectionNaiveMedianForward().

◆ std()

void linalg::std ( VectorView  std,
const Vector y,
const ArrayOfVector ys,
const Index  start = 0,
const Index  end = -1 
)

Compute the standard deviation of the ranged ys.

The range of ys is [start, end) if end is positive or [start, ys.nelem()+end] otherwise

Parameters
[in,out]stdN-dimensional Vector; Standard deviations
[in]yAverages of y in given range
[in]yslist of N-dimensional Vector(s) to average
[in]startFirst index in ys
[in]endPast last index representation

Definition at line 66 of file raw.cc.

References Zeeman::start(), transform(), var(), ARTS::Var::x(), and ARTS::Var::y().

Referenced by test_oem_gauss_newton(), test_oem_gauss_newton_sparse(), test_oem_levenberg_marquardt(), and test_oem_linear().

◆ var()

void linalg::var ( VectorView  var,
const Vector y,
const ArrayOfVector ys,
const Index  start = 0,
const Index  end = -1 
)

Compute the variance of the ranged ys.

The range of ys is [start, end) if end is positive or [start, ys.nelem()+end] otherwise

Parameters
[in,out]varN-dimensional Vector; Variance
[in]yAverages of y in given range
[in]yslist of N-dimensional Vector(s) to average
[in]startFirst index in ys
[in]endPast last index representation

Definition at line 49 of file raw.cc.

References Zeeman::end(), Array< base >::nelem(), and Zeeman::start().

Referenced by abs_linesChangeLineShapeModelParameterForMatchingLines(), abs_linesSetLineShapeModelParameterForMatchingLines(), AbsorptionLinesCreate(), add_scalar_variance(), AgendaCreate(), any_negative(), ArrayOfAbsorptionLinesCreate(), ArrayOfAgendaCreate(), ArrayOfArrayOfAbsorptionLinesCreate(), ArrayOfArrayOfGriddedField1Create(), ArrayOfArrayOfGriddedField2Create(), ArrayOfArrayOfGriddedField3Create(), ArrayOfArrayOfIndexCreate(), ArrayOfArrayOfMatrixCreate(), ArrayOfArrayOfPropagationMatrixCreate(), ArrayOfArrayOfRadiationVectorCreate(), ArrayOfArrayOfScatteringMetaDataCreate(), ArrayOfArrayOfSingleScatteringDataCreate(), ArrayOfArrayOfSpeciesTagCreate(), ArrayOfArrayOfStokesVectorCreate(), ArrayOfArrayOfStringCreate(), ArrayOfArrayOfTensor3Create(), ArrayOfArrayOfTensor6Create(), ArrayOfArrayOfTimeCreate(), ArrayOfArrayOfTransmissionMatrixCreate(), ArrayOfArrayOfVectorCreate(), ArrayOfCIARecordCreate(), ArrayOfGriddedField1Create(), ArrayOfGriddedField2Create(), ArrayOfGriddedField3Create(), ArrayOfGriddedField4Create(), ArrayOfIndexCreate(), ArrayOfMatrixCreate(), ArrayOfPpathCreate(), ArrayOfPropagationMatrixCreate(), ArrayOfQuantumIdentifierCreate(), ArrayOfRadiationVectorCreate(), ArrayOfRetrievalQuantityCreate(), ArrayOfScatteringMetaDataCreate(), ArrayOfSingleScatteringDataCreate(), ArrayOfSparseCreate(), ArrayOfStokesVectorCreate(), ArrayOfStringCreate(), ArrayOfTelsemAtlasCreate(), ArrayOfTensor3Create(), ArrayOfTensor4Create(), ArrayOfTensor5Create(), ArrayOfTensor6Create(), ArrayOfTensor7Create(), ArrayOfTimeCreate(), ArrayOfTransmissionMatrixCreate(), ArrayOfVectorCreate(), ArrayOfXsecRecordCreate(), bad_propmat(), CIARecordCreate(), CovarianceMatrixCreate(), EnergyLevelMapCreate(), GasAbsLookupCreate(), LineShape::SingleSpeciesModel::Get(), GriddedField1Create(), GriddedField2Create(), GriddedField3Create(), GriddedField4Create(), GriddedField5Create(), GriddedField6Create(), GridPosCreate(), HitranRelaxationMatrixDataCreate(), IndexCreate(), Agenda::is_input(), Agenda::is_output(), MatrixCreate(), MCAntennaCreate(), LineShape::MetaData2ModelShape(), LineShape::ModelShape2MetaData(), NumericCreate(), PpathCreate(), PropagationMatrixCreate(), QuantumIdentifierCreate(), RadiationVectorCreate(), RationalCreate(), ARTS::AgendaMethod::retrievalAddCatalogParameter(), ARTS::Method::retrievalAddCatalogParameter(), retrievalAddCatalogParameter(), ScatteringMetaDataCreate(), select_derivativeLineShape(), LineShape::SingleSpeciesModel::Set(), SingleScatteringDataCreate(), SparseCreate(), SpeciesAuxDataCreate(), split_quantum_numbers_from_hitran_online(), std(), StokesVectorCreate(), StringCreate(), TelsemAtlasCreate(), Tensor3Create(), Tensor4Create(), Tensor5Create(), Tensor6Create(), Tensor7Create(), TessemNNCreate(), TimeCreate(), TimerCreate(), TransmissionMatrixCreate(), VectorCreate(), and VerbosityCreate().