The aim of this module is to provide well rounded digital signal processing that specifically adressess needs of Zero-to-Ultralow field NMR time signals. Single object constructor call acts as entire DSP pipeline.
Default values provide robust parameters that give decent results in most cases of ZULF NMR data. Methods then provide options for quick visualization and parameter iteration.
Spectrum object stores the data (time and frequency domains) as they were at each postprocessing stage for later investigation.
Project will require:
- Python 3.6
- Spectrum 0.8.0 (Library)
- nmrglue 0.9.0 (Library)
- Python standard libraries
Project is not packaged. Use requires the files to either be in current working directory or in any PYTHONPATH folder. Import ZULFDSP module in your code.
Constructor will accept:
- absolute path to local data file
- initialized np.array
- will prompt a dialog to select file manually
More ofte than no optical magnetometer recuperation period affects first few datapoints which have to be removed. Or a pulse (figure) has been used, rendering first dozens of datapoints useless.
Signal can be decomposed into Noise + Signal + Bacground. Bacground comes from magnetometer detecting static magnetic field change (loss of polarization of sample). High order polynomial is fitted using linear regression and substracted from the signal.
Corrupted points that were removed create a linear phase shift across the spectra. Using inverted autoregressive coeffecients we create backward predicting model and fill the missing points with spectrally identical signal.
Simple filter aimed to reduce the presence of frequencies coming from the power grid (50Hz/60Hz and harmonics)
To increase freqency resolution of spectra we can artificially increase measurement time by adding zeros at the end. We can see that by having smaller frequency bins, spectra provides additional details:
Signal is multiplied by decaying exponential. Apodization serves primarily two purposes:
- Mitigate artefacts that would result from sudden jump between last point of signal and first zero in zero padding
- Improve SNR by decreasing amplitude of later part of signal where SNR is lower due to sample's loss of polarization.
SNR of spectra is imroved at the cost of total amplitude
Phase of the spectra usually needs additional correction:
- Either can be set by a constant value during constructor call
- Prompt a interactive plot
Allows for plotting of selected postprocessing stage, time or frequency domain and given range.
Is used to iterate a postprocessing parameter and display the comparison on selected data mode and range. It is possible to iterate over two parameters, showing spectra with all the permutations of the parameters. (Use cautiously). On example we can see what effect on final spectra would have a different amount of starting points removed: