Analysis classes (analysis
)¶
Classes to analyse physical data
Modules¶
acousticPressureScales.py¶
Module with methods to process 1D data sample with extension especially for acoustic applications.
sampleStats.py¶
Module with methods to process 1D data sample with some statistical methods.
windowedFFT - Perform a fast fourier transformation¶
Created on 11.01.2013
author: well_jn
Perform a fast fourier transformation of a real function. You have the choice of multiple __window functions. For no windowing use the default values of the constructor. Choices of __window functions: HAMMING, HANNING, BARTLETT, BLACKMAN, FLAT
Example:
from analysis.windowedFFT import WindowedFFT
time = np.arange(0, 1, dt)
myFFT = WindowedFFT(func_timeDomain = np.sin(2 * np.pi * freq * time), d_time = dt, window_type = 'HAMMING', window_size = 50)
freq = myFFT.getFrequencies()
func_freq = myFFT.getSpectrum()
Create a time array and with this a sine function. Create windowedFFT object with this sine and the choice for the windowing. You get the frequencies for the positive range of the FFT and the single single-sided amplitude spectrum of the sine.
requires¶
numpy
-
class
WindowedFFT
(func_timeDomain, d_time, window_type='FLAT', window_size=0, window_overlap=0)[source]¶ Class to setup a FFT with windowing to get the single-sided amplitude spectrum of a real function