Common parameters

Some of the most commonly used parameters in nda scripts are demonstrated in the example script below.

#
#  Example nda script showing commonly used parameters
#
raster
all
raster

chan unit0
sampling 1000.0
start 100
period 1900

chan_file path/to/chan_list.txt
chan_file_out append

 . . . 

chan - the name of the channel, or set of records, in the input ndata file that is to be analyzed. If not specified, the channel is taken to be the first record name of the appropriate type for the analysis. By convention, the first channel of single unit spike data is called unit0. Valid channel names for any ndata file can be found using the nData browser application to open the ndata file.

sampling - the sampling unit for time (samples per second) that is to be used for the analysis. The value 1000.0 corresponds to milliseconds. If not specified, the sampling units are determined from the data file.

start - the start time (given in sampling units) for the analysis. In the example, the analysis will start at time 100 ms. If not specifed, the start time is determined from the data file.

period - the duration (given in sampling units) for the analysis. In the example, the analysis will include the epoch from 100 to 2000 ms, which is 1900 ms long. If not specified, the period is determined from the data file.

chan_file - when an nData file contains multiple channels (e.g., spikes recorded from different electrodes or different units), an analysis can be run on a list of channels. This parameter specifies the path (relative to the directory where the 'nda' analysis is to be executed) and filename of a text file that contains a list of channel names (one per line), for example,

unit0
unit1
unit2
unit4
For an analysis that requires 'chan1' and 'chan2' (e.g., spike train cross-correlation), then the 'chan_file' should have two columns.

There is a parameter chan_file_out that can be set to "separate" or "append", which should cause the outputs for each channel to either be put in separate files or appended within one file.

There is an alternative to this method, which does not require a channel list, and it is described under the Multiple channels link.