PCL
|
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 |
RobustChauvenetRejection & | operator= (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) |
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.
Definition at line 82 of file RobustChauvenetRejection.h.
|
default |
Default constructor.
|
default |
Copy constructor.
|
inlinevirtual |
Virtual destructor.
Definition at line 99 of file RobustChauvenetRejection.h.
|
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.
|
inline |
Performs a Robust Chauvenet Rejection procedure.
This operator is equivalent to the PerformRejection() const member function.
Definition at line 288 of file RobustChauvenetRejection.h.
|
default |
Copy assignment operator. Returns a reference to this object.
|
inline |
Performs a Robust Chauvenet Rejection procedure for the specified data.
[out] | i | Reference to a variable where the function will store the zero-based index of the first non-rejected element in the sorted data array. |
[out] | j | Reference 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] | mean | Reference to a variable where the function will store the mean of the subset of non-rejected elements in the data array. |
[out] | sigma | Reference to a variable where the function will store the standard deviation of the subset of non-rejected elements in the data array. |
[in,out] | data | Random-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:
The type represented by the I template parameter should correspond to an integral scalar type such as int, unsigned, etc.
Definition at line 217 of file RobustChauvenetRejection.h.
|
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.
|
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().
|
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().