Contents
The raw data processor mne_browse_raw is designed for simple raw data viewing and processing operations. In addition, the program is capable of off-line averaging and estimation of covariance matrices. mne_browse_raw can be also used to view averaged data in the topographical layout. Finally, mne_browse_raw can communicate with mne_analyze described in Interactive analysis with mne_analyze to calculate current estimates from raw data interactively.
mne_browse_raw has also an alias, mne_process_raw. If mne_process_raw is invoked, no user interface appears. Instead, command line options are used to specify the filtering parameters as well as averaging and covariance-matrix estimation command files for batch processing. This chapter discusses both mne_browse_raw and mne_process_raw.
See command-line documentation of mne_browse_raw and mne_process_raw.
The mne_browse_raw user interface contains the following areas:
The viewing and averaging tools allow quick browsing of the raw data with triggers, adding new triggers, and averaging on a single trigger.
The main data displays shows a section of the raw data in a strip-chart recorder format. The names of the channels displayed are shown on the left. The selection of channels is controlled from the selection dialog, see Selection. The length of the data section displayed is controlled from the scales dialog (Scales) and the filtering from the filter dialog (Filter). A signal-space projection can be applied to the data by loading a projection operator (Read projection). The selection of the projection operator items is controlled from the projection dialog described in Projection.
The control and browsing functions of the main data display are:
Selection of bad channels
If you click on a channel name the corresponding channel is marked bad or reinstated as an acceptable one. A channel marked bad is not considered in the artefact rejection procedures in averaging and it is omitted from the signal-space projection operations.
Browsing
Browsing through the data. The section of data displayed can be selected from the scroll bar at the bottom of the display. Additional browsing functionality will be discussed n In addition, if the strip-chart display has the keyboard focus, you can scroll back and forth with the page up and page down keys.
Selection of time points
When you click on the data with the left button, a vertical marker appears. If Show segments in full view and/or Show segments in sample view is active in the scales dialog (see Scales), a display of an epoch of data specified in the scales dialog will appear. For more information on full view, see Topographical data displays. Multiple time points can be selected by holding the control key down when clicking. If multiple time points are selected several samples will be shown in the sample and/or full view, aligned at the picked time point. The tool bar offers functions to operate on the selected time points, see The tool bar.
Range selection
Range selection. If you drag on the signals with the left mouse button and the shift key down, a range of times will be selected and displayed in the sample and/or full view. Note: All previous selections are cleared by this operation.
Saving a copy of the display
The right mouse button invokes a popup menu which allows saving of the display in various formats. Best quality is achieved with the Illustrator format. This format has the benefit that it is object oriented and can be edited in Adobe Illustrator.
Drag and drop
Graphics can be moved to one of the Elekta-Neuromag report composer (cliplab ) view areas with the middle mouse button.
Note
When selecting bad channels, switch the signal-space projection off from the projection dialog. Otherwise bad channels may not be easily recognizable.
Note
The cliplab drag-and-drop functionality requires that you have the proprietary Elekta-Neuromag analysis software installed. mne_browse_raw is compatible with cliplab versions 1.2.13 and later.
If the strip-chart display has the input focus (click on it, if you are unsure) the keyboard and mouse can be used to browse the data as follows:
Up and down arrow keys
Activate the previous or next selection in the selection list.
Left and right arrow keys
If a single time point is selected (green line), move the time point forward and backward by \(\pm 1\) ms. If the shift key is down, the time point is moved by \(\pm 10\) ms. If the control key is down (with or without shift), the time point is moved by \(\pm 100\) ms. If mne_browse_raw is controlling mne_analyze (see Interacting with mne_analyze), the mne_analyze displays will be updated accordingly. If the picked time point falls outside the currently displayed section of data, the display will be automatically scrolled backwards or forwards as needed.
Rotate the mouse wheel or rotate the trackball up/down
Activate the previous or next selection in the selection list.
Rotate the trackball left/right or rotate the wheel with shift down
Scroll backward or forward in the data by one screen. With Alt key (Command or Apple key in the Mac keyboard), the amount of scrolling will be \(1\) s instead of the length of one screen. If shift key is held down with the trackball, both left/right and up/down movements scroll the data in time.
Note
The trackball and mouse wheel functionality is dependent on your X server settings. On Mac OSX these settings are normally correct by default but on a LINUX system some adjustments to the X server settings maybe necessary. Consult your system administrator or Google for details.
In mne_browse_raw and mne_process_raw events mark
interesting time points in the data. When a raw data file is opened,
a standard event file is consulted for the list of events. If this
file is not present, the digital trigger channel, defined by the –digtrig option
or the MNE_TRIGGER_CH_NAME
environment variable is
scanned for events. For more information, see the command-line references
for mne_browse_raw and mne_process_raw.
In addition to the events detected on the trigger channel, it is possible to associate user-defined events to the data, either by marking data points interactively as described in Defining annotated events or by loading event data from files, see Loading and saving event files. Especially if there is a comment associated with a user-defined event, we will sometimes call it an annotation.
If a data files has annotations (user-defined events) associated
with it in mne_browse_raw , information
about them is automatically saved to an annotation file when a data file is closed, i.e.,
when you quit mne_browse_raw or
load a new data file. This annotation file is called <raw data file name without fif extension> -annot.fif
and
will be stored in the same directory as the raw data file. Therefore,
write permission to this directory is required to save the annotation
file.
Both the events defined by the trigger channel and the user-defined events have three properties:
The Windows/Show event list… menu choice shows a window containing a list of currently defined events. The list can be restricted to user-defined events by checking User-defined events only . When an event is selected from the list, the main display jumps to the corresponding time. If a user-defined event is selected, it can be deleted with the Delete a user-defined event button.
Using the Load/Save events choices in the file menu, events can be saved in text and fif formats, see Event files, below. The loading dialogs have the following options:
Match comment with
Only those events which will contain comments and in which the comment matches the entered text are loaded. This filtering option is useful, e.g., in loading averaging or covariance matrix computation log files, see Common parameters and Common parameters. If the word omit is entered as the filter, only events corresponding to discarded epochs are loaded and the reason for rejection can be investigated in detail.
Add as user events
Add the events as if they were user-defined events. As a result, the annotation file saved next time mne_browse_raw closes this raw file will contain these events.
Keep existing events
By default, the events loaded will replace the currently defined ones. With this option checked, the loaded event will be merged with the currently existing ones.
The event saving dialogs have the following options controlling the data saved:
Save events read from the data file
Save only those event which are not designated as user defined. These are typically the events corresponding to changes in the digital trigger channel. Another possible source for these events is an event file manually loaded without the Add as user events option.
Save events created here
Save the user-defined events.
Save all trigger line transitions
By default only those events which are associate with a transition from zero to non-zero value are saved. These include the user-defined events and leading edges of pulses on the trigger line. When this option is present, all events included with the two above options are saved, regardless the type of transition indicated (zero to non-zero, non-zero to another non-zero value, and non-zero value to zero).
Note
If you have a text format event file whose content you want to include as user-defined events and create the automatic annotation file described in Overview, proceed as follows:
The directory in which the raw data file resides now contains
an annotation file which will be automatically loaded each time
the data file is opened. A text format event file suitable for this
purpose can be created manually, extracted from an EDF+ file using
the --tal
option in mne_edf2fiff, or produced by custom
software used during data acquisition.
The Windows/Show annotator… shows a window to add annotated user-defined events. In this window, the buttons in first column mark one or more selected time points with the event number shown in the second column with an associated comment specified in the third column. Marking also occurs when return is pressed on any of the second and third column text fields.
When the dialog is brought up for the first time, the file $HOME/.mne/mne_browse_raw.annot is consulted for the definitions of the second and third column values, i.e., event numbers and comments. You can save the current definitions with the Save defs button and reload the annotation definition file with Load defs . The annotation definition file may contain comment lines starting with ‘%’ or ‘#’ and data lines which contain an event number and an optional comment, separated from the event number by a colon.
Note
If you want to add a user-defined event without an a comment, you can use the Picked to item in the tool bar, described in The tool bar.
A text format event file contains information about transitions
on the digital trigger line in a raw data file. Any lines beginning
with the pound sign (#
) are considered as comments.
The format of the event file data is:
<sample> <time> <from> <to> <text>
where
** <sample>**
is the sample number. This sample number takes into account the initial empty space in a raw data file as indicated by the FIFF_FIRST_SAMPLE and/or FIFF_DATA_SKIP tags in the beginning of raw data. Therefore, the event file contents are independent of the Keep initial skip setting in the open dialog.
** <time>**
is the time from the beginning of the file to this sample in seconds.
** <from>**
is the value of the digital trigger channel at <sample> -1.
** <to>**
is the value of the digital trigger channel at <sample> .
** <text>**
is an optional annotation associated with the event. This comment will be displayed in the event list and on the message line when you move to an event.
When an event file is read back, the <sample> value will be primarily used to specify the time. If you want the <time> to be converted to the sample number instead, specify a negative value for <sample> .
Each event file starts with a “pseudo event” where both <from> and <to> fields are equal to zero.
Warning
In previous versions of the MNE software, the event files did not contain the initial empty pseudo event. In addition the sample numbers did not take into account the initial empty space in the raw data files. The present version of MNE software is still backwards compatible with the old version of the event files and interprets the sample numbers appropriately. However, the recognition of the old and new event file formats depends on the initial pseudo event and, therefore, this first event should never be removed from the new event files. Likewise, if an initial pseudo event with <from> and <to> fields equal to zero is added to and old event file, the results will be unpredictable.
Note
If you have created Matlab, Excel or other scripts to process the event files, they may need revision to include the initial pseudo event in order for mne_browse_raw and mne_process_raw to recognize the edited event files correctly.
Note
Events can be also stored in fif format. This format can be read and written with the Matlab toolbox functions mne_read_events and mne_write_events .
The tool bar controls are shown in The tool bar controls.. They perform the following functions:
start/s
Allows specification of the starting time of the display as a numeric value. Note that this value will be rounded to the time of the nearest sample when you press return. If you click on this text field, you can also change the time with the up and down cursor keys (1/10 of the window size), and the page up and down (or control up and down cursor) keys (one window size).
Remove dc
Remove the dc offset from the signals for display. This does not affect the data used for averaging and noise-covariance matrix estimation.
Keep dc
Return to the original true dc levels.
Jump to
Enter a value of a trigger to be searched for. The arrow buttons jump to the next event of this kind. A selection is also automatically created and displayed as requested in the scales dialog, see Scales. If the ‘+’ button is active, previous selections are kept, otherwise they are cleared.
Picked to
Make user events with this event number at all picked time points. It is also possible to add annotated user events with help of the annotation dialog. For further information, see Events and annotations.
Forget
Forget desired user events.
Average
Compute an average to this event.
The tool bar status line shows the starting time and the length of the window in seconds as well as the cursor time point. The dates and times in parenthesis show the corresponding wall-clock times in the time zone where mne_browse_raw is run.
Note
The wall-clock times shown are based on the information in the fif file and may be offset from the true acquisition time by about 1 second. This offset is constant throughout the file. The times reflect the time zone setting of the computer used to analyze the data rather than the one use to acquire them.
Segments of data can shown in a topographical layout in the Full view window, which can be requested from the Scale dialog
or from the Windows menu. Another
similar display is available to show the averaged data. The topographical
layout to use is selected from Adjust/Full view layout… ,
which brings up a window with a list of available layouts. The default
layouts reside in $MNE_ROOT/share/mne/mne_analyze/lout
.
In addition any layout files residing in $HOME/.mne/lout
are listed.
The format of the layout files is the same as for the Neuromag programs xplotter and xfit .
A custom EEG layout can be easily created with the mne_make_eeg_layout utility,
see mne_make_eeg_layout.
Several actions can be performed with the mouse in the topographical data display:
Left button
Shows the time and the channel name at the cursor at the bottom of the window.
Left button drag with shift key
Enlarge the view to contain only channels in the selected area.
Right button
Brings up a popup menu which gives a choice of graphics output formats for the current topographical display. Best quality is achieved with the Illustrator format. This format has the benefit that it is object oriented and can be edited in Adobe Illustrator.
Middle button
Drag and drop graphics to one of the cliplab view areas.
Note
The cliplab drag-and-drop functionality requires that you have the proprietary Elekta-Neuromag analysis software installed. mne_browse_raw is compatible with cliplab versions 1.2.13 and later.
Note
The graphics output files will contain a text line stating of the time and vertical scales if the zero level/time and/or viewport frames have been switched on in the scales dialog, see Scales.
For averaging tasks more complex than those involving only
one trigger, the averaging parameters are specified with help of
a text file. This section describes the format of this file. A sample
averaging file can be found in $MNE_ROOT/share/mne/mne_browse_raw/templates
.
Any line beginning with the pound sign (#) in this description
file is a comment. Each parameter in the description file is defined
by a keyword usually followed by a value. Text values consisting
of multiple words, separated by spaces, must be included in quotation
marks. The case of the keywords in the file does not matter. The
ending .ave
is suggested for the average description
files.
The general format of the description file is:
average {
<common parameters>
category {
<category definition parameters>
}
...
}
The file may contain arbitrarily many categories. The word category
interchangeable
with condition
.
Warning
Due to a bug that existed in some versions of the Neuromag acquisition software, the trigger line 8 is incorrectly decoded on trigger channel STI 014. This can be fixed by running mne_fix_stim14 on the raw data file before using mne_browse_raw or mne_process_raw . The bug has been fixed on Nov. 10, 2005.
The average definition starts with the common parameters. They include:
outfile <*name*>
The name of the file where the averages are to be stored. In interactive mode, this can be omitted. The resulting average structure can be viewed and stored from the Manage averages window.
eventfile <*name*>
Optional file to contain event specifications. If this file is present, the trigger events in the raw data file are ignored and this file is consulted instead. The event file format is recognized from the file name: if it ends with.fif
, the file is assumed to be in fif format, otherwise a text file is expected. The text event file format is described in Event files.
logfile <*name*>
This optional file will contain detailed information about the averaging process. In the interactive mode, the log information can be viewed from the Manage averages window.
gradReject <*value / T/m*>
Rejection limit for MEG gradiometer channels. If the peak-to-peak amplitude within the extracted epoch exceeds this value on any of the gradiometer channels, the epoch will be omitted from the average.
magReject <*value / T*>
Rejection limit for MEG magnetometer and axial gradiometer channels. If the peak-to-peak amplitude within the extracted epoch exceeds this value on any of the magnetometer or axial gradiometer channels, the epoch will be omitted from the average.
eegReject <*value / V*>
Rejection limit for EEG channels. If the peak-to-peak amplitude within the extracted epoch exceeds this value on any of the EEG channels, the epoch will be omitted from the average.
eogReject <*value / V*>
Rejection limit for EOG channels. If the peak-to-peak amplitude within the extracted epoch exceeds this value on any of the EOG channels, the epoch will be omitted from the average.
ecgReject <*value / V*>
Rejection limit for ECG channels. If the peak-to-peak amplitude within the extracted epoch exceeds this value on any of the ECG channels, the epoch will be omitted from the average.
gradFlat <*value / T/m*>
Signal detection criterion for MEG planar gradiometers. The peak-to-peak value of all planar gradiometer signals must exceed this value, for the epoch to be included. This criterion allows rejection of data with saturated or otherwise dysfunctional channels. The default value is zero, i.e., no rejection.
magFlat <*value / T*>
Signal detection criterion for MEG magnetometers and axial gradiometers channels.
eegFlat <*value / V*>
Signal detection criterion for EEG channels.
eogFlat <*value / V*>
Signal detection criterion for EOG channels.
ecgFlat <*value / V*>
Signal detection criterion for ECG channels.
stimIgnore <*time / s*>
Ignore this many seconds on both sides of the trigger when considering the epoch. This parameter is useful for ignoring large stimulus artefacts, e.g., from electrical somatosensory stimulation.
fixSkew
Since the sampling of data and the stimulation devices are usually not synchronized, all trigger input bits may not turn on at the same sample. If this option is included in the off-line averaging description file, the following procedure is used to counteract this: if there is a transition from zero to a nonzero value on the digital trigger channel at sample \(n\), the following sample will be checked for a transition from this nonzero value to another nonzero value. If such an event pair is found, the two events will be jointly considered as a transition from zero to the second non-zero value. With the fixSkew option, mne_browse_raw/mne_process_raw behaves like the Elekta-Neuromag on-line averaging and Maxfilter (TM) software.
name <*text*>
A descriptive name for this set of averages. If the name contains multiple words, enclose it in quotation marks “like this”. The name will appear in the average manager window listing in the interactive version of the program and as a comment in the processed data section in the output file.
A category (condition) is defined by the parameters listed in this section.
event <*number*>
The zero time point of an epoch to be averaged is defined by a transition from zero to this number on the digital trigger channel. The interpretation of the values on the trigger channel can be further modified by the ignore and mask keywords. If multiple event parameters are present for a category, all specified events will be included in the average.
ignore <*number*>
If this parameter is specified the selected bits on trigger channel values can be mask (set to zero) out prior to checking for an existence of an event. For example, to ignore the values of trigger input lines three and eight, specifyignore 132
(\(2^2 + 2^7 = 132\)).
mask <*number*>
Works similarly to ignore except that a mask specifies the trigger channel bits to be included. For example, to look at trigger input lines one to three only, ignoring others, specifymask 7
(\(2^0 + 2^1 + 2^2 = 7\)).
prevevent <*number*>
Specifies the event that is required to occur immediately before the event(s) specified with event parameter(s) in order for averaging to occur. Only one previous event number can be specified.
prevignore <*number*>
Works like ignore but for the events specified with prevevent . If prevignore and prevmask are missing, the mask implied by ignore and mask is applied to prevevent as well.
prevmask <*number*>
Works like mask but for the events specified with prevevent . If prevignore and prevmask are missing, the mask implied by ignore and mask is applied to prevevent as well.
nextevent <*number*>
Specifies the event that is required to occur immediately after the event(s) specified with event parameter(s) in order for averaging to occur. Only one next event number can be specified.
nextignore <*number*>
Works like ignore but for the events specified with nextevent . If nextgnore and nextmask are missing, the mask implied by ignore and mask is applied to nextevent as well.
nextmask <*number*>
Works like mask but for the events specified with nextevent . If nextignore and nextmask are missing, the mask implied by ignore and mask is applied to nextevent as well.
delay <*time / s*>
Adds a delay to the time of the occurrence of an event. Therefore, if this parameter is positive, the zero time point of the epoch will be later than the time of the event and, correspondingly, if the parameter is negative, the zero time point of the epoch will be earlier than the event. By default, there will be no delay.
tmin <*time / s*>
Beginning time point of the epoch.
tmax <*time / s*>
End time point of the epoch.
bmin <*time / s*>
Beginning time point of the baseline. If bothbmin
andbmax
parameters are present, the baseline defined by this time range is subtracted from each epoch before they are added to the average.
basemin <*time / s*>
Synonym for bmin.
bmax <*time / s*>
End time point of the baseline.
basemax <*time / s*>
Synonym for bmax.
name <*text*>
A descriptive name for this category. If the name contains multiple words, enclose it in quotation marks “like this”. The name will appear in the average manager window listing in the interactive version of the program and as a comment averaging category section in the output file.
abs
Calculate the absolute values of the data in the epoch before adding it to the average.
stderr
The standard error of mean will be computed for this category and included in the output fif file.
Note
Specification of the baseline limits does not any more imply the estimation of the standard error of mean. Instead, the stderr parameter is required to invoke this option.
Covariance matrix estimation is controlled by a another description
file, very similar to the average definition. A example of a covariance
description file can be found in the directory $MNE_ROOT/share/mne/mne_browse_raw/templates
.
Any line beginning with the pound sign (#) in this description
file is a comment. Each parameter in the description file is defined
by a keyword usually followed by a value. Text values consisting
of multiple words, separated by spaces, must be included in quotation
marks. The case of the keywords in the file does not matter. The
ending .cov
is suggested for the covariance-matrix
description files.
The general format of the description file is:
cov {
<*common parameters*>
def {
<*covariance definition parameters*>
}
...
}
The file may contain arbitrarily many covariance definitions,
starting with def
.
Warning
Due to a bug that existed in some versions of the Neuromag acquisition software, the trigger line 8 is incorrectly decoded on trigger channel STI 014. This can be fixed by running mne_fix_stim14 on the raw data file before using mne_browse_raw or mne_process_raw . This bug has been fixed in the acquisition software at the Martinos Center on Nov. 10, 2005.
The average definition starts with the common parameters. They include:
outfile <*name*>
The name of the file where the covariance matrix is to be stores. This parameter is mandatory.
eventfile <*name*>
Optional file to contain event specifications. This file can be either in fif or text format (see Event files). The event file format is recognized from the file name: if it ends with.fif
, the file is assumed to be in fif format, otherwise a text file is expected. If this parameter is present, the trigger events in the raw data file are ignored and this event file is consulted instead. The event file format is described in Event files.
logfile <*name*>
This optional file will contain detailed information about the averaging process. In the interactive mode, the log information can be viewed from the Manage averages window.
gradReject <*value / T/m*>
Rejection limit for MEG gradiometer channels. If the peak-to-peak amplitude within the extracted epoch exceeds this value on any of the gradiometer channels, the epoch will be omitted from the average.
magReject <*value / T*>
Rejection limit for MEG magnetometer and axial gradiometer channels. If the peak-to-peak amplitude within the extracted epoch exceeds this value on any of the magnetometer or axial gradiometer channels, the epoch will be omitted from the average.
eegReject <*value / V*>
Rejection limit for EEG channels. If the peak-to-peak amplitude within the extracted epoch exceeds this value on any of the EEG channels, the epoch will be omitted from the average.
eogReject <*value / V*>
Rejection limit for EOG channels. If the peak-to-peak amplitude within the extracted epoch exceeds this value on any of the EOG channels, the epoch will be omitted from the average.
ecgReject <*value / V*>
Rejection limit for ECG channels. If the peak-to-peak amplitude within the extracted epoch exceeds this value on any of the ECG channels, the epoch will be omitted from the average.
gradFlat <*value / T/m*>
Signal detection criterion for MEG planar gradiometers. The peak-to-peak value of all planar gradiometer signals must exceed this value, for the epoch to be included. This criterion allows rejection of data with saturated or otherwise dysfunctional channels. The default value is zero, i.e., no rejection.
magFlat <*value / T*>
Signal detection criterion for MEG magnetometers and axial gradiometers channels.
eegFlat <*value / V*>
Signal detection criterion for EEG channels.
eogFlat <*value / V*>
Signal detection criterion for EOG channels.
ecgFlat <*value / V*>
Signal detection criterion for ECG channels.
stimIgnore <*time / s*>
Ignore this many seconds on both sides of the trigger when considering the epoch. This parameter is useful for ignoring large stimulus artefacts, e.g., from electrical somatosensory stimulation.
fixSkew
Since the sampling of data and the stimulation devices are usually not synchronized, all trigger input bits may not turn on at the same sample. If this option is included in the off-line averaging description file, the following procedure is used to counteract this: if there is a transition from zero to a nonzero value on the digital trigger channel at sample \(n\), the following sample will be checked for a transition from this nonzero value to another nonzero value. If such an event pair is found, the two events will be jointly considered as a transition from zero to the second non-zero value.
keepsamplemean
The means at individual samples will not be subtracted in the estimation of the covariance matrix. For details, see Epochs. This parameter is effective only for estimating the covariance matrix from epochs. It is recommended to specify this option. However, for compatibility with previous MNE releases, keepsamplemean is not on by default.
The covariance definitions starting with def specify the epochs to be included in the estimation of the covariance matrix.
event <*number*>
The zero time point of an epoch to be averaged is defined by a transition from zero to this number on the digital trigger channel. The interpretation of the values on the trigger channel can be further modified by the ignore and mask keywords. If multiple event parameters are present in a definition, all specified events will be included. If the event parameter is missing or set to zero, the covariance matrix is computed over a section of the raw data, defined by thetmin
andtmax
parameters.
ignore <*number*>
If this parameter is specified the selected bits on trigger channel values can be mask (set to zero) out prior to checking for an existence of an event. For example, to ignore the values of trigger input lines three and eight, specifyignore 132
(\(2^2 + 2^7 = 132\)).
mask <*number*>
Works similarly to ignore except that a mask specifies the trigger channel bits to be included. For example, to look at trigger input lines one to three only, ignoring others, specifymask 7
(\(2^0 + 2^1 + 2^2 = 7\)).
delay <*time / s*>
Adds a delay to the time of the occurrence of an event. Therefore, if this parameter is positive, the zero time point of the epoch will be later than the time of the event and, correspondingly, if the parameter is negative, the zero time point of the epoch will be earlier than the time of the event. By default, there will be no delay.
tmin <*time / s*>
Beginning time point of the epoch. If theevent
parameter is zero or missing, this defines the beginning point of the raw data range to be included.
tmax <*time / s*>
End time point of the epoch. If theevent
parameter is zero or missing, this defines the end point of the raw data range to be included.
bmin <*time / s*>
It is possible to remove a baseline from the epochs before they are included in the covariance matrix estimation. This parameter defines the starting point of the baseline. This feature can be employed to avoid overestimation of noise in the presence of low-frequency drifts. Setting ofbmin
andbmax
is always recommended for epoch-based covariance matrix estimation.
basemin <*time / s*>
Synonym for bmin.
bmax <*time / s*>
End time point of the baseline, see above.
basemax <*time / s*>
Synonym for bmax.
This selection pops up a dialog which allows the management of computed averages. The controls in the dialog, shown in The dialog for managing available averages., allow the following:
In the example of The dialog for managing available averages., the first item is an average computed within mne_browse_raw , the second one contains data loaded from a file with signal-space projection data available, the third one demonstrates multiple data sets loaded from a file with neither projection nor software gradient compensation available, and the last one is a data set loaded from file with software gradient compensation data present. Note that this is now a scrolled window and some of the loaded data may be below or above the current view area.
The Signal-Space Projection (SSP) is one approach to rejection of external disturbances in software. The section presents some relevant details of this method.
Unlike many other noise-cancellation approaches, SSP does not require additional reference sensors to record the disturbance fields. Instead, SSP relies on the fact that the magnetic field distributions generated by the sources in the brain have spatial distributions sufficiently different from those generated by external noise sources. Furthermore, it is implicitly assumed that the linear space spanned by the significant external noise patters has a low dimension.
Without loss of generality we can always decompose any \(n\)-channel measurement \(b(t)\) into its signal and noise components as
Further, if we know that \(b_n(t)\) is well characterized by a few field patterns \(b_1 \dotso b_m\), we can express the disturbance as
where the columns of \(U\) constitute an orthonormal basis for \(b_1 \dotso b_m\), \(c_n(t)\) is an \(m\)-component column vector, and the error term \(e(t)\) is small and does not exhibit any consistent spatial distributions over time, i.e., \(C_e = E \{e e^T\} = I\). Subsequently, we will call the column space of \(U\) the noise subspace. The basic idea of SSP is that we can actually find a small basis set \(b_1 \dotso b_m\) such that the conditions described above are satisfied. We can now construct the orthogonal complement operator
and apply it to \(b(t)\) yielding
since \(P_{\perp}b_n(t) = P_{\perp}Uc_n(t) \approx 0\). The projection operator \(P_{\perp}\) is called the signal-space projection operator and generally provides considerable rejection of noise, suppressing external disturbances by a factor of 10 or more. The effectiveness of SSP depends on two factors:
If the first requirement is not satisfied, some noise will leak through because \(P_{\perp}b_n(t) \neq 0\). If the any of the brain signal vectors \(b_s(t)\) is close to the noise subspace not only the noise but also the signal will be attenuated by the application of \(P_{\perp}\) and, consequently, there might by little gain in signal-to-noise ratio. An example of the effect of SSP demonstrates the effect of SSP on the Vectorview magnetometer data. After the elimination of a three-dimensional noise subspace, the absolute value of the noise is dampened approximately by a factor of 10 and the covariance matrix becomes diagonally dominant.
Since the signal-space projection modifies the signal vectors originating in the brain, it is necessary to apply the projection to the forward solution in the course of inverse computations. This is accomplished by mne_inverse_operator as described in Inverse-operator decomposition. For more information on SSP, please consult the references listed in Signal-space projections.
In the computation of EEG-based source estimates, the MNE software employs the average-electrode reference, which means that the average over all electrode signals \(v_1 \dotso v_p\) is subtracted from each \(v_j\):
It is easy to see that the above equation actually corresponds to the projection:
where
This section describes how the covariance matrices are computed for raw data and epochs.
If a covariance matrix of a raw data is computed the data are checked for artefacts in 200-sample pieces. Let us collect the accepted \(M\) samples from all channels to the vectors \(s_j,\ j = 1, \dotsc ,M\). The estimate of the covariance matrix is then computed as:
where
is the average of the signals over all times. Note that no attempt is made to correct for low frequency drifts in the data. If the contribution of any frequency band is not desired in the covariance matrix estimate, suitable band-pass filter should be applied.
For actual computations, it is convenient to rewrite the expression for the covariance matrix as
The calculation of the covariance matrix is slightly more complicated in the epoch mode. If the bmin and bmax parameters are specified in the covariance matrix description file (see Covariance definitions), baseline correction is first applied to each epoch.
Let the vectors
be the samples from all channels in the baseline corrected epochs used to calculate the covariance matrix. In the above, \(P_r\) is the number of accepted epochs in category \(r\), \(N_r\) is the number of samples in the epochs of category \(r\), and \(R\) is the number of categories.
If the recommended --keepsamplemean
option
is specified in the covariance matrix definition file, the baseline
correction is applied to the epochs but the means at individual
samples are not subtracted. Thus the covariance matrix will be computed
as:
where
If keepsamplemean is not specified, we estimate the covariance matrix as
where
and
which reflects the fact that \(N_r\) means are computed for category \(r\). It is easy to see that the expression for the covariance matrix estimate can be cast into a more convenient form
Subtraction of the means at individual samples is useful if it can be expected that the evoked response from previous stimulus extends to part of baseline period of the next one.
Let us assume that we have computed multiple covariance matrix estimates \(\hat{C_1} \dotso \hat{C_Q}\) with corresponding degrees of freedom \(N_1 \dotso N_Q\). We can combine these matrices together as
where
If a signal space projection was on when a covariance matrix
was calculated, information about the projections applied is included
with the covariance matrix when it is saved. These projection data
are read by mne_inverse_operator and
applied to the forward solution as well as appropriate. Inclusion
of the projections into the covariance matrix limits the possibilities
to use the --bad
and --proj
options in mne_inverse_operator ,
see Inverse-operator decomposition.
To facilitate interactive analysis of raw data, mne_browse_raw can run mne_analyze as a child process. In this mode, mne_analyze is “remote controlled” by mne_browse_raw and will also send replies to mne_browse_raw to keep the two programs synchronized. A practical application of this communication is to view field or potential maps and cortically-constrained source estimates computed from raw data instantly.
The subordinate mne_analyze is started and stopped from Start mne_analyze and Quit mne_analyze in the Windows menu, respectively. The following settings are communicated between the two processes:
The raw data file
If a new raw data file is opened and a subordinate mne_analyze is active, the name of the raw data file is communicated to mne_analyze and a simplified version of the open dialog appears in mne_analyze allowing selection of an inverse operator or are MEG/MRI coordinate transformation. If a raw data file is already open in mne_browse_raw when mne_analyze is started, the open dialog appears immediately.
Time point
When a new time point is selected in mne_browse_raw the mne_analyze time point selection is updated accordingly. Time point selection in mne_analyze is not transferred to mne_browse_raw .
Scales
The vertical scales are kept synchronized between the two programs. In addition, the settings of the sample time limits are communicated from mne_browse_raw to mne_analyze .
Filter
The filter settings are kept synchronized.