Table Of Contents

Previous topic

Scan events

Next topic

Plot canvases and plots

This Page

Post-processing filters

Post-processing filters are handled by the terapy.filters package.

TeraPy comes with the following post-processing filter modules:

ApodizationWindow

  • Function: apodization window
  • Dimension: 1
  • Filter type: pre-transform
Properties Type Default Description
type int 0 type: 0.Boxcar, 1.Bartlett, 2.Blackmann, 3.Hamming, 4.Hanning, 5.Blackman-Harris, 6.Lanczos, 7.Custom
custom str exp(-4x**2) custom window function (defined on [-1, 1])

Centering

  • Function: center maximum value by zero-padding
  • Dimension: 1
  • Filter type: generic
Properties Type Default Description
       

FourierTransform

  • Function: Fourier transform
  • Dimension: 1
  • Filter type: transform
Properties Type Default Description
       

Harminv

  • Function: filter data by harmonic inversion
  • Dimension: 1
  • Filter type: generic
Properties Type Default Description
       

HighPass

  • Function: high pass window
  • Dimension: 1
  • Filter type: pre-transform
Properties Type Default Description
type int 0 type (see ApodizationWindow)
size float 11.0 filter spread (%)
position float 25.0 position offset (%)
relative bool True if True, offset is relative to data maximum
custom str exp(-4x**2) custom window function (defined on [-1, 1])

LombScargle

  • Function: Lomb-Scargle periodogram
  • Dimension: 1
  • Filter type: transform
Properties Type Default Description
       

LowPass

  • Function: low pass window
  • Dimension: 1
  • Filter type: pre-transform
Properties Type Default Description
type int 0 type (see ApodizationWindow)
size float 11.0 filter spread (%)
position float 25.0 position offset (%)
relative bool True if True, offset is relative to data maximum
custom str exp(-4x**2) custom window function (defined on [-1, 1])

Multiply

  • Function: multiply data by given factor
  • Dimension: 1
  • Filter type: generic
Properties Type Default Description
factor float 1.0 multiplication factor

Normalize

  • Function: normalize data with reference data (interpolate if necessary)
  • Dimension: 1
  • Filter type: reference
Properties Type Default Description
imethod int 1 interpolation method: 0. nearest neighbor, 1. linear, 2. quadratic, 3. cubic

Offset

  • Function: offset correction
  • Dimension: 1
  • Filter type: generic
Properties Type Default Description
position float 3.0 distance before main peak (%)
width float 0.1 area on which to average (%)

Power

  • Function: raise data to given power
  • Dimension: 1
  • Filter type: generic
Properties Type Default Description
power float 2.0 exponent

SavitzkyGolay

  • Function: Savitzky-Golay smoothing
  • Dimension: 1
  • Filter type: generic
Properties Type Default Description
size int 11 filter size (number of data points)
order int 5 polynomial order

UniformSampling

  • Function: uniform resampling of data
  • Dimension: 1
  • Filter type: generic
Properties Type Default Description
imethod int 1 interpolation method: 0. nearest neighbor, 1. linear, 2. quadratic, 3. cubic

Welch

  • Function: Welch periodogram
  • Dimension: 1
  • Filter type: transform
Properties Type Default Description
type int 0 window type: 0. Boxcar, 1. Triangular, 2. Blackman, 3. Hamming, 4. Hann, 5. Bartlett, 6. Flat top, 7. Parzen, 8. Bohman, 9. Blackman-Harris, 10. Nuttall, 11. Bartlett-Hann
length float 20.0 window size (%)
overlap float 50.0 overlap between windows (%)
scaling int 0 scaling type: 0. density, 1. spectrum

WaveletDenoise

  • Function: wavelet denoising
  • Dimension: 1
  • Filter type: generic
  • Dependencies: pyWavelets, statsmodels, pandas
Properties Type Default Description
type str bior6.8 wavelet code (see list in pywt.wavelist())
threshold float 0.1 filtering threshold
auto_threshold bool True if True, compute threshold automatically
thresholding int 0 thresholding type: 0.Hard, 1.Soft

ZeroPadding

  • Function: extend data to the next power of 2
  • Dimension: 1
  • Filter type: generic
Properties Type Default Description