Filter 2D list Python
Filter2D 2-dimensional spectral filtering.¶This module defines the 2D filter methods. class admit.util.filter.Filter2D.Filter2D(data, method, **keyval)[source]¶This class defines and runs 2D spectral filters. The currently available filters are Gaussian, Hanning, Triangle, Welch, Boxcar, and Savitzky Golay. The output spectrum will be of the same length as the input spectrum, however some edge channels may be zeroed by some methods, depending on the input parameters.
Notes Details of the different filter keywords and defaults:
Attributes
Methods
Method to apply a boxcar filter to a spectrum. The filter for point x[i] is defined as: \[x[i] = \frac{1}{N} \sum_{n=0}^{N} x[i + n - \frac{N - 1}{2}]\] where N is the width of the filter.
Method to interpret the input method and determine the full method name
Method to apply a Gaussian filter to a spectrum. The filter for point x[i] is defined as: \[x[i] = \frac{3}{N} \sum_{n=0}^{N} x[i + n - \frac{N - 1}{2}] e^{-\frac{1}{2}\left(\frac{n-(N-1)/2}{\sigma(N-1)/2}\right)^2}\] where N is the width of the filter.
Method to apply a Hanning filter to a spectrum. The filter for point x[i] is defined as: \[x[i] = \frac{2}{N-1} \sum_{n=0}^{N} x[i + n - \frac{N - 1}{2}] 0.5 \left(1 - \cos\left(\frac{2\pi n}{N-1}\right)\right)\] where N is the width of the filter.
Method to calculate the radius of a point in the kernel
Method to run the selected filter on the data
Method to apply a Savitzky-Golay filter to a 2D image.
Method to apply a Triangular filter to a spectrum. The filter for point x[i] is defined as: \[x[i] = \sum_{n=0}^{N} x[i + n - \frac{N - 1}{2}] \left(1 - \left|\frac{n-\frac{N-1}{2}}{\frac{N}{2}}\right|\right)\] where N is the width of the filter.
Method to apply a Welch filter to a spectrum. The filter for point x[i] is defined as: \[x[i] = \frac{3}{2(N-1)} \sum_{n=0}^{N} x[i + n - \frac{N - 1}{2}] \left(1 - \left(\frac{n - \frac{N-1}{2}}{\frac{N-1}{2}}\right)^2\right)\] where N is the width of the filter.
|