are pre-defined sequences of operations that simplify repetitive processing operations.
They are most useful for processing large numbers of SIMILAR data
files, and for saving standardized protocols for future use. 'Similar'
files are files with identical numbers of channels and identical variable
types in the respective channels. If you attempt to use scripted
operations on dissimilar files, the
results will be unpredictable and probably undesirable, particularly
if the 'Automatic run' option is used. This is especially problematic if the 'save file' option is working and you overwrite and obliterate useful data.
Although most useful for processing large numbers of similarly formatted
files, scripts can also be used to save standardized protocols for future
use. The operations in a script are those invoked from the EDIT and some from the FILE
menu (see the following table for supported operations):
The following functions are available for scripting (some have not been tested in all possible permutations -- especially gas exchange calculations):
- Changing channels
- Copying channels
- Adjusting lag times
- Fixing baselines (automatic; periodic references; text entry of start and end points)
- Removing references
- Integral / derivative of channels
- Trim data
- Transformations and conversions (not all options tested)
- VO2, VCO2, VH2O
- Save, Save As (Save As should be the last step in the script)
Scripts are NOT suitable for analyses (such as basic stats, minimum/maximum, waveform, time series, etc.) -- these require user input (e.g., block selection) and must be performed after a script has finished.
To use a script, you must place it into the script handler. There
are two ways of doing this:
- Load a previously-recorded (and saved) script from disk.
Existing scripts can be saved with the SAVE SCRIPT option.
- Automatically record a new script by having the program copy
manipulations as you perform them.
Once a script is loaded into the script handler, you can make small alterations using the VIEW SCRIPT
Script operations are those normally invoked from the FILE and EDIT menus. Most -- BUT NOT ALL -- of these operations are scriptable. When editing or recording scripts, here are some other points to
keep in mind:
- A maximum of 40 operations can be programmed in a script.
- The 'Automatic run' button, when clicked, will run scripted
operations without user input.
After it is entered, a script is run from the RUN SCRIPT menu
selection. Unless stopped with the INTERRUPT SCRIPT button,
it will proceed through the sequence of steps without pausing,
and then halt. When a new file is loaded the script automatically
starts again. LabAnalyst remembers
most manipulation options, such as the number of smoothing steps, the channel
used for setting flow rate, etc., so that once they are selected during
the first script cycle, they automatically reappear during subsequent cycles.
Back to top
The SCRIPT menu selections are:
RECORD A SCRIPT Begins
'recording' subsequent manipulation and analysis operations. A white-on-red
edit field at the top of the plot area keeps track of the cumulative number
of script steps (remember that the maximum is currently 40 steps). CAUTION: it pays to think carefuly about the sequence
of operations you need to accomplish before starting to record.
HALT SCRIPT RECORDING...
Stops script recording. To process additional files with the recorded sequence of operations, use one of the RUN SCRIPT and 'automatic
run' commands, which will commence when the next file is loaded..
LOAD SCRIPT Loads
a script from disk, but does not run it. Note that the script file
formats for older LabAnalyst versions are not compatible with those
VIEW SCRIPT... This
option opens the script editing window (example below),
which contains a list of the sequence of operations in the script. You can use the 'change…' button for each operation to make minor adjustments. When 'change…' is clicked,a small window will open with the numeric parameters for that operation. You can edit the 'a', 'b', or exponent values for numeric conversions, or change to a different channel.
RUN SCRIPT [ALL FILES, when opened] Executes script instructions ('plays back' a script). The script will begin immediately after RUN SCRIPT is selected; subsequently it runs immediately when new files are loaded. In this mode, the script playback uses previously-stored parameters for transformations, etc. RUN SCRIPT [ONE FILE] Executes script instructions ('plays back' a script). The script will begin immediately after RUN SCRIPT is selected. However, the script will NOT run automatically when new files are loaded; instead, it will run after this menu option is selected. This lets the user perform small alterations to the file (spike removal, smoothing, etc.) before the automatic script operations are started. In this mode, the script playback uses previously-stored parameters for transformations, etc.
Halts script operations, but does not change the script itself. If
you interrupt a script and then restart it (with RUN SCRIPT), the
scripting operations don't commence until a new file is loaded.
Halts script operations and eliminates all script information from
memory. You will need to start scripting from scratch if this operation
QUIET SCRIPT RUNS Turns
off sounds during script operations.
SAVE SCRIPT Saves
a script from memory to a disk file, with this icon (in macOS):
that the script file formats for older LabAnalyst versions are not
compatible with those for current versions of the program.
Back to top