DEMutilities.postprocessing.analysistools.temporal. fourier

Small module containing some functions that help for doing Fourier analysis on temporal ‘trajectories’
(here called ‘paths’) of individual particles

In order to be able to use this module import it like this:

import DEMutilities.postprocessing.analysistools.temporal.fourier
#or assign it to a shorter name
import DEMutilities.postprocessing.analysistools.temporal.fourier as fou
DEMutilities.postprocessing.analysistools.temporal.fourier.butter_highpass(cutOff, fs, order=5)

ButterWorth high-pass filter.

Parameters:
  • cutOff (float) – cut-off frequency
  • fs (float) – sampling frequency
  • order (int) – order of the high-pass filter
This filter is based on scipy.signal.butter with:
  • btype=`high`
  • analog=`False`
DEMutilities.postprocessing.analysistools.temporal.fourier.fft_on_path(array_in, output_interval, filter_cutoff=0.0, detrend_array=False, power=False)

Apply a fast fourier transform on a given path

Parameters:
  • array_in – trajectory with float data
  • output_interval (float) – time between data points (1/sampling_frequency)
  • filter_cutoff (float) – if > 0, a high-pass filter with given cut-off frequency will be applied
  • detrend_array (bool) – If True, scipy.signal.detrend will be applied first on the data
  • power (bool) – If True, the result will be returned as a power spectrum
DEMutilities.postprocessing.analysistools.temporal.fourier.highpass_filter(data, cutOff, output_interval, order=4)

Apply a butter_highpass() on given data

Parameters:
  • data – data to be filtered
  • cutOff (float) – cut-off frequency
  • output_interval (float) – time between data points (1/sampling_frequency)
  • order (int) – order of the high-pass filter
DEMutilities.postprocessing.analysistools.temporal.fourier.mean_fft_on_paths(array, output_interval, filter_cutoff=0.0, detrend_array=False, power=False, verbose=False)

Apply fast fourier transform on a list of paths

Parameters:
  • array_in – List of trajectories with Float data
  • output_interval (float) – time between data points (1/sampling_frequency)
  • filter_cutoff (float) – if > 0, a high-pass filter with given cut-off frequency will be applied
  • detrend_array (bool) – If True, scipy.signal.detrend will be applied first on the data
  • power (bool) – If True, the result will be returned as a power spectrum