ARTS 2.5.0 (git: 9ee3ac6c)
Raw::Average Namespace Reference

Functions

VectorView avg (VectorView y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
 Compute the average of the ranged ys. More...
 
VectorView nanavg (VectorView y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
 Compute the average of the ranged ys ignoring all non-normal values. More...
 
VectorView 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...
 
VectorView nanvar (VectorView var, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
 Compute the variance of the ranged ys ignoring all non-normal values. More...
 
VectorView 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...
 
VectorView nanstd (VectorView std, const Vector &y, const ArrayOfVector &ys, const Index start=0, const Index end=-1)
 Compute the standard deviation of the ranged ys ignoring all non-normal values. More...
 
MatrixView 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...
 
Numeric nanmedian (const ConstVectorView &v, const ArrayOfIndex &pos=ArrayOfIndex{})
 Get the median of the vector in the range ignoring all non-normal values. More...
 

Function Documentation

◆ avg()

VectorView Raw::Average::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
Returns
y

Definition at line 112 of file raw.cc.

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

◆ cov()

MatrixView Raw::Average::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
Returns
cov

Definition at line 219 of file raw.cc.

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

Referenced by cov().

◆ median()

Numeric Raw::Average::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
Returns
The median

Definition at line 238 of file raw.cc.

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

◆ nanavg()

VectorView Raw::Average::nanavg ( VectorView  y,
const ArrayOfVector ys,
const Index  start = 0,
const Index  end = -1 
)

Compute the average of the ranged ys ignoring all non-normal values.

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

If this range contains only NaN, the value is set to NaN

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
Returns
y

Definition at line 130 of file raw.cc.

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

◆ nanmedian()

Numeric Raw::Average::nanmedian ( const ConstVectorView v,
const ArrayOfIndex pos = ArrayOfIndex{} 
)

Get the median of the vector in the range ignoring all non-normal values.

If pos is empty, use all numbers

Parameters
[in]vA Vector of any length
[in]posPositions to use in the vector
Returns
The median ignoring all non-normal values (or NaN)

Definition at line 260 of file raw.cc.

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

Referenced by Raw::Correction::naive_tropospheric_singletau_median(), ybatchTroposphericCorrectionNaiveMedianForward(), and yMaskOutsideMedianRange().

◆ nanstd()

VectorView Raw::Average::nanstd ( VectorView  std,
const Vector y,
const ArrayOfVector ys,
const Index  start = 0,
const Index  end = -1 
)

Compute the standard deviation of the ranged ys ignoring all non-normal values.

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

If this range contains only NaN, the value is set to NaN. Same if y contains NaN

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
Returns
std

Definition at line 212 of file raw.cc.

References VectorView::begin(), VectorView::end(), nanvar(), Zeeman::start(), std(), and transform().

◆ nanvar()

VectorView Raw::Average::nanvar ( VectorView  var,
const Vector y,
const ArrayOfVector ys,
const Index  start = 0,
const Index  end = -1 
)

Compute the variance of the ranged ys ignoring all non-normal values.

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

If this range contains only NaN, the value is set to NaN. Same if y contains NaN

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
Returns
var

Definition at line 177 of file raw.cc.

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

Referenced by nanstd().

◆ std()

VectorView Raw::Average::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
Returns
std

Definition at line 205 of file raw.cc.

References VectorView::begin(), VectorView::end(), Zeeman::start(), std(), transform(), and var().

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

◆ var()

VectorView Raw::Average::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
Returns
var

Definition at line 159 of file raw.cc.

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

Referenced by abs_linesSetLineShapeModelParametersForMatchingLines(), 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(), ArrayOfJacobianTargetCreate(), ArrayOfMatrixCreate(), ArrayOfPpathCreate(), ArrayOfPropagationMatrixCreate(), ArrayOfQuantumIdentifierCreate(), ArrayOfRadiationVectorCreate(), ArrayOfRetrievalQuantityCreate(), ArrayOfScatteringMetaDataCreate(), ArrayOfSingleScatteringDataCreate(), ArrayOfSparseCreate(), ArrayOfSpeciesTagCreate(), 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(), JacobianTargetCreate(), MapOfErrorCorrectedSuddenDataCreate(), MatrixCreate(), MCAntennaCreate(), LineShape::MetaData2ModelShape(), LineShape::ModelShape2MetaData(), nanvar(), NumericCreate(), PpathCreate(), PropagationMatrixCreate(), QuantumIdentifierCreate(), RadiationVectorCreate(), RationalCreate(), retrievalAddCatalogParameter(), ScatteringMetaDataCreate(), select_derivativeLineShape(), LineShape::SingleSpeciesModel::Set(), SingleScatteringDataCreate(), SparseCreate(), SpeciesIsotopologueRatiosCreate(), split_quantum_numbers_from_hitran_online(), std(), StokesVectorCreate(), StringCreate(), TelsemAtlasCreate(), Tensor3Create(), Tensor4Create(), Tensor5Create(), Tensor6Create(), Tensor7Create(), TessemNNCreate(), TimeCreate(), TimerCreate(), TransmissionMatrixCreate(), var(), VectorCreate(), and VerbosityCreate().