Table of Contents


cdbl - ERP binlist file generator


cdbl bdf log blf srate [-c] [-v<0-3>] [-rt rtfile] [-op]


cdbl uses specifications in bdf(5) (a bin descriptor file) to process log (an ERP log file) to create blf, a binlist file which contains a list of the single trials and the bins into which they should be averaged by avg(1) . The actual contingencies and bin specifications are contained in the bin descriptor file (bdf), the format of which is detailed in the bdf man page. The sampling rate (srate) needs to be input in order to calculate the absolute time between events, as event times in the log file are in units of sampling clock ticks.

An output summary is produced which includes the number of events placed in each bin as well as the condition and bin descriptors.


causes all the flags in the log file to be cleared prior to actual processing.

(where n is a number between 0 and 3) specifies the level of verbosity: -v0 is quiet, no messages are output whatsoever; -v1 indicates to output error messages only; -v2 indicates to output the normal amount of messages (this is the default); and -v3 requests that the program be absolutely chatty.

-rt rtfile
generate reaction times in the file rtfile. This option works in concert with the ’rt’ specifier in the bin descriptor file; when an event is found to match one of the bin descriptors, and the ’:rt’ specifier is present after the event code in the descriptor, i.e (see the bdf man page):
a line is output to rtfile that details the event, the response, the reaction time, and the bin number. If the -rt option is not given, any ’rt’ specifiers that may be present in the bin descriptor file are ignored.

another method for generating reaction times, as follows.

Add "hsdt" bits to bin descriptors, as in the sample bin descriptor file below

    - 50 RT bins are allowed, from 0 to 49
    - 0_hsdt, 1_hsdt, etc  are index names only, the corresponding file
      names to be created by hsdt are supplied by a separate list of
      filenames (see below)
    - Note that different bins can have the same hsdt #, as in bins
      5 and 6 below.  The RTs for bins 5 and 6 will appear in the same
      output file.
    - Bin descriptors using hsdt must also contain a range of acceptable
      RTs: .{event codes}{t<lowtime-hightime>buttoncode:op<#_hsdt>}
    - Flags in the bin descriptors (as used below) are optional.

Create a file which contains the names of files to-be-created, one per line. I will call this file "names". For the bdf below, the "names" file might look like this:

    - first line in "names" file corresponds to 0_hsdt in bdf file,
      second line to 1_hsdt in bdf file, etc.
    - Note that CDBL will *not* append to an existing
      output file.  Each run of CDBL must create new RT files, if you
      supply names of existing files, CDBL will complain that the 
      files already exist and will not append or overwrite those files.
      This means that for a two-session exp, you must create separate
      RT files for each session/logfile.

Invoke cdbl by typing
       cdbl bdf logfile binlist samprate -op < names

OR you can skip the input redirection and type the RT filenames interactively

The RT output files are ascii, trimming and summing are up to you.

    cd 0
    sd 0
    cal pulses  10 uV  200 msec
    cd 1
    sd 1
    unique drawable, to-be-recognized
    sd 2
    unique drawable, to-be-forgotten
    sd 3
    unique nondrawable, to-be-recognized
    sd 4
    unique nondrawable, to-be-recognized
    sd 5
    unique nondrawable, to-be-forgotten
    sd 6
    unique nondrawable, to-be-forgotten
    cd 2
    sd 7
    cd 3
    sd 8
    unique positive, to-be-recognized 
    sd 9
    unique positive, to-be-recognized
    sd 10
    unique positive, to-be-forgotten
    sd 11
    unique positive, to-be-forgotten
    sd 12
    unique negative, to-be-recognized
    sd 13
    unique negative, to-be-recognized
    sd 14
    unique negative, to-be-forgotten
    sd 15
    unique negative, to-be-forgotten
    cd 4
    sd 16

See Also

avg(1) , avg_manual(7) , bdf(5) , cdbl(1) , cdbl_manual(7) , erp_overview(7)


cdbl attempts to inform the user of the cause of any problems it encounters. Unfortunately, cdbl can be fooled easily, and often the error message is evoked by statements beyond the actual problem. At least the line numbers are correct.


Jonathan C. Hansen


cdbl is not elegant, nor is it easy to write complex bin descriptor files. The alternative, however, is to create binlist files by hand, or to write specialized programs to sort trials for specific experiments.

Table of Contents