27.2 Analysis Templates


Video Image.png See more related video:Creating an Analysis Template

Contents

Introduction

The Origin workbook is capable of storing raw data, metadata, mathematical formulae, scripts and analysis results (including graphs and matrix). Combine this ability to store complex information with Origin's Recalculate analysis feature and you have the potential to create an Analysis Template.

The Analysis Template concept differs from Origin's workbook template concept in at least one very important way: when you save a workbook template (File: Save Template As) and save the file as an OTW(U) file, all data are destroyed. By contrast, when you perform some operation and save an analysis template (File: Save Workbook as Analysis Template) as an OGW(U) file, the workbook will not only retain information on the number of columns and sheets, column designation and order, format and style options -- the sorts of things that are saved with the OTW(U) file -- but you also save information on what sort of analyses you have performed and what sort of output you chose to generate. When supplied with the proper data, an Analysis Template will crunch your numbers and automatically create output in the form of worksheet data, matrix data, and analysis report sheets that summarize your results with a combination of tables and graphs. The Analysis Template can be an integral part of your Origin batch operations.

Product Page BatchProcessing 04.png

Saving Analysis Operations into a Template

If all your analysis operations are consolidated into one workbook, you can select menu File: Save Workbook as Analysis Template... to save the workbook as an Analysis Template (*.OGW(U) file). You can directly drag this OGW(U) file into Origin to open it, and you will find all analysis related data are cleared but the analysis operations are kept as indicated by the green locks.

Using Saved Template to Handle Repetitive Tasks

If you only want to use a saved template to process another dataset, workbook-as-template works the same as project-as-template where both require importing new data into the template to update all analysis related graphs and results.

The added advantage of the workbook-as-template method is that the Batch Processing dialog, opened by clicking button Button Batch Processing.png or from menu File: Batch Processing, can be used to process multiple files or datasets automatically.

Use Active Workbook as Template to Handle Repetitive Tasks

If you have analyzed one of your data files within one workbook, you can easily do the same analysis for all other files by importing them into the workbooks cloned from the active workbook. This is done setting Template Name to <clone> in the file type's import dialog.

Analysis Template clone worksheet.png

Reporting Batch Analyzed Results

To summarize and report analyzed results,

Create a custom summary report sheet

Besides manually copy desired analysis results and paste them as link to the Summary sheet, Origin 2025 introduced an interactive and friendly-used tool to help you quickly build your Summary sheet in the analysis template.

To open this tool:

Add Summary Sheet for Batch Analysis.gif

Add Summary Sheet for Batch Analysis contiguous selection.gif

Add Summary Sheet for Batch Analysis.png

Create Summary Sheet Insert button.png
Insert a new row before the selected one.
Create Summary Sheet Delete button.png
Delete the selected row.
Create Summary Sheet Move to top button.pngCreate Summary Sheet Move up button.png
Create Summary Sheet Move down button.pngCreate Summary Sheet Move to bottom button.png
Reorder rows.

Create Summary Sheet Move to top button.png/Create Summary Sheet Move to bottom button.png: move the selected row to the first/last;
Create Summary Sheet Move up button.png/Create Summary Sheet Move down button.png: move the selected row to the previous/next.

Create Summary Sheet Copy label from worksheet button.png
Click this button to copy label from worksheet. Click this button to enter label selection mode, and then select a label cell in worksheet. This will copy and paste the selection as link to Label column.

Clicking Value collumn will exist label selection mode.

Transpose Table in Summary Sheet: By checking this checkbox, the Value will be output to Summary sheet column by column and the Label will be output to column label rows (first Label column to Long Name and the rest to user-defined parameters).
Output Sheet
If an existed worksheet is selected as Output Sheet, the batch results will be appended to the last non-empty column (if Transpose Table is checked), or last non-empty row (if Transpose Table is not checked). 

To output batch analysis results to Word template

To do so, first you have to prepare a Word template with favorable cells bookmarked. The bookmarks can be added to an analysis template in a special worksheet with name Bookmarks, by selecting menu File:Add Word Bookmarks to Analysis Template to open Add Word Bookmarks to Analysis Template dialog.

To pass analyzed results via Word bookmarks to Word template, you have to copy results from the analysis template and paste them as links to the corresponding cells where Word bookmarks are added. When done, you can re-save current analysis template and use it along with the Word template to export batch analyzed results directly to a Word or PDF file.

Example

This simple example will illustrate the concept:

  1. Open a new Origin project, click the Import Single ASCII button Button Import Single ASCII.png and open \Samples\Curve Fitting\Linear Fit.dat. The file is imported into the active worksheet. The sheet is renamed Linear Fit.
  2. Highlight columns B through D, select Analysis: Fitting: Linear Fit from the menu, and open the Linear Fit dialog box.
  3. Set Recalculate to Auto.
  4. Accept other defaults and click OK to perform your linear fit. You can answer "No" to the attention message.
  5. Right-click in the gray area to the right of the Linear Fit worksheet and choose Clear Worksheet from the shortcut menu. Click OK to verify that you wish to remove all data. This will also clear all of the output data (you can verify by clicking on the FitLinear1 and FitLinearCurve1 sheets) as that output is "dependent" upon the presence of the Linear Fit data. Note that, at this point, you have not saved your Analysis Template (you are merely working in an untitled Origin project file). There are a couple of options for saving, depending upon your needs:
  6. Once you have chosen an option for saving, you can see a demonstration of the Analysis Template by clicking the Import Single ASCII button Button Import Single ASCII.png and re-import \Samples\Curve Fitting\Linear Fit.dat. The file is imported into the active worksheet, the curve fit is performed and the results are written to the FitLinear and FittedValues worksheets.

Note to Advanced Users: If your Analysis Template procedure is performed by a user-defined X-Function and you intend to save the Template as an OGW(U) file and share it with a colleague, you will need to check the Save with Object check box (X-Function Builder > Tree View) when creating your X-Function.

Other Materials

The Importing Multiple Files into Workbooks Cloned from Active Workbook tutorial gives you step by step guidance to use current workbook as analysis template to batch process multiple files.

The Creating and Using Analysis Templates tutorial gives you a quick start to use Analysis Template.

The Batch Processing with Word Template for Reporting tutorial gives you step by step guidance to use Word template and Analysis Template to make Word/PDF reports.