wf module contains Wf class for handling waveform data. It implements such basic operations as addition, multiplication, subsets, plotting etc. Also implemented are the FFT and several methods of interpolation.
The waveform class
ns - number of samples
fs - sampling frequency
t0 - start time
name - name of the waveform
type - type of the waveform, f (default) for floating point and i for integer
Add another waveform data
It is also possible to do wf1+wf2
Add a bias (pedestal) to the waveform
Add an RF burst
Add a decaying exponential
Add noise to the waveform
Add a sinusoidal signal
Add a trend to the waveform
Make a new copy of the waveform
Save a copy of data in another waveform
Divide by another waveform data
It is also possible to do wf1/wf2
Take an FFT of the waveform
Get the amplitude from the real and imaginary components
Get the phase from the real and imaginary components
Get the value of the sample number i
Get waveform statistics
Get the time array
Get the value of the waveform at a time t
mode - interpolation mode, one of the:
WF_NEAREST - rounding to the nearest value WF_LINEAR - linear interpolation WF_QUADRATIC - quadratic interpolation WF_SINC - interpolation using sinc function WF_LANCZOS - interpolation using Lanczos core WF_DEFAULT - default mode, initially set to WF_LANCZOS
Check compatibility with another waveform
Waveforms are compatible if they start at the same t0 and have the same sampling rate
Check compatibility with another waveform
Multiply by another waveform data
It is also possible to do wf1*wf2
Plot the FFT of the waveform
Plot the waveform vs sample number
Plot the spectrum of the waveform
Plot the waveform in time
Print out the waveform parameters and data
Reset the data in the waveform
Scale the waveform data
Reset the sampling frequency of the waveform
Reset the number of samples in the waveform
Set the value of the sample i
Set the values of the waveform
Set the start time of the waveform
Get a new waveform with a subset of data [n1,n2)
Subtract another waveform data
It is also possible to do wf1-wf2
Convert an integer waveform into a float waveform
Convert a float waveform into an integer waveform