Table of Contents

Name

normerp - normalize ERP data using calibration pulses

Synopsis

normerp input_data output_data [options]opt

Description

normerp is used to equalize the difference in gain between channels of ERP data and set the absolute voltage per point value. These inter-channel gain inequalities can arise at the polygraph, tape recorder, A/D converter, etc. Standard procedure is to record calibration pulses (condition code 0, bin 0) of known amplitude and polarity on all channels, and then scale the data after they are averaged so that the calibration pulses in all channels are of the same size. The absolute polarity and resolution of the data are fixed at this point. normerp performs this function by displaying the calibration pulses (bin 0 by default in the continuous data system) on the display_device, taking the input data the from input_data file and placing the normalized data in the output_data file. The user specifies the points on the calibration pulses which should be used to compute the size of the calibration pulses. Two cursors are used for this purpose; the voltages at the cursors determine the size of the calibration pulses. Optionally one can request that a certain number of points around each cursor be averaged together to improve resolution and accuracy. This is especially useful for noisy calibration data. The program is (purportedly) self-explanatory in interactive usage, although problems in determining the polarity of the cal. pulses can arise.

On invocation, normerp checks that the input data file can be opened, an X window display device is available, and that the output data file does not already exist. Then it displays the calibration bin on the display. Next, the user is prompted to enter various parameters regarding the calibration pulses and desired resolution of the output data. These include the cursor locations, size of the calibration pulses (in microvolts), the polarity of the data, and the eventual absolute resolution of the data in points per 10 microvolts. At this point normerp enters an interactive mode in which a menu of possible options is displayed which allows the user to specify how many points to average around the cursors, change the display gain, change the cursor locations, etc. In the interactive mode, no returns from the keyboard are required. When finally satisfied that the data are properly parameterized, selecting the menu option (o) k to normalize data will cause normerp to exit the interactive mode and prompt: Are you sure? Any response other than yes (or something beginning with a "Y") will cause reversion to interactive mode.

Some explication of the issues involved in supplying parameters to normerp is in order. Positive "up" on the screen implies that positive point values are active electrode positive voltages. Thus, if one connects the positive lead of the calibration box to the same input as the active scalp site(s) and the display on the screen during normalization shows these pulses to be "down", then the polarity of the data is positive down, and a -1 should be specified to normerp.

The desired resolution of the data is also fixed by the user using a parameter specifying the number of points per 10 microvolts. If the un-normalized data have more resolution than results after normalization using the specified number of points per 10 uVolts, it is lost; and while specifying a large number of points per 10 uVolts will magnify the data, the underlying accuracy/resolution can be no greater than was present in the un-normalized data.

To enhance the generality of the program and allow recovery from abnormal situations, a number of options are available on invocation. These include:

-a N
Average N points on either side of the cursors (including the point at the cursor) for a total of (2N+1) points.
-s display_scaling_factor
The display_scaling_factor is an arbitrary number whose default value is 5. Hence, to double the size of the display, enter 10, etc.
-f cal_file
Use cal_file for the calibration pulses used to calculate the normalization coefficients. The data to be normalized are still drawn from the input_data file and the normalized data placed in output_data. This option is included to allow one to recover from situations in which the calibartion pulses somehow didn’t make it into the input_data file. This is a dangerous option - one must be sure nothing changed between the time the subject’s data were recorded and the calibration pulses were recorded. Also, not that the cal_file CANNOT HAVE BEEN NORMALIZED before being used in this manner; if it has been the between channel gain differences will already have been eliminated!
-c cal_bin
Employ cal_bin as the bin in the input_data file containing the cal pulses. This is normally uses for test and diagnostic purposes only.
-n low_cursor hi_cursor cal_size polarity resolution
This option causes normerp to operate silently; no prompting is perform and no display is employed. It is used when one is sure everything is O.K. and the normalization parameters listed are known in advance. It is most useful in an automated shell script.

Files

/usr/local/erp/lib/graphicdevs
plotting device data base and filter information
specific plot device "normerpxwin" defined in here

See Also

erp_overview(7)

Diagnostics

As usual, meant to be self-explanatory and occurring because of so many sources they can’t all be listed. The most cryptic is:
Cal on channel xx is mighty weenie

meaning the difference in the pulses at the two cursors was less than 100 points. Hence, the data cannot be more accurately normalized than +_ 1 %.

Overflow can occur and causes normerp to print:

normerp - overflow on bin XX.

It may be possible to avoid this by specifying a smaller value for points per 10 uVolts. This sometimes occurs when a bin has very few sums. If overflow does occur and the data are not repaired, do not attempt to plot that bin.

Author

Jonathan C. Hansen    UCSD ERPL

Bugs

It is not possible to set cursors separately for each channel of data.


Table of Contents