3. TOOLKIT DEMONSTRATION

Automation

Users of kSpectra Toolkit on OS X 10.4 and higher can take advantage of Automator. Automator comes complete with a library of hundreds of Actions already installed. Each Action is designed to perform a single task. Actions from the Automator library are added in sequence to a Workflow document. Each Action in the Workflow corresponds to an individual step that you would normally do to accomplish your task. The results of one action are seamlessly passed to the next action. After you create a Workflow, you execute it by clicking the Run button in the Workflow document window. Automator performs each step in the Workflow in order until your work is done.

kSpectra Toolkit Actions allow to accomplish repetitive manual tasks to analyze data quickly, efficiently and effortlessly. With one click of a mouse users can load data, analyze it, plot the results, save and print them. The WorkFlow can be saved, so user will remember how data has been analyzed. kSpectra Actions are based on kSpectra Scripting. AppleScript power users may find that using kSpectra Scripting directly can be more useful for intricate automative tasks.

To use kSpectra Toolkit Actions, simply start Automator and look for Actions in the Library under kSpectra heading. Simply drag-and-drop these Actions to the right column, which is a field for constructing Workflows, and combine them with Actions from other applications, if necessary.

Actions have input and output type that usually should match each other in the workflow. kSpectra Toolkit Actions use two specific types Data and Spectra, as well as system common File/Folders and Text. Following kSpectra Actions are available (actions in bold are functional only in a licensed copy or for data in example projects):

Data I/O : "Load Project", "Save Project", "Load Data", "Process Data", "SaveData", "Save Plots".

Spectral Estimation: 'MEM", "BT-FFT", "SSA", "MTM", "MSSA" and "PCA"

Reconstruction and Prediction: "SSA Reconstruction/Prediction", "MTM Reconstruction" ,"MSSA Reconstruction/Prediction", "Univariate Gap Filling", "Multivariate Gap Filling" and "PCA Reconstruction"

Plotting: "Plot Spectra", "Plot Data".

A simple Workflow is shown below, where data is loaded from a single data (or project) file, processed by one of the tools, and result is plotted:

Similar simple WorkFlows are included in each of the Examples in the kSpectra distribution.

Automation folder in Examples demonstrates more advanced workflows, where data from multiple sources (files) is processed by multiple analysis tools. In the next WorkFlow data is loaded as vectors from three files and processed sequentially by BT-FFT, saving plots of spectral estimates to the disk. Then, data is loaded again to be processed by MEM, and by selecting Ignore Results from Previous Action the results from the first part of the workflow do not interfere with results of the 2nd part.

Next WorkFlow consists of two analysis parts involving SSA and MTM, but the source of data is now a project file, which is also have to be loaded twice. However, when a new project file is loaded all existing data and plots are automatically deleted, and so there is no connection between SSA and MTM parts of the WorkFlow.

Automator is a new and still evolving feature of Mac OS X and we frequently update kSpectra Toolkit Actions. If you installed a new version of kSpectra and are user of its Automator Actions, it is important to clear the Automator cache by holding down the option key when starting for a first time after installation your existing Workflows. Sometimes you also will need to replace actions from your Workflows with a new ones from updated Automator library, if you are instructed so in the Release notes.