Origin offers time-saving batch analysis tools for users of all levels. While complex routines may require programming support with LabTalk, Origin C or Python, features such as repeating operations, auto-recalculation, Analysis Templates, Cloning, and Batch Processing and Batch Peak tools, make it possible to run batch analyses in Origin without involving programming.
Categorizing Batch Analysis Operations in Origin
Origin’s “no programming required” batch analysis operations can be divided up into the following:
- Repeating Operations
- Clone Import
- Batch Processing
- Batch Peak Analysis Using Theme
This blog post will begin by explaining the simple “repeating” operations and moving to the more complex batch processing and batch peak analysis operations.
Many of Origin’s analysis tools work on only one dataset at a time (e.g. smoothing). When this is the case you have the option of repeating an analysis by clicking the operations lock that is placed on the output from your initial analysis and choosing Repeat this for All Y columns. Here, we have performed smoothing on dataset B(Y), generating the output seen in column F(Y). Clicking on the operations lock in the output column, we see the option to repeat the analysis for all remaining Y columns — C, D and E — in the worksheet.
When performing such analyses on plotted data, you can click the operations lock and Repeat this for All Plots.
You’ll find an example project showing both, in your Origin software. Press F11 and in the Learning Center, click the Analysis Samples tab, set Samples in to Batch Processing. Look for a project named as Repeat this Analysis (you will find other batch examples there, as well).
Similarly, many of Origin’s graphical-analysis Gadgets offer the option to create New Output for All Curves by which an analysis performed on one curve is applied to all other curves in the graph layer.
Recalculation of Results
Before we get into cloning and batch operations, we should talk about recalculation of results. Many of Origin’s analysis tools incorporate a Recalculate control that can be set to None, Manual or Auto. When this control is set to Auto, any change in tool input automatically triggers recalculation of results. When setting up cloning or batch operations, you will want to set the Recalculate control on any dialog that is part of your cloning or batch operations, to Auto.
What is labeled in the GUI as “clone import” (the Clone Import button on the Import toolbar or on the menu Data: Clone Import) is potentially much more than a simple, serial-import operation. In a broader context, “clone import” can be broken down like this:
- You have a number of data files of identical structure and you want to repeat the same analysis on each data file.
- Begin by creating a new workbook.
- Import a representative data file.
- Perform your analysis (and any related graphing operations) on the data.
- Include any analysis-related graphs, matrixes, etc. in your workbook.
- “Clone” the current workbook and all associated analyses, by feeding in a series of fresh data files.
An example of such a clone import operation is demonstrated in this brief tutorial wherein a group of .DAT files is imported and plotted and a linear fit performed on each dataset, creating an orderly, self-contained record for each file processed. For some, clone import will be all that is needed to process their data files.
As in the tutorial case, if all analyses and graphs can be contained in a single workbook, you can save the cloned workbook as an Analysis Template (File: Save Workbook As Analysis Template). While saving an Analysis Template is not a prerequisite for clone import , it will allow you to repeat the same set of analysis and graphing operations on new data files at some later date.
If all analyses and graphs cannot be contained in a single workbook, there is another “cloning” option: You can save the project file complete, then clone the entire project (File: Clone Current Project). Imported data will be cleared but all child windows, plus contained analysis operations and dependent graphs, will be saved and updated with the import of new data.
Watch this short video to learn the basics of cloning a project and how you can use this for repetitive analyses with new data.
Origin’s Batch Processing tool brings more power and flexibility to the task of applying a uniform set of analysis and graphing operations to a series of datasets, including:
- More saved settings options: Use a dialog Theme and/or saved Analysis Template to recall groups of saved settings or analysis tasks.
- More input options: (a) Import from files; or (b) process data that is already in the current project.
- More output options including workbook-based Summary reports, MS Word and PDF documents.
- Optional scripts that can run before or after each process, or when processing is complete.
Similar to the cloning tutorial, this simple batch processing tutorial demonstrates importing a group of files, performing a linear fit on each and then outputting the results to a new Summary sheet. Being able to aggregate output into a separate summary sheet is not something that you can do when cloning a workbook/Analysis Template, so we begin to see the increased flexibility that the Batch Processing tool provides.
In an another example of the expanded reporting capabilities of Origin’s Batch Processing tool, see this tutorial, wherein a bookmarked MS Word template is used to extract analysis results from an Origin project and output a summary report in PDF format.
Further, the Batch Processing tool supports running scripts before and after files are processed. Even if you are not a skilled programmer, this can be very useful option for processing your data. For instance, most of Origin’s analysis dialog boxes are created with something called an X-Function. One very-cool feature of these X-Function dialogs is that you can (1) set your analysis and output options and (2) capture these settings in a one-line script by simply clicking the Dialog Theme menu common to all of these dialogs then choosing Generate Script. You can then include the generated script in a longer script or paste it directly into the appropriate script box in your Batch Processing tool, and run the script during batch operations.
Batch Peak Analysis Using Theme
As the name implies, Batch Peak Analysis Using Theme allows you to batch process peak data, using an Analysis Theme. That Theme is built and saved using Origin’s Peak Analyzer tool and is then specified in the Batch Peak Analysis Using Theme dialog box when setting up the batch analysis.
Note that some Peak Analyzer functions are available in standard Origin, but peak fitting is available only in OriginPro. Therefore, if you are planning to use Batch Peak Analysis to fit peak data, you must have OriginPro.
Like the Batch Processing tool, the Batch Peak tool supports scripts before and after each process or at the end of all processes. For example, in the tutorial Batch Peak Analysis Using Theme with Script Before Each Process, a script is used to remove excess noise from each dataset. However, as with other batch analyses in Origin, scripting is not an essential part of the process.
Apps: Another Possible Source of Batch Tools
One other thing we should mention is that OriginLab makes available free add-on Apps, some of which may be helpful in your batch analyses. To see current offerings, press F10 to launch the App Center and search on the keyword batch.
Our friendly and excellent Tech Support staff often get inquiries indicating that many Origin users are unaware of Origin’s powerful batch features; or that they do not know how to put them to use. We hope that this blog post will help you better understand Origin’s batch analysis options and perhaps inspire you to think about how they could help you to improve your workflow.