ARTS 2.5.9 (git: 825fa5f2)

Functions  
ArrayOfIndex  focus_doublescaling (const Vector &x, const Numeric x0, const Numeric dx) 
Returns the relative position scale for each value in x. More...  
std::pair< Index, Index >  find_first_and_last_1 (const ArrayOfIndex &x) 
Vector  focus (const Vector &x, const ArrayOfIndex &scaling) 
Returns the reaveraged values of x according to scaling. More...  
Vector  nanfocus (const Vector &x, const ArrayOfIndex &scaling) 
Returns the reaveraged values of x according to scaling ignoring all nonnormal values. More...  
std::pair< Index, Index > Raw::Reduce::find_first_and_last_1  (  const ArrayOfIndex &  x  ) 
Definition at line 310 of file raw.cc.
References last(), and Array< base >::nelem().
Referenced by focus(), and nanfocus().
Vector Raw::Reduce::focus  (  const Vector &  x, 
const ArrayOfIndex &  scaling  
) 
Returns the reaveraged values of x according to scaling.
This refocus the input Vector x to reduce its size
The scaling should be such that it contains how many points you want the rescaled position to contain at most. Note that if there is not enough points left, all the remaining points are returned averaged to what they can be averaged to.
Note that this cannot defocus so there must be atleast 1 1 in scaling representing retained focus. Also note that all 1s must be continuous in scaling (if they are all non1s inbetween are ignored). Lastly note that 0s are not allowed in scaling (if there are, the function will loop forever).
[in]  x  A vector to refocus 
[in]  scaling  The scaling 
Definition at line 325 of file raw.cc.
References find_first_and_last_1(), mean(), N, and ConstVectorView::size().
ArrayOfIndex Raw::Reduce::focus_doublescaling  (  const Vector &  x, 
const Numeric  x0,  
const Numeric  dx  
) 
Returns the relative position scale for each value in x.
This is meant to be used with the focus routine to retain mostly values close to x0, as a reduction mechanism
This particular routine will compute the focus scaling by doubling the points so that for (positive values only, mirroring applies at absolute values):
x0 + 0 * dx to x0 + 1 * dx will have 1long steps x0 + 1 * dx to x0 + 2 * dx will have 2long steps x0 + 2 * dx to x0 + 4 * dx will have 4long steps x0 + 4 * dx to x0 + 8 * dx will have 8long steps
This doubling continues to the end (on both side around x0). The focus routine might still keep more noisy data at the end of the output focus vector when there are too few data points to have exactly a doubling of the numbers of steps
Note: the rounding is simplistic so that x0 + N * dx belongs to the 'next' step
[in]  x  The grid of xvalues [strictly increasing by the same amount] 
[in]  x0  A central position so that x[0] < x0 < x[x.size()  1] 
[in]  dx  A stepsize so that can be used to compute a relative step 
Definition at line 294 of file raw.cc.
References ConstVectorView::size().
Referenced by ybatchDoublingMeanFocus(), and yDoublingMeanFocus().
Vector Raw::Reduce::nanfocus  (  const Vector &  x, 
const ArrayOfIndex &  scaling  
) 
Returns the reaveraged values of x according to scaling ignoring all nonnormal values.
This refocus the input Vector x to reduce its size
The scaling should be such that it contains how many points you want the rescaled position to contain at most. Note that if there is not enough points left, all the remaining points are returned averaged to what they can be averaged to.
Note that this cannot defocus so there must be atleast 1 1 in scaling representing retained focus. Also note that all 1s must be continuous in scaling (if they are all non1s inbetween are ignored). Lastly note that 0s are not allowed in scaling (if there are, the function will loop forever).
If there is only NaN in a range then that value is NaN in the output (retaining original sizes)
[in,out]  x  A vector to refocus 
[in]  scaling  The scaling 
Definition at line 359 of file raw.cc.
References find_first_and_last_1(), isnormal_or_zero(), N, nanmean(), and ConstVectorView::size().
Referenced by ybatchDoublingMeanFocus(), and yDoublingMeanFocus().