fosanalysis
A framework to evaluate distributed fiber optic sensor data
Loading...
Searching...
No Matches
fosanalysis.preprocessing.masking.WhitakerAndHayes Class Reference

The Whitaker & Hayes algorithm uses the high intensity and small width of spikes. More...

Inheritance diagram for fosanalysis.preprocessing.masking.WhitakerAndHayes:

Protected Member Functions

np.array _get_delta_strain (self, np.array z)
 Calculates the difference between the current strain and the following strain of the given strain array.
 
np.array _get_z_score (self, np.array z)
 Calculates the modified z-score of the given strain array.
 
- Protected Member Functions inherited from fosanalysis.preprocessing.masking.ZSOD
np.array _get_outlier_mask (self, np.array z_score)
 Mask entries as SRA, whose z-scores exceed threshold.
 
tuple _run_1d (self, np.array x, np.array z, np.array SRA_array, *args, **kwargs)
 Estimate which entries are strain reading anomalies in 1D.
 
tuple _run_2d (self, np.array x, np.array y, np.array z, np.array SRA_array, *args, **kwargs)
 Estimate which entries are strain reading anomalies in 2D.
 
- Protected Member Functions inherited from fosanalysis.preprocessing.masking.AnomalyMasker
tuple _map_2d (self, np.array x, np.array y, np.array z, np.array SRA_array, str timespace=None, *args, **kwargs)
 Estimate, which entries are strain reading anomalies, in 2D.
 

Additional Inherited Members

- Public Member Functions inherited from fosanalysis.preprocessing.masking.ZSOD
 __init__ (self, float threshold=3.5, str timespace="1d_space", *args, **kwargs)
 Construct an instance of the class.
 
- Public Member Functions inherited from fosanalysis.preprocessing.masking.AnomalyMasker
np.array run (self, np.array x, np.array y, np.array z, bool make_copy=True, str timespace=None, bool identify_only=False, *args, **kwargs)
 Mask strain reading anomalies with NaNs.
 
- Public Member Functions inherited from fosanalysis.utils.base.Task
 __init__ (self, *args, **kwargs)
 
- Public Member Functions inherited from fosanalysis.utils.base.Base
 __init__ (self, *args, **kwargs)
 Construct the object and warn about unused/unknown arguments.
 
- Public Attributes inherited from fosanalysis.preprocessing.masking.ZSOD
 threshold = threshold
 Relative height threshold above which a pixel is flagged as SRA.
 

Detailed Description

The Whitaker & Hayes algorithm uses the high intensity and small width of spikes.

Therefore it uses the difference between a strain value and the next value. The algorithm presented in [9].

Definition at line 728 of file masking.py.

Member Function Documentation

◆ _get_delta_strain()

np.array fosanalysis.preprocessing.masking.WhitakerAndHayes._get_delta_strain ( self,
np.array z )
protected

Calculates the difference between the current strain and the following strain of the given strain array.

Parameters
zArray containing strain data.
Returns
Returns an array delta strain.

Definition at line 734 of file masking.py.

Here is the caller graph for this function:

◆ _get_z_score()

np.array fosanalysis.preprocessing.masking.WhitakerAndHayes._get_z_score ( self,
np.array z )
protected

Calculates the modified z-score of the given strain array.

It uses the median and median absolute deviation. The multiplier 0.6745 is the 0.75th quartile of the standard normal distribution.

Parameters
zArray containing strain data.
Returns
Returns an array modified z-score.

Reimplemented from fosanalysis.preprocessing.masking.ZSOD.

Definition at line 744 of file masking.py.

Here is the call graph for this function:

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