Table of Contents

Name

cdbl - ERP binlist file generator

Synopsis

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

Description

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.

Options

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

-vn
(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):
        .{2;3;4}{1024:rt}
        .{2;3;4}{1024:rt;1025:rt}
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.

-op
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:

    undtbr.s01 
    undtbf.s01 
    unndtbr.s01 
    unndtbf.s01 
    unpostbr.s01
    unpostbf.s01
    unnegtbr.s01
    unnegtbf.s01
    - 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
    calibration
    sd 0
    cal pulses  10 uV  200 msec
    .{*}
    cd 1
    STUDY DRAWINGS
    sd 1
    unique drawable, to-be-recognized
    .{1;2;3;4;5;6;7;8;9;10}{t<300-3500>1024:f<1>:op<0_hsdt>}
    sd 2
    unique drawable, to-be-forgotten
    .{1;2;3;4;5;6;7;8;9;10}{t<300-3500>1024:~f<1>:op<1_hsdt>}
    sd 3
    unique nondrawable, to-be-recognized
    .{301;302;303;304;305}{t<300-3500>1025:f<1>:op<2_hsdt>}
    sd 4
    unique nondrawable, to-be-recognized
    .{372;373;374;375;376}{t<300-3500>1025:f<1>:op<2_hsdt>}
    sd 5
    unique nondrawable, to-be-forgotten
    .{301;302;303;304;305}{t<300-3500>1025:~f<1>:op<3_hsdt>}
    sd 6
    unique nondrawable, to-be-forgotten
    .{372;373;374;375;376}{t<300-3500>1025:~f<1>:op<3_hsdt>}
    cd 2
    RECOGNIZE DRAWINGS
    sd 7
    junk
    .{999}
    cd 3
    STUDY WORDS
    sd 8
    unique positive, to-be-recognized 
    .{1;2;3;4;5;6;7;8;9;10}{t<300-3500>1024:f<1>:op<4_hsdt>}
    sd 9
    unique positive, to-be-recognized
    .{102;103;104;105;106}{t<300-3500>1024:f<1>:op<4_hsdt>}
    sd 10
    unique positive, to-be-forgotten
    .{1;2;3;4;5;6;7;8;9;10}{t<300-3500>1024:~f<1>:op<5_hsdt>}
    sd 11
    unique positive, to-be-forgotten
    .{102;103;104;105;106}{t<300-3500>1024:~f<1>:op<5_hsdt>}
    sd 12
    unique negative, to-be-recognized
    .{201;202;203;204;205}{t<300-3500>1025:f<1>:op<6_hsdt>}
    sd 13
    unique negative, to-be-recognized
    .{280;281;282;283;284}{t<300-3500>1025:f<1>:op<6_hsdt>}
    sd 14
    unique negative, to-be-forgotten
    .{201;202;203;204;205}{t<300-3500>1025:~f<1>:op<7_hsdt>}
    sd 15
    unique negative, to-be-forgotten
    .{280;281;282;283;284{t<300-3500>1025:~f<1>:op<7_hsdt>}
    cd 4
    RECOGNIZE WORDS
    sd 16
    junk
    .{999}

See Also

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

Diagnostics

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.

Author

Jonathan C. Hansen

Bugs

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