One scenario frequently encountered in batch peak analysis is the peak positions keep changing between datasets. It would be helpful for the peak analysis tool to remember the fitted parameters from the last dataset and use them as the initial guess for the next dataset in batch processing. Origin 2017 allows user to initialize the fitting parameters with the values of last fitting so that peak positions are well tracked to guarantee reliable fitting results. This example demonstrates the way to do batch peak analysis on a series of spectra where the peak position are moving with a certain trend.
This esrdata contains a traditional ESR (electron spin resonance) experiment data where the single crystal Ni4 sample is radiated with a rf magnetic field and the reflected power of the sample as a function of the static field magnitude is measured. The orientation of the crystal to the static field affect the resonance peak position largely as can be seen below. We want to fit each spectrum with a sum of two Gaussian functions and automate the process by batch processing.
Step 1. Create a Peak Analysis Theme
- Open moving_peaks.ogw. We want to customize Peak Analysis settings with one dataset first. Highlight column B, click Analysis:Peaks and baseline:Peak Analyzer:Open dialog to open the peak analyzer dialog. Under Goal, select Fit Peaks(Pro). Click Next.
- In the base line page, select User Defined as Baseline Mode. and click Next three times to find peak page.
- Clear the checkbox of Enable Auto Find. Click Find and two peaks are identified on the graph.
- You don’t really need to go to next page and finish the peak fitting. If you are satisfied with all settings, click the > button next to Dialog Theme box on the top of the dialog and click Save as… to save the theme with name PeakShift.
- You can cancel the dialog now. Or click Finish to finish peak fitting. If you click Finish button, four resulting sheets are generated. Notice that PeakProperties1 worksheet contains the fitted parameter values for each peak.
Step 2. Batch Peak Analysis using Fitting Parameters of Previous Fit
- Go to the worksheet with the ESR data and highlight all columns. Select Analysis:Peaks and baseline:Batch Peak Analysis using theme…
- In the dialog, Under Theme, select PeakShift. Set Result Sheet as Peak Properties(Pro). Check Sequentially Initialize Parameter Values. Set Dataset Identifier as Comments. Click OK.
- The peaks for all spectra are well fitted in the result sheet. Note: if you didn’t check the Sequentially Initialize Parameter Values, the peak position will get lost in batch processing and the result will go wrong: