OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                           

4.8.5 Batch Processing Grouped Datasets Using Analysis Template with Multi-Data Sheets


Origin can perform batch analysis on grouped datasets using an analysis template with multiple data sheets.

Minimum Origin Version Required: 2016 SR0

What you will learn

This tutorial will show you how to:

  • Create a multi-data sheets analysis template
  • Perform batch analysis on grouped datasets using analysis template

How the Analysis Template Works

The reference multi-data sheets analysis template Multi-Data Sheets Analysis.ogw that we are going to make is located in <Origin EXE Folder>\Samples\Batch Processing folder. This analysis template will process 10 CSV files located in <Origin EXE Folder>\Samples\Batch Processing folder in group of 5. Every 5 data files will be imported into the sequential data sheets in the analysis template and a non-linear fit will be conducted to obtain the peak area and its standard error of each curve. Eventually we will perform linear fit to peak area versus temperature data extracted from file name and output the results.


Create Multi-Data Sheets Analysis Template

Import CSV Files into Sequential Data Sheets
  1. Create a new workbook. Go to menu File: Import: Comma Delimited (CSV)... to open CSV dialog.
  2. Browse to <Origin EXE Folder>\Samples\Batch Processing folder and select the first five data files, make sure Files of type: is selected as *.csv, then click Add Files(s) and OK button to open Comma Delimited(CSV): impCSV dialog.
  3. Expand Import Options: Header Lines node, select Number of Subheader Lines as 2, Long Name as 1 and Units as 2. Click OK to finish import.
Perform Nonlinear Fit to Obtain Peak Area
  1. Highlight column 2 in sheet T275k, hold Ctrl + Y or go to menu Analysis: Fitting: Nonlinear Curve Fit to open the NLFit dialog.
  2. Select Gauss as Function in Origin Basic Functions category.
  3. Click Fit button to perform the fitting. Click OK in the prompt to close it.
  4. Repeat steps 4, 5, 6 for data T285k, T295K, T305K, T315K to obtain peak areas for all five peaks.
Prepare Data for Linear Fit
  1. Right click sheet tab FitNLCurve5 and select Add to add a worksheet. Double click on the name and input TempData as sheet name.
  2. Hold Ctrl+D to open Add New Columns dialog and input 2 in the edit box to add 2 extra columns. Click OK button to close dialog.
  3. Set the Long Name of the 4 columns as Data File, Temperature, Area Value, Area Error, respectively.
  4. Right click the first data cell in column Data File and select Insert Variable to open dialog. Right click the node of workbook T315K on the right panel and check Show Sheet Level item to show sheets under it. Then click T275K sheet on the right panel and click Label tab on the left panel. Click property Name to highlight that row and click Insert button to insert sheet name into this cell.
  5. Repeat this step for other four sheets to add the sheet name to column Data File.
  6. Next we want to extract the temperature number from sheet name in first column, to do so highlight column Temperature and right click to select Set Column Values.... Input formula below in the edit box to extract the middle 3 numbers from file name and click OK to close dialog and apply.
  7. Go to sheet FitNL1 and highlight the two value cells under area A section in Summary' node. Right click to select Copy to copy the data. Then go to TempData sheet and paste link the data in the first row in column Area Value and Area Error. Repeat this step for other four data files.
  8. Set the designation of column Temperature as X, column Area Error as Y Error.
Perform Linear Fit and Create Result Sheet
  1. Highlight column Area Value and Area Error and go to menu Analysis: Fitting: Linear Fit to open dialog, select Recalculate mode as Auto, click OK to perform linear fitting and close the dialog. Click OK in appeared prompt to close it.
  2. Right click sheet tab FitLinearCurve1 and select Add to add a new sheet and name it as Results.
  3. Hold Ctrl + D to open Add New Columns dialog and input 3 in edit box to add 3 new columns.
  4. Set the Long Name of the 5 columns as Intercept Value, Intercept Error, Slope Value, Slope Error and Adj. R-Square, respectively.
  5. Go to sheet FitLinear1, copy the 5 value cells under Summary node and go back to Results sheet and click the first cell in first data row to paste as link.
  6. Go to menu File: Save Workbook As Analysis Template... to save it as an analysis template and name it as Multi-Data Sheets Analysis.

Batch Analyze Files in Groups

In <Origin EXE Folder>\Samples\Batch Processing folder, we have 10 CSV data files. Suppose now we want to group the files as two groups and re-order them as: group 1 as T365K, T345K, T325K, T305K, T285K; group 2 as T355K, T335K, T315K, T295K, T275K. After we will process those two grouped files using the analysis template we created in section above.

  1. Go to menu File: Batch Processing... to open dialog, click the more options button next to Analysis Template edit box to browse to analysis template Multi-Data Sheets Analysis.ogw.
  2. Click the more options button next to File List edit box to bring up Open dialog. Firstly drag and drop CSV files one by one to re-order them as shown below and click Add File(s) button to add the files to list. Click OK button to exit dialog.
    Tutorial Batch Processing Multi Data Sheets 01.png
  3. Select File Name as Dataset Identifier, Results sheet as Result Sheet and uncheck Delete Intermediate Workbook.
    Tutorial Batch Processing Multi Data Sheets 02.png
  4. Click OK button to start processing. And click OK button to save the Batch Processing dialog settings into the analysis template used(only available since Origin 2018b). The results will be outputted to Summary workbook as shown below:
    Tutorial Batch Processing Multi Data Sheets 03.png

© OriginLab Corporation. All rights reserved.