xavr - ERP Data Viewer

Contents

Synopsis


-----------------------------------------------------------------------------
EEP 3.1  Max-Planck-Institute of Cognitive Neuroscience 1996-99
xavr 3.45   (OSF1 V4.0 alpha)                 Wed Sep 15 13:30:19 1999
-----------------------------------------------------------------------------
  xavr <cfg> [<cfg> ...] [<avr in> ...] [options]

options:
  -p [<dir>]     create an average file list from <dir> and its subdirs
                 if <dir> is omitted, the current directory is used
  -G <gav cfg>   create an average file matrix from the avraverage cfg
  -f <fir file>  enable FIR filtering of the displayed averages
  -r <reref cfg> enable referencing of the displayed averages
  -e             display ERP (default if nothing of [-edvs] is set)
  -d             display difference signal
  -v             display standard deviation band
  -s             display significance
  -t             display standard error of mean
  -D <dat file>  sensor positions for potential maps
  -N <number>    number of mesh control points for map interpolation
  -P <ps file>   write PostScript file(A4-Landscape) and exit
  -w             don't popup dialog windows at startup
  -S             slave mode, honor remote control requests


Description

xavr is the interactive exploration tool for ERP study data generated by EEP or, in other words, a powerful viewer for .avr files.

Specifically, xavr can

Configuration

Configuration File

A xavr configuration file is a layout description of one page of graphic objects, suitable for generating screen(Xlib) and PostScript output, and is described seperately.

Look at the files xavr*.cfg in the EEP configuration directory. Use one to start xavr, do your modifications and save your own version (Edit - Configuration...)

Resources

app-defaults/Xavr

Some more permanent dialog settings (current size/position, entered values) can be saved from within xavr (Options - Save Settings). They are stored as standard X resource lines in ~/.eep/xavr.resources. For xrdb gurus: these resources are written with full qualifiers and read after all other resources with lowest priority.

Usage

Collect Average Files

xavr needs a list or a matrix of average files which it can offer for processing or drawing. There are several possibilities to build up the list/matrix They are located in the command line and in the File menu:

To prepare a list of files:

To prepare a matrix of files:

The preparation of an average list/matrix has no effect to the display. Its only purpose is to give you access to the average files in a convenient way (without the need to surf up and down in the project directory tree). You have to use the selection dialogs to bring the data in the drawing.

Select Displayed Data

The Select menu gives you access to previously collected files.

The other buttons in the Select menu control which information is loaded/derived from the selected avr files. Note that not each avr file contains variance information.

Process Data

Using the buttons in the Process menu you can set some processing options which will either come into effect during the next drawing generation command (if Deferred Processing is set) or which are applied to the loaded files immediately.

For example, if your find an ERP too noisy and want to compare it with a low-pass filtered version, you could toggle Deferred Processing on, and load a .fir file. If you now Add the same file again in the selection dialog, the filtered ERP is displayed too. With Deferred Processing off, the displayed ERP is filtered immediately. This way is faster but gives no chance to compare different processing states of one file.

One should use the processing functions with care. For example, it might lead to some confusion if a rereferenced average file is rereferenced by the viewer again. For this reason, the processing options cannot be stored elsewhere, but few of them can be requested in the command line.

The legend dialog indicates the processing steps performed by xavr with some shortcuts:
  ref:    rereference
  bsl:    baseline
  gav:    grand average
  fir:    FIR filter
The data processing steps are always performed in the following order
load -> [ref] -> [bsl] -> [gav] -> [fir] -> draw
Note that no variance/significance information is available after rereferencing, baseline correction or filtering.

Potential Maps

Generals
xavr is capable to create contour plots of the spatial field strength distribution at a spheric surface(map). The sphere is unwrapped into the plane to allow 2D plots with acceptable distortions. To create a map you have to include map objects and the required template data in your configuration file. The avrinterpol docu page contains examples.

Normally, the maps are an optional aside. The most information is still in the time series view. And this view usually fills the whole page - no space is left to include map objects. Mainly to solve this problem, xavr supports multiple pages. You add pages via File - Open, where you must load a configuration file. You toggle between the different pages via the Window menu or with [Shift]+Ctrl+Tab.

Spatial Information
The required spatial information (at which location, the hell, is which damned electrode) must come from a .dat file (3Dspace head digitizer). You will normally need only one .dat file per sensor configuration (one per study) - it is not necessary to use the individual positions for each subject.

The .dat file may contain valid sensor positions for channels whose data are not available or not sufficient for generating potential maps. You have to remove these channels from the .dat file or your maps will become ugly! (i.e. bipolar EOG channels, shorted reserve channels...)

It is possible to request additional control points where the amplitude data come from a spheric spline interpolation. This results in smoother contours but costs some computation time. The number of points controls the map interpolation as follows (n is the number you enter and ndat is the number of valid sensor positions in the .dat file):

n = 0
no interpolation at all, a value of -1e30 is assigned if no ERP channel is available for an sensor in the .dat file(this is the default)
0 < n <= ndat
no additional control points, interpolation for sensor positions with missed ERP channels
ndat < n
insert additional control points, need interpolation always
xavr can load the spatial informations via the command line switches -D and -N and in the File - Load Sensor Positions dialog. xavr shows this dialog automatically if a map must be drawn but no mesh is prepared.

Map Sequence
There is a Edit - Create Map Sequence dialog which allows to create a list of map objects which show the same data file at different times. The dialog controls the time step between subsequent maps and the format of the maps. The resulting maps are arranged linewise as long there is enough space for it.

Algorithm of Potential Map Generation
  1. The sensor coordinates - measured at a real head surface - are projected to an unit sphere surface.
  2. The sensor coordinates at the unit sphere surface are unwrapped into the plane.
  3. If requested, additional control points are inserted in the plane.
  4. The area spanned by the control points in the plane (the smallest convex polygon covering all points) is decomposed into a set of non-overlapping triangles where all control points are triangle corners and vice versa (triangle mesh).
  5. A potential value is assigned to each control point in the triangle mesh. For all points without an assigned data channel, the potential values are interpolated. This results into the potential relief.
  6. The potential relief is intersected with horizontal planes at certain voltage levels. Each intersection of one triangle in space with one horizontal plane results in exact one straight intersection line. The intersection lines of all triangles at one voltage level form the "isopotential polygons" for this voltage level.
  7. The map you finally see is composed by the filled isopotential polygons (one color for each level) and - optionally - the outlines of the polygons(isopotential lines).

Interact with the Drawing

Zoom/Scroll
The drawing can be zoomed using the buttons/keyboard accelerators in the Options menu. You can also zoom a object to fit in the current viewport with the Zoom function from the context menu. In zoomed state, the context menu offers a Unzoom button which restores the previous view.

Button 1 pans the drawing - imagine you grab the sheet clicking onto it and move it below a frame. Keyboard scrolling is possible with cursor keys, Home, End, PageUp, PageDown.

Format
Most settings can be done only by editing the configuration file. But few things are possible in direct interaction. You can
Inspect
Diagram and map objects offer an Inspect button in the context menu. The inspect function for time series diagrams allows to look for peaks or to show signal values. For potential maps it allows to change the displayed time slice which gives nice animations of the potential distribution...

PostScript Plot

The drawing can be saved as a PostScript page description via the File - Print PostScript dialog. It offers two targets for the PostScript output: files and commands. Files are simply stored to disk. Print commands are executed in a shell subbrocess. The standard input of this process is fed with the xavr PostScript output, error and status output is catched by xavr.

There are some prepared print and preview commands available(configurable via resource file). Note that not each of this commands works at each machine. Note also that xavr is blocked until the shell subprocess terminates.

A special print command is avrps. This is a shell script which is intended to generate an A4 landscape PostScript screen preview at each machine. This script is also used as the File - Print Preview menu command.

The Current View option in the dialog allows to print the current content of the xavr window, scaled to fit in the output media. This option is useful if you need a selected piece of the drawing as enlarged plot or as EPS illustration for later use - just zoom/move/resize your window to show the desired area and send it out.


EEP 3.1 - MPI/ANT(eeprobe@ant-software.nl), 15.09.1999
Copyright © 1996-99 Max-Planck-Institute of Cognitive Neuroscience. All rights reserved.
CMYKclut]setcolorspace myimagedict @ `/Width iw |/Height ih |/Decode[0