This example shows how to process a spectrum with DataLab:
Read the spectrum from a file
Apply a filter to the spectrum
Extract a region of interest
Fit a model to the spectrum
Save the workspace to a file
First, we open DataLab and read the spectrum from a file.
Here, we are actually generating the signal from a test data file
(using âPlugins > Test data > Load spectrum of paracetamolâ), but the
principle is the same.
The spectrum is displayed in the main window.
Now, letâs process this spectrum by applying a filter to it. We will use a Wiener
filter, which is a filter that can be used to remove noise from a signal, even if
this is not absolutely necessary in this case.
If we want to analyze a specific region of the spectrum, we can extract it from the
spectrum using the âROI extractionâ feature from the âOperationsâ menu.
Letâs try to fit a model to the spectrum. We will use a Gaussian model, which is a model
that can be used to fit a peak in a spectrum.
To demonstrate another processing feature, we can also try to detrend the spectrum.
When analyzing a spectrum, it can be useful to try to identify the peaks in the
spectrum. We can do this by fitting a multi-Gaussian model to the spectrum, using
the âProcessing > Fitting > Multi-Gaussian fitâ feature.
We also could have used the âPeak detectionâ feature from the âOperationsâ menu to
detect the peaks in the spectrum.
Finally, we can save the workspace to a file. The workspace contains all the signals
that were loaded in DataLab, as well as the processing results. It also contains the
visualization settings (curve colors, etc.).
If you want to load the workspace again, you can use the âFile > Open HDF5 fileâŠâ
(or the button in the toolbar) to load the whole workspace, or the
âFile > Browse HDF5 fileâŠâ (or the button in the toolbar) to load
only a selection of data sets from the workspace.