ARTS 2.5.9 (git: 825fa5f2)
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...

## ◆ 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] y N-dimensional Vector; Averages of y in given range [in] ys list of N-dimensional Vector(s) to average [in] start First index in ys [in] end Past last index representation
Returns
y

Definition at line 112 of file raw.cc.

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

## ◆ 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] cov N-by-N-dimensional Matrix; Covariance matrix [in] y Averages of y in given range [in] ys list of N-dimensional Vector(s) to average [in] start First index in ys [in] end Past last index representation
Returns
cov

Definition at line 219 of file raw.cc.

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

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] v A Vector of any length [in] pos Positions 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] y N-dimensional Vector; Averages of y in given range [in] ys list of N-dimensional Vector(s) to average [in] start First index in ys [in] end Past last index representation
Returns
y

Definition at line 130 of file raw.cc.

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

Referenced by ybatchTimeAveraging().

## ◆ 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] v A Vector of any length [in] pos Positions 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.

## ◆ 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] std N-dimensional Vector; Standard deviations [in] y Averages of y in given range [in] ys list of N-dimensional Vector(s) to average [in] start First index in ys [in] end Past last index representation
Returns
std

Definition at line 212 of file raw.cc.

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

## ◆ 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] var N-dimensional Vector; Variance [in] y Averages of y in given range [in] ys list of N-dimensional Vector(s) to average [in] start First index in ys [in] end Past last index representation
Returns
var

Definition at line 177 of file raw.cc.

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] std N-dimensional Vector; Standard deviations [in] y Averages of y in given range [in] ys list of N-dimensional Vector(s) to average [in] start First index in ys [in] end Past last index representation
Returns
std

Definition at line 205 of file raw.cc.

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

Referenced by nanstd(), and std().

## ◆ 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] var N-dimensional Vector; Variance [in] y Averages of y in given range [in] ys list of N-dimensional Vector(s) to average [in] start First index in ys [in] end Past last index representation
Returns
var

Definition at line 159 of file raw.cc.

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

Referenced by nanvar(), std(), and var().