PCL
pcl::RobustChauvenetRejection Class Reference

Robust Chauvenet outlier rejection algorithm. More...

#include <RobustChauvenetRejection.h>

Public Member Functions

 RobustChauvenetRejection ()=default
 
 RobustChauvenetRejection (const RobustChauvenetRejection &)=default
 
virtual ~RobustChauvenetRejection ()
 
int LargeSampleSize () const
 
template<class C , typename I >
void operator() (I &i, I &j, double &mean, double &sigma, C &data) const
 
RobustChauvenetRejectionoperator= (const RobustChauvenetRejection &)=default
 
template<class C , typename I >
void PerformRejection (I &i, I &j, double &mean, double &sigma, C &data) const
 
float RejectionLimit () const
 
void SetLargeSampleSize (int n)
 
void SetRejectionLimit (float r)
 

Detailed Description

This class implements a robust iterative sigma clipping outlier rejection algorithm with Chauvenet rejection criterion. The design and implementation are based on:

Maples, M. P., Reichart, D. E. et al., Robust Chauvenet Outlier Rejection, Astrophysical Journal Supplement Series, 2018, ApJS, 238, A2, 1-49.

See also
WinsorizedSigmaClippingRejection

Definition at line 82 of file RobustChauvenetRejection.h.

Constructor & Destructor Documentation

◆ RobustChauvenetRejection() [1/2]

pcl::RobustChauvenetRejection::RobustChauvenetRejection ( )
default

Default constructor.

◆ RobustChauvenetRejection() [2/2]

pcl::RobustChauvenetRejection::RobustChauvenetRejection ( const RobustChauvenetRejection )
default

Copy constructor.

◆ ~RobustChauvenetRejection()

virtual pcl::RobustChauvenetRejection::~RobustChauvenetRejection ( )
inlinevirtual

Virtual destructor.

Definition at line 99 of file RobustChauvenetRejection.h.

Member Function Documentation

◆ LargeSampleSize()

int pcl::RobustChauvenetRejection::LargeSampleSize ( ) const
inline

Returns the minimum length to enable bulk rejection.

For data sets smaller than the value of this parameter the robust Chauvenet rejection routine rejects a single value at each iteration. This improves stability and accuracy of the rejection process.

For larger data sets, a bulk rejection procedure is enabled for performance reasons. The larger the length of the input array with respect to this parameter, the more values will be rejected at each iteration, which accelerates the process and allows this implementation to handle even very large data sets of hundreds of thousands of items.

The default large sample size is 20,000.

Definition at line 152 of file RobustChauvenetRejection.h.

◆ operator()()

template<class C , typename I >
void pcl::RobustChauvenetRejection::operator() ( I &  i,
I &  j,
double &  mean,
double &  sigma,
C &  data 
) const
inline

Performs a Robust Chauvenet Rejection procedure.

This operator is equivalent to the PerformRejection() const member function.

Note
This function is thread-safe.

Definition at line 288 of file RobustChauvenetRejection.h.

◆ operator=()

RobustChauvenetRejection& pcl::RobustChauvenetRejection::operator= ( const RobustChauvenetRejection )
default

Copy assignment operator. Returns a reference to this object.

◆ PerformRejection()

template<class C , typename I >
void pcl::RobustChauvenetRejection::PerformRejection ( I &  i,
I &  j,
double &  mean,
double &  sigma,
C &  data 
) const
inline

Performs a Robust Chauvenet Rejection procedure for the specified data.

Parameters
[out]iReference to a variable where the function will store the zero-based index of the first non-rejected element in the sorted data array.
[out]jReference to a variable where the function will store the zero-based index of the end of the non-rejected sequence in the sorted data array.
[out]meanReference to a variable where the function will store the mean of the subset of non-rejected elements in the data array.
[out]sigmaReference to a variable where the function will store the standard deviation of the subset of non-rejected elements in the data array.
[in,out]dataRandom-access container of objects to be analyzed and rejected. On output, the elements in this container will be sorted in ascending order.

On output, the subset of non-rejected array elements is defined by the range [i,j) of zero-based array indices relative to the beginning of the data container. The elements in the data container will be sorted in ascending order.

This function will perform a three-stage iterative rejection procedure, applying a Chauvenet rejection criterion to reject one or more array elements at each iteration (depending on the length of the input array and the value of the LargeSampleSize() parameter), in succesive stages of decreasing robustness/increasing precision. On output, the robust location and scale parameters of the non-rejected subset will be returned in the specified mean and sigma variables, respectively.

The template parameter C represents a vector or array-like container with indexed random access. If T is the type of an element in a container of type C, the following operators must be implicitly or explicitly defined:

T::operator double() const;
bool T::operator <( const T& ) const;
bool operator<(const Array< T, A > &x1, const Array< T, A > &x2) noexcept
Definition: Array.h:2101

The type represented by the I template parameter should correspond to an integral scalar type such as int, unsigned, etc.

Note
This function is thread-safe.

Definition at line 217 of file RobustChauvenetRejection.h.

◆ RejectionLimit()

float pcl::RobustChauvenetRejection::RejectionLimit ( ) const
inline

Returns the limit for the altered Chauvenet rejection criterion.

The larger the value of this parameter, the more items will be rejected by the Robust Chauvenet Rejection algorithm. The original Chauvenet rejection criterion is N*P(x > |z|) < 0.5, where N is the number of measurements and P() represents the probability of x being more than z standard deviations from the mean. This parameter alters the rejection criterion by replacing 0.5 with an arbitrary limit in the [0,1] range, in order to make the algorithm controllable.

The default rejection limit is 0.5, that is, the original Chauvenet rejection criterion is applied by default.

Definition at line 122 of file RobustChauvenetRejection.h.

◆ SetLargeSampleSize()

void pcl::RobustChauvenetRejection::SetLargeSampleSize ( int  n)
inline

Sets the minimum length to enable bulk rejection. See LargeSampleSize() for a description of this parameter.

Definition at line 161 of file RobustChauvenetRejection.h.

References pcl::Max().

◆ SetRejectionLimit()

void pcl::RobustChauvenetRejection::SetRejectionLimit ( float  r)
inline

Sets the limit for the altered Chauvenet rejection criterion. See RejectionLimit() for a description of this parameter.

Definition at line 131 of file RobustChauvenetRejection.h.

References pcl::Range().


The documentation for this class was generated from the following file: