Table of Contents


mdh - make digitization header (ERP DOS programs)


mdh - A program to create headers for use during digitization.
mdh is used to create a header file used by the dig program. It operates in an interactive manner and will remind the user if enough information has not yet been acquired. Basically, it waits for the user to type in a keyword and one or more arguments so it can set the associated parameter to the value supplied.
Each item entered is checked for validity, and mdh prints a "?" if the value is out of range or the parameter keyword is unknown. Online information is available while executing mdh by typing "help".


To use mdh, type:
    mdh header_file

This will start mdh going with the intention of producing a header file called header_file when all parameters have been acquired. As usual, just type mdh to get a clue as to the proper invocation command. mdh prompts the user with a colon (:) when it is ready for more input at the command level.
Once running, mdh waits for the user to type a keyword. Four special keywords are:

help - causes mdh to print out a list of all keywords. what - causes mdh to print out the current value of all parameters, and write - asks mdh to attempt writing out the parameters and exiting. options - mdh will print out optional parameters not checked prior to writing.
The write command will not work unless all required parameters are set. Here is a list of the parameters which employ integer arguments on the same line as the keyword:
    Keyword        #args    Hilimit    Lolimit    Required?

    nchans        1      16       1      yes
    odelay        1     256    -256      yes
    srate        1     768      10      yes    
    cprecis        1      2       1       no

These are relatively straightforward.
    nchans - number of channels to digitize

    srate - sampling rate in Hz.

    odelay - delay from trigger to stimulus (not presampling,
        which is specified at averaging time. This
        value is required because averaging combines
        the odelay with the requested presampling and
        produces the appropriate prestimulus presampling
        interval. Thus, the presampling value is the
        total prestimulus period. Onset delay is set
        to zero at this point so no confusion arises
        further on down the line. So, it is important
        to fill in odelay with the correct value for
        further processing and proper calculation
        of latencies.
        Negative values for odelay indicate the event
        precedes the trigger by the absolute value of
        of the number given ( in milliseconds ).

    cprecis - epoch precision. Initially one and variable
        after digitization, it will be removed soon.

The remaining keywords acquire a string of characters from the line following the keyword:
    PXM 24-NOV-80 up to 40 chars

    a description of the overall experiment

These are pretty much self explanatory. Both can accept up to 40 characters. The final ascii field is the channel descriptors. These are entered on a line following chndesc (alone on a line) and can be 1 to 4 characters each without embedded tabs, commas, or spaces. They are entered serially on the line with blanks separating each one, and correspond to the channels in order starting from 0. Here is an example of commands to mdh to create a headerfile for subject Potentialus Maximus recording Fz as channel 0, Cz as 1, and Pz as 2, at 384 Hz.
    chans 3
    odelay 100
    srate 384
    P.M. 31-SEPT-80 anencephalic subject
    Auditory attention exp. 1
    FZ CZ PZ
Any command can be entered in any order.

Hints on Using mdh

It is often desirable to change only the subject description and leave all other parameters the same when running many subjects in an experiment. This can be done in a number of ways. One is to create a file using the editor with commands (as above) in it. Then, when a headerfile for a new subject is needed, simply edit the command file so that it reflects the new subjects name. Then it can be used as input to the mdh program by redirecting the "standard input" thus:

    mdh dighead.s03 < dighead.mdh

assuming that "dighead.mdh" is tha name of the file containing commands for the mdh program, and the dighead.s03 is the name of the headerfile that needs creation.
It is also possible to use edhead, the header editor to change digitization headers. If one wishes to employ this approach, see the summary (manual) entry on edhead.
Good Luck.

Table of Contents