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

Analysis Templates

Introduction

The Origin workbook is capable of storing raw data, metadata, mathematical formulae, scripts and analysis results (including graphs). 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, all data are destroyed. This would include, for instance, any cell references/cell linking information that might be used in calculations. Thus, saving your Analysis Template as an OTW file is not what you want to do. While the Analysis Template concept is a bit amorphous (similar functionality could be achieved in an OPJ file, as explained below), it is probably best exemplified by the workbook window file -- the OGW -- a standalone file that can be inserted, as needed, into your OPJ files and which can be freely shared with colleagues.

The OGW will not only retain information on column number, designation and order, format and style options, etc., but also information on which analyses you wish to perform and what sort of output you wish to generate. When supplied with the proper data, an analysis template will crunch your numbers and automatically create output in the form of worksheet columns, and analysis report sheets that summarize your results with a combination of tables and graphs.

Since Origin 8.1, several new features about analysis template have been added.

  1. A new menu option File: Save Workbook As Analysis Template is available only when a workbook with Recalculate operation is active, which will clear the data in the workbook.
  2. A new menu option File: Save Project As Analysis Template is available only when there is Recalculation operation in current project, which will clear all the data in the project. With this option, a matrix related to Recalculate operation can also be saved as an Analysis Template.

Once an Analysis Template has been created, it can be used to perform Batch Processing of multiple data files or datsets.

Example

This simple example will illustrate the concept:

  1. Open a new Origin project, click the Import ASCII button 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: Fit Linear from the menu, and open the Linear Fit dialog box.
  3. Set Recalculate to Auto.
  4. Open the Output Results branch and verify that the output is going to the source workbook (the same one that contains the imported data).
  5. Click OK to perform your linear fit. Note the completion of the fit and the writing of results to the FitLinear and FittedValues worksheets.
  6. Click on the Linear Fit worksheet, then right-click in the area to the right of the worksheet columns. From the shortcut menu, choose Clear Worksheet and verify that you wish to remove all data. This will also clear the previous output as that output is "dependent" upon the presence of the Linear Fit data (you can verify this by clicking on these two tabs).

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:

  • If you wish to save a pared-down Analysis Template -- the smallest functioning unit, if you will -- and all of your input and output can be contained within the workbook itself, then you can save an Origin window file. Select File: Save Window As -- not Save Template As -- and save your workbook as an OGW file.
  • If you need to include your Analysis Template in a more complex project -- one that perhaps contains separate graph, matrix or layout windows -- then you could save your workbook as part of your project file (File: Save Project As). Note, however, that if you save your workbook as an OGW file as prescribed above, you can always add it to an Origin project file with the File: Open menu command.

Finally, to see a demonstration of the Analysis Template, click the Import ASCII button Image: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 file and share it with a colleague, you will need to check the Save in Project check box when creating your X-Function. For more information about this option, please see the Programming Help file.

Other Materials

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