Example single peak
Import the nmrlineshapeanalyser library
Create NMRProcessor object
Load filepath
nmrlineshapeanalyser supports an already processed Bruker data. It does not support data from any other brand at the moment. You might want to check NMRglue on how to go about that.
filepath has the following format: bruker's processed data path (10\pdata\1) + "\\". It is pertinent to leave the "\\" at the end of the filepath.
Load the data
Select the region of interest: (lower_value, higher_value)
Normalize the data and return normalised y_axis and the corresponding x_axis
define initial parameters for the fitting
this example is for a single peak
format of the parameters is [x0, amplitude, width, eta, offset]
x0 has to be close to the peak position
fixed_x0 controls whether peak positions should be fixed during fitting
False means position can vary, True means position is fixed
Fit the data
popt is the optimized parameters
metrics is the metrics of the fitting
fitted is the fitted curve data
Plot and examine the results of the fitting
Save the figure as png file and the results as a csv file