xboa
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
GaussianSmoothing Class Reference

Gaussian smoothing class applies a smoothing by summing nearby data and weighting according to a truncated Gaussian distribution. More...

Inherits object.

Public Member Functions

def __init__
 Initialise the smoothing. More...
 
def smooth
 Smooth the signal. More...
 

Public Attributes

 sigma
 
 range_
 
 norm
 

Private Member Functions

def _smooth_one
 Smooth the point in signal at index i. More...
 

Private Attributes

 _weights
 

Detailed Description

Gaussian smoothing class applies a smoothing by summing nearby data and weighting according to a truncated Gaussian distribution.

The Smoothing function has two parameters

Smoothing near to the boundaries is performed using whatever data is available. Normalisation at the boundaries can be handled in either of two ways

Definition at line 44 of file _gaussian_smoothing.py.

Constructor & Destructor Documentation

def __init__ (   self,
  sigma,
  range_,
  adjust_boundary_normalisation 
)

Initialise the smoothing.

  • sigma (float) width of the Gaussian distribution
  • range_ (int) truncation distance applied to the Gaussian distribution
  • adjust_boundary_normalisation (bool) set to true to adjust the normalisation factor near to the edge of the data array due to the fact there are fewer elements in the smoothing

Definition at line 54 of file _gaussian_smoothing.py.

Member Function Documentation

def smooth (   self,
  signal 
)

Smooth the signal.

Definition at line 66 of file _gaussian_smoothing.py.

References GaussianSmoothing._smooth_one().

def _smooth_one (   self,
  signal,
  i 
)
private

Smooth the point in signal at index i.

Definition at line 72 of file _gaussian_smoothing.py.

References GaussianSmoothing._weights, GaussianSmoothing.norm, and GaussianSmoothing.range_.

Referenced by GaussianSmoothing.smooth().

Member Data Documentation

sigma

Definition at line 55 of file _gaussian_smoothing.py.

Referenced by RefinePeakFinder._peak_fit().

range_

Definition at line 56 of file _gaussian_smoothing.py.

Referenced by GaussianSmoothing._smooth_one().

_weights
private

Definition at line 58 of file _gaussian_smoothing.py.

Referenced by GaussianSmoothing._smooth_one().

norm

Definition at line 60 of file _gaussian_smoothing.py.

Referenced by GaussianSmoothing._smooth_one().


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