Tutorial Contents

Batch process

Single operations

Sequence of operations

Contents

Batch process

DataView can batch process files – this means it can apply a user-defined series of operation to a user-selected series of files, without having to explicitly call up the commands for each operation and each file in sequence. Batch processing can be applied to operations contained within two menus; Transform and Event edit. The Transform menu contains operations that alter the data themselves, while the Event edit menu contains operations that alter events.

Batch processing is supported at two levels: that of single operations, and that of a series of operations to be applied in sequence.

Single operations

Operations that support the batch facility at the individual level have a Batch checkbox within the dialog specifying the parameters of the operation. If you check this box, then when you click OK on the parameter dialog, instead of the operation being applied immediately to the active file, you are presented with a Select ALL files to process dialog in which you select the files to which wish the operation to be applied. You must include the active file itself in your selection if you wish to process the active file. When you dismiss the file selection dialog, the operation is applied in turn to each of the selected files without further user intervention.

File naming for data transform operations

If you check the Write new file box in the parameter dialog then the transformed data are always written to a new dtvw-dat file. You do not explicitly choose names for each transformed file, but instead the new file name is automatically set to be the same as the original file name, but with _tr appended. Thus for an original file called data the transformed data will be written to a file called data_tr.

If you do not select the Write new file option, then the source file will simply be overwritten with the new data if the source file is a DataView dtvw-dat file. If the source file is an original data acquisition file, a new dtvw-dat file will be written with the same filename as the source file.

File naming for Event edit operations

Event edit operations do not have a Write new file option because they never change actual data. In non-batch mode Event edit operations require the user to confirm the changes by explicitly saving the file. In batch mode, edited files are saved automatically, with the changes either written directly into the dtvw-dat file, or, in the case of original acquisition files (non-dtvw-dat), into the dtvw-hdr header file associated with the data file.

Sequences of operations

The Batch: Multi-process batch command allows you to specify a sequence of Transform and/or Event edit commands that can be applied to a series of specified files. Setting up the batch commands can be a bit complicated, and it is probably only worth doing if you have a lot of files to process. (It was originally implemented to accommodate a user who need to process several hundred files.) It is probably a good idea to go through the sequence manually on a trial file before setting up the batch, in order to get a sense of suitable parameters values for the processes.

Example: Detecting Spike Features

The file shows an intracellular recording, with a series of spikes arising from EPSPs, with occasional failures. The aim is to detect the peak of the second derivative of the membrane potential associated with each spike. Each peak represents a time when the rate-of-change of the voltage is changing most rapidly (i.e. the rate-of-change of the rate-of-change of voltage is maximal). This is sometimes used as an objective metric for specifying threshold. This can be done in DataView, but it requires several sequential operations. [Since first writing this section of the tutorial the analysis procedures have been incorporated into a single Spike Shape analysis feature, but this section is maintained since it illustrates multi-process batch activity.]

On the left of this dialog box is the Available list, which shows all the operations for which this facility is available. The operations are organized in a tree-like structure that more-or-less replicates the organization of the individual menu commands.

At this stage the dialog should look like this:

Multi-process batch dialog
The Multi-Process Batch dialog.

You are now ready to go. However, if you wanted to check or adjust any process, select it in the To do list and click the re-Config button. Also, it might be sensible to save your choices, in case you want to re-use them.

When you close the File open dialog, the batch process begins.

The transformed file should look like this: (I have zoomed in on the first spike for clarity, and made a few other cosmetic edits, but the data are exactly as produced by the series of transforms.)

Output of multi-batch process
Multi-batch process output. The upper trace is the original data. The lower trace is the second derivative of the data. Event channel a detected high derivative values by threshold. Event channel b locates the maximum derivative value within events in channel a.

Event channel b contains point processes that are located at the peaks of the 2nd derivative of the original data trace. These occur at the most rapid change in the rising inflection in the waveform, and this is a reasonable approximation to what experienced electrophysiologist might regard as the spike threshold.

 

File naming with Multi-process batch

The Multi-transform dialog has a Write new file option which operates similarly to that of the standard transform dialogs. If checked, the output file has the same filename as the input file, but with _tr appended; if unchecked, the output filename is the same as the input filename. All output files are dtvw-dat files, whatever the input file type.