Mantid
Loading...
Searching...
No Matches
Namespaces | Functions
Mantid::Kernel::Smoothing Namespace Reference

Namespaces

namespace  detail
 
namespace  fft
 

Functions

template MANTID_KERNEL_DLL std::vector< double > boxcarErrorSmooth (std::vector< double > const &, unsigned int const)
 
template<typename T >
std::vector< T > boxcarErrorSmooth (std::vector< T > const &input, unsigned int const numPoints)
 Performs boxcar (moving average) smoothing on the input data, using error propagation formula.
 
template MANTID_KERNEL_DLL std::vector< double > boxcarRMSESmooth (std::vector< double > const &, unsigned int const)
 
template<typename T >
std::vector< T > boxcarRMSESmooth (std::vector< T > const &input, unsigned int const numPoints)
 Performs boxcar (moving average) smoothing on the input data, using a RMSE average, as is appropriate for error averaging.
 
template MANTID_KERNEL_DLL std::vector< double > boxcarSmooth (std::vector< double > const &, unsigned int const)
 
template<typename T >
std::vector< T > boxcarSmooth (std::vector< T > const &input, unsigned int const numPoints)
 Performs boxcar (moving average) smoothing on the input data.
 
template MANTID_KERNEL_DLL std::vector< double > fftButterworthSmooth (std::vector< double > const &, unsigned const, unsigned const)
 
template<typename Y >
std::vector< YfftButterworthSmooth (std::vector< Y > const &input, unsigned const cutoff, unsigned const order)
 Performs FFT smoothing on the input data, using a Butterworth filter NOTE: the input data MUST be defined on a uniform grid.
 
template MANTID_KERNEL_DLL std::vector< double > fftSmooth (std::vector< double > const &, unsigned const)
 
template<typename Y >
std::vector< YfftSmooth (std::vector< Y > const &input, unsigned const cutoff)
 Performs FFT smoothing on the input data, with high frequencies set to zero NOTE: the input data MUST be defined on a uniform grid.
 

Function Documentation

◆ boxcarErrorSmooth() [1/2]

template MANTID_KERNEL_DLL std::vector< double > Mantid::Kernel::Smoothing::boxcarErrorSmooth ( std::vector< double > const &  ,
unsigned int const   
)

◆ boxcarErrorSmooth() [2/2]

template<typename T >
std::vector< T > Mantid::Kernel::Smoothing::boxcarErrorSmooth ( std::vector< T > const &  input,
unsigned int const  numPoints 
)

Performs boxcar (moving average) smoothing on the input data, using error propagation formula.

This is the correct method to use for smoothing histogram errors after their y-values have been smoothed.

Parameters
inputThe input vector to be smoothed
numPointsThe width of the boxcar window (must be >= 3)
Returns
A new vector containing the smoothed data
Exceptions
std::invalid_argumentif numPoints is too small
Template Parameters
TNumeric type (e.g., int, float, double)

Definition at line 146 of file Smoothing.cpp.

References Mantid::Kernel::Smoothing::detail::boxcarSmoothWithFunction().

Referenced by Mantid::Algorithms::smooth().

◆ boxcarRMSESmooth() [1/2]

template MANTID_KERNEL_DLL std::vector< double > Mantid::Kernel::Smoothing::boxcarRMSESmooth ( std::vector< double > const &  ,
unsigned int const   
)

◆ boxcarRMSESmooth() [2/2]

template<typename T >
std::vector< T > Mantid::Kernel::Smoothing::boxcarRMSESmooth ( std::vector< T > const &  input,
unsigned int const  numPoints 
)

Performs boxcar (moving average) smoothing on the input data, using a RMSE average, as is appropriate for error averaging.

Parameters
inputThe input vector to be smoothed
numPointsThe width of the boxcar window (must be >= 3)
Returns
A new vector containing the smoothed data
Exceptions
std::invalid_argumentif numPoints is too small
Template Parameters
TNumeric type (e.g., int, float, double)

Definition at line 151 of file Smoothing.cpp.

References Mantid::Kernel::Smoothing::detail::boxcarSmoothWithFunction().

◆ boxcarSmooth() [1/2]

template MANTID_KERNEL_DLL std::vector< double > Mantid::Kernel::Smoothing::boxcarSmooth ( std::vector< double > const &  ,
unsigned int const   
)

◆ boxcarSmooth() [2/2]

template<typename T >
std::vector< T > Mantid::Kernel::Smoothing::boxcarSmooth ( std::vector< T > const &  input,
unsigned int const  numPoints 
)

Performs boxcar (moving average) smoothing on the input data.

Parameters
inputThe input vector to be smoothed
numPointsThe width of the boxcar window (must be >= 3)
Returns
A new vector containing the smoothed data
Exceptions
std::invalid_argumentif numPoints is too small
Template Parameters
TNumeric type (e.g., int, float, double)

Definition at line 141 of file Smoothing.cpp.

References Mantid::Kernel::Smoothing::detail::boxcarSmoothWithFunction().

Referenced by Mantid::Algorithms::AddLogSmoothed::exec(), and Mantid::Algorithms::smooth().

◆ fftButterworthSmooth() [1/2]

template MANTID_KERNEL_DLL std::vector< double > Mantid::Kernel::Smoothing::fftButterworthSmooth ( std::vector< double > const &  ,
unsigned const  ,
unsigned const   
)

◆ fftButterworthSmooth() [2/2]

template<typename Y >
std::vector< Y > Mantid::Kernel::Smoothing::fftButterworthSmooth ( std::vector< Y > const &  input,
unsigned const  cutoff,
unsigned const  order 
)

Performs FFT smoothing on the input data, using a Butterworth filter NOTE: the input data MUST be defined on a uniform grid.

Parameters
inputThe input vector to be smoothed
cutoffRepresents the cutoff frequency, where step function behavior begins descent
orderRepresents the steepness of the frequency cutoff; as this approaches infinity, approaches step cutoff
Returns
A new vector containing the smoothed data
Template Parameters
Ynumeric type for y-values

Definition at line 247 of file Smoothing.cpp.

References Mantid::Kernel::Smoothing::fft::fftSmoothWithFilter(), and std::to_string().

Referenced by Mantid::Algorithms::AddLogSmoothed::exec(), and Mantid::Algorithms::FFTSmooth::FFTSmooth2::exec().

◆ fftSmooth() [1/2]

template MANTID_KERNEL_DLL std::vector< double > Mantid::Kernel::Smoothing::fftSmooth ( std::vector< double > const &  ,
unsigned const   
)

◆ fftSmooth() [2/2]

template<typename Y >
std::vector< Y > Mantid::Kernel::Smoothing::fftSmooth ( std::vector< Y > const &  input,
unsigned const  cutoff 
)

Performs FFT smoothing on the input data, with high frequencies set to zero NOTE: the input data MUST be defined on a uniform grid.

Parameters
inputThe input vector to be smoothed
cutoffThe cutoff frequency; all components from this number forward will be set to zero
Returns
A new vector containing the smoothed data
Template Parameters
Ynumeric type for y-values

Definition at line 234 of file Smoothing.cpp.

References std::to_string().

Referenced by Mantid::Algorithms::AddLogSmoothed::exec(), and Mantid::Algorithms::FFTSmooth::FFTSmooth2::exec().