quackseq.signalprocessing#
Helper used for signal processing.
Classes
This class provides various signal processing methods that can then be used by nqrduck modules. |
- class quackseq.signalprocessing.SignalProcessing#
This class provides various signal processing methods that can then be used by nqrduck modules.
- classmethod apodization(tdx: array, tdy: array, apodization_function: Expr) array#
This method calculates the apodization of the time domain data.
- Parameters:
tdx (np.array) β Time domain x data in seconds.
tdy (np.array) β Time domain magnitude y data.
apodization_function (sympy.Expr) β Apodization function.
- Returns:
Time domain magnitude y data with apodization.
- Return type:
np.array
- classmethod baseline_correction(fdx: array, fdy: array, order: int) array#
This method calculates the baseline correction of the frequency domain data.
- Parameters:
fdx (np.array) β Frequency domain x data in MHz.
fdy (np.array) β Frequency domain magnitude y data.
order (int) β Order of the polynomial used for baseline correction.
- Returns:
Frequency domain magnitude y data with baseline correction.
- Return type:
np.array
- classmethod fft(tdx: array, tdy: array, freq_shift: float = 0, zero_padding=1000) tuple[array, array]#
This method calculates the FFT of the time domain data.
- Parameters:
tdx (np.array) β Time domain x data in seconds.
tdy (np.array) β Time domain magnitude y data.
freq_shift (float) β Frequency shift in MHz - this can be useful if the spectrometer has itβs frequency data in the IF band.
zero_padding (float) β Zero padding to be used in the FFT.
- Returns:
Frequency domain x data in MHz. np.array: Frequency domain magnitude y data.
- Return type:
np.array
- classmethod peak_picking(fdx: array, fdy: array, threshold: float = 0.05) tuple[array, array]#
This method calculates the peak picking of the frequency domain data.
- Parameters:
fdx (np.array) β Frequency domain x data in MHz.
fdy (np.array) β Frequency domain magnitude y data.
threshold (float) β Threshold for peak picking.
- Returns:
x,y data of the peaks.
- Return type:
list