<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.besa.de/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.besa.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Robert</id>
		<title>BESA® Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.besa.de/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Robert"/>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Special:Contributions/Robert"/>
		<updated>2026-04-18T09:20:18Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.10</generator>

	<entry>
		<id>https://wiki.besa.de/index.php?title=How_to_Prepare_Data_for_BESA_Statistics</id>
		<title>How to Prepare Data for BESA Statistics</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=How_to_Prepare_Data_for_BESA_Statistics"/>
				<updated>2024-09-23T08:06:16Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA Statistics&lt;br /&gt;
|version = BESA Research 6.0 or higher&amp;lt;br/&amp;gt;BESA Statistics 1.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Note and general remarks==&lt;br /&gt;
This article applies to data that are prepared using BESA Research. It is also possible to read data prepared by other programs. For the requirements, please refer to the BESA Statistics manual, the chapter on &amp;quot;Loading data that were created in other software&amp;quot; and the chapter &amp;quot;File formats&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Whatever data format is used, the suggested data organization is to place all data files for one condition (or one group) into a dedicated sub-folder. That will make it easy to load them into BESA Statistics.&lt;br /&gt;
&lt;br /&gt;
== Data types accepted by BESA Statistics ==&lt;br /&gt;
The following graph shows the data types that are accepted.&lt;br /&gt;
&lt;br /&gt;
[[File:Data types BESA Statistics 02.png|frameless|600px]]&lt;br /&gt;
&lt;br /&gt;
* ERP: event-related potential&lt;br /&gt;
* ERF: event-related field&lt;br /&gt;
* SWF: source waveforms&lt;br /&gt;
&lt;br /&gt;
== Preparing ERP/ERF data ==&lt;br /&gt;
BESA Statistics needs the following data:&lt;br /&gt;
# ERP or ERF files - one for each subject and each condition&lt;br /&gt;
# elp file - one file for the whole experiment&lt;br /&gt;
&lt;br /&gt;
The ERP/ERF files are exported from BESA Research as [[ASCII File Format]] (*.avr format). You can do this in the following way:&lt;br /&gt;
&lt;br /&gt;
Using the batch mode: &lt;br /&gt;
* Use the command &amp;quot;Mark Block&amp;quot; and select the &amp;quot;Whole Segment&amp;quot; option&lt;br /&gt;
* Use the command &amp;quot;Export&amp;quot; and select options &amp;quot;Marked Segment&amp;quot; and &amp;quot;ASCII vectorized&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
By hand:&lt;br /&gt;
* Right-click on an averaged data segment and select &amp;quot;Whole Segment&amp;quot; from the popup menu. &lt;br /&gt;
* Then right-click again and select &amp;quot;Write Segment&amp;quot;. In the dialog box (see below), select “ASCII vectorized” and un-tick the “Current filters” checkbox. That will save the data as “.avr” file as required by BESA Statistics. &lt;br /&gt;
&lt;br /&gt;
[[File:Export dialog.png|frameless|600px]]&lt;br /&gt;
&lt;br /&gt;
Repeat these steps for all segments that are required.&lt;br /&gt;
&lt;br /&gt;
The elp file is required once for all subjects / conditions, and placed into one of the data folders for BESA Statistics. An elp file is automatically saved when an ASCII export takes place. &lt;br /&gt;
In case that an additional export of an elp file is necessary, it can be exported by using the menu &amp;quot;File &amp;amp;rarr; Head Surface Points and Sensors &amp;amp;rarr; Save all Files in Head Coordinates&amp;quot;. Then browse to the folder you saved to, and find the &amp;quot;*.elp&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
== Preparing SWF data ==&lt;br /&gt;
'''Note''': This requires BESA Research Standard or higher.&lt;br /&gt;
&lt;br /&gt;
BESA Statistics needs the following data:&lt;br /&gt;
# SWF files - one for each subject and each condition&lt;br /&gt;
# bsa file - one file for the whole experiment&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The SWF files are exported in the following way:&lt;br /&gt;
&lt;br /&gt;
'''Using the batch mode''':&lt;br /&gt;
* Use the command &amp;quot;Save Source Waveforms&amp;quot;&lt;br /&gt;
* For one of the conditions: Use the command &amp;quot;Save Solution&amp;quot; to save the locations of the sources. Use the ''Unit Sphere'' setting as shown in the figure at the right. &lt;br /&gt;
&lt;br /&gt;
[[File:Batch_save_solution_dlg.png|300px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''By hand''':&lt;br /&gt;
* For each source waveform solution: In the Source analysis window, select menu entry &amp;quot;File &amp;amp;rarr; Save Source Waveforms As&amp;quot;. &lt;br /&gt;
* For one of the conditions: Select menu entry &amp;quot;File &amp;amp;rarr; Save Solution As&amp;quot;. In the dialog that appears, choose the type &amp;quot;BESA Solution – Unit Sphere&amp;quot; - see figure.&lt;br /&gt;
&lt;br /&gt;
[[File:Unit sphere.png|300px]]&lt;br /&gt;
&lt;br /&gt;
== Preparing Image data ==&lt;br /&gt;
'''Note''': This requires BESA Research Standard or higher.&lt;br /&gt;
&lt;br /&gt;
BESA Statistics needs the following data:&lt;br /&gt;
* &amp;lt;tt&amp;gt;*.dat&amp;lt;/tt&amp;gt; files - one for each subject and each condition&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;dat&amp;lt;/tt&amp;gt; files are exported in the following way:&lt;br /&gt;
&lt;br /&gt;
* '''Using the batch mode''': Use the command &amp;quot;Export&amp;quot; from the section ''Source Analysis Imaging''.&lt;br /&gt;
* '''By hand''': (For each image solution) In the Source analysis window, select menu entry &amp;quot;Image &amp;amp;rarr; Export Image As&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Preparing TFC data ==&lt;br /&gt;
'''Note''': This requires BESA Research Complete, or BESA Research Basic plus Source Coherence module.&lt;br /&gt;
&lt;br /&gt;
You can analyze time-frequency data for a given montage, but also the coherence of one channel with all other channels (see note at end).&lt;br /&gt;
&lt;br /&gt;
BESA Statistics needs the following data:&lt;br /&gt;
# Time-frequency analysis or coherence results - one for each subject and each condition&lt;br /&gt;
#* '''*.tfc''' files&lt;br /&gt;
# A file describing the channel configuration - one file for the whole experiment&lt;br /&gt;
#* '''*.elp''' file: if your montage is in '''sensor space'''&lt;br /&gt;
#* '''*.bsa''' file: if your montage is in '''source space'''&lt;br /&gt;
&lt;br /&gt;
=== Time-frequency file (*.tfc) ===&lt;br /&gt;
&lt;br /&gt;
The '''tfc''' files are exported in the following way:&lt;br /&gt;
&lt;br /&gt;
* Using the batch mode: &lt;br /&gt;
** Use the command &amp;quot;Save&amp;quot; from the section ''Time-Frequency Analysis''. In the options for the batch command, choose &amp;quot;ASCII data file&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
* By hand:&lt;br /&gt;
** In the Time-Frequency window, select &amp;quot;File &amp;amp;rarr; Export to ASCII file...&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Repeat this step for all subjects and conditions.&lt;br /&gt;
&lt;br /&gt;
=== Channel file (*.elp or *.bas) ===&lt;br /&gt;
&lt;br /&gt;
For one of the conditions, a channel file is required. &lt;br /&gt;
&lt;br /&gt;
* If your montage is in sensor space:&lt;br /&gt;
** An '''elp''' file is required once for all subjects / conditions, and placed into one of the data folders for BESA Statistics. It can be exported by using the menu &amp;quot;File &amp;amp;rarr; Head Surface Points and Sensors &amp;amp;rarr; Save Electrode File For Current Montage&amp;quot;. Then browse to the folder you saved to, and find the &amp;quot;*.elp&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
* If your montage is in source space:&lt;br /&gt;
** A '''bsa''' file is required once for all subjects / conditions, and placed into one of the data folders for BESA Statistics. It can be exported from the Source Analysis window. Open the solution that was used to generate the Source Montage. Then select menu entry &amp;quot;File &amp;amp;rarr; Save Solution As&amp;quot;. In the dialog that appears, choose the type &amp;quot;BESA Solution – Unit Sphere&amp;quot; - see figure.&lt;br /&gt;
&lt;br /&gt;
[[File:Unit sphere.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Notes''': &lt;br /&gt;
If your montage is in source space and regional sources are used, then you have the option to use all orientations in the time-frequency analysis. If you do this, you have to change the &amp;quot;*.bsa&amp;quot; file such that you get one line for each orientation in the &amp;quot;*.bsa&amp;quot; file. This can be achieved by:&lt;br /&gt;
&lt;br /&gt;
* Loading the solution into the Source Analysis Module.&lt;br /&gt;
* Orienting each regional source by selecting it and pressing the key 'O' on the keyboard.&lt;br /&gt;
* Converting the source to dipoles using the key 'C' on the keyboard.&lt;br /&gt;
* Then save the solution under a different name, and use this solution file as the channel file.&lt;br /&gt;
&lt;br /&gt;
If Coherence data are analyzed, please be aware that the export contains one less channel than the montage file. The channel that serves as the reference channel for the coherence is not exported. You will need to remove this channel from the elp file or bsa file by editing the file in a text editor and deleting the respective line.&lt;br /&gt;
&lt;br /&gt;
Also see [[Working With Additional Files]] for more information on the channel definition file conventions and formats.&lt;br /&gt;
== Preparing Connectivity data ==&lt;br /&gt;
&lt;br /&gt;
Connectivity analysis results from BESA Connectivity can also be read directly in BESA Statistics. For further information on how to export or prepare connectivity data for BESA Statistics go to [[How_to_Convert_BESA_Connectivity_results_for_BESA_Statistics|How to Convert BESA Connectivity results for BESA Statistics]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Statistics]] [[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Supported_Data_Formats</id>
		<title>Supported Data Formats</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Supported_Data_Formats"/>
				<updated>2021-11-02T12:13:40Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 6.1 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
BESA Research supports most major EEG and MEG file formats. Most file format readers are written by ourselves, others are supplied by the manufacturers.&lt;br /&gt;
This document gives an overview of all the data formats that can be imported in BESA Research 6.1 or higher. If your file format cannot be found in this list, please contact us via our support form: [https://www.besa.de/support/support-page/ BESA support form]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;The readers are part of the product installations, and the latest readers are included in the product installations.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Supported EEG data formats==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Format / Manufacturer / Software&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Extension&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; class=&amp;quot;unsortable&amp;quot; | File Formats Version&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; class=&amp;quot;unsortable&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| Alpha-Trace (alpha-trace medical software)&lt;br /&gt;
| .alp&lt;br /&gt;
| tested up to v418-05&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ASCII&lt;br /&gt;
| .avr .mul&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=ASCII_File_Format ASCII File Format]&lt;br /&gt;
|-&lt;br /&gt;
| ATES *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BDF (BioSemi)&lt;br /&gt;
| .bdf&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_BioSemi_data_with_BESA Reading BioSemi data]&lt;br /&gt;
|-&lt;br /&gt;
| Beekeeper64 (Telefactor)&lt;br /&gt;
| .eeg .dat&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Bio-logic (CEEGraph) *&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BrainAmp / BrainVision (Brain Products)&lt;br /&gt;
| .eeg .vhdr&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BrainLab (Schwarzer)&lt;br /&gt;
| .sig&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BrainStar (Schwind Medizintechnik)&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Cadwell *, ***&lt;br /&gt;
| .flex&lt;br /&gt;
| tested up to Arc API 2.1.106.0&lt;br /&gt;
| ARC API needs to be installed ***&lt;br /&gt;
|-&lt;br /&gt;
| Compumedics (ProFusion) *, **&lt;br /&gt;
| .sdy&lt;br /&gt;
| ProFusion EEG 4, 5&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DCmes, PolyDC (MES)&lt;br /&gt;
| .dat&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Deltamed (Coherence) *&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Deltamed (Neurofile)&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Deymed (Truescan)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EBNeuro (Galileo) *, **&lt;br /&gt;
| .gnt .set&lt;br /&gt;
| Galileo.NT, Galileo.NET 3.5&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_EBNeuro_Files Reading EBNeuro Files]&lt;br /&gt;
|-&lt;br /&gt;
| EDF (European Data Format)&lt;br /&gt;
| .edf&lt;br /&gt;
| EDF, EDF+&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_EDF_Files Reading EDF Files]&lt;br /&gt;
|-&lt;br /&gt;
| EEProbe (ANT)&lt;br /&gt;
| .cnt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Electrical Geodesics, Inc. - Raw data format&lt;br /&gt;
| .raw .ses&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_EGI_RAW_Files Reading EGI Raw Files]&lt;br /&gt;
|-&lt;br /&gt;
| Electrical Geodesics, Inc. - Metafile Format (EGI MFF) *&lt;br /&gt;
| .xml&lt;br /&gt;
| up to MFF v3&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ERPSS *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| g.Tec (Guger Technologies)&lt;br /&gt;
| .hdf5&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Galileo (EBNeuro) *&lt;br /&gt;
| .nt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Generic Reader (any ASCII formats; see BESA Program Help)&lt;br /&gt;
| .avr .mul&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Grass-Telefactor (TwinRef) *&lt;br /&gt;
| .ref&lt;br /&gt;
| up to Twin v3.1&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| InstEP *, ****&lt;br /&gt;
| .c .is .ia&lt;br /&gt;
| up to version 7.3 of the IWave Input/Output library&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Konstanz file format *&lt;br /&gt;
| .raw .sum&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ManScan interchange format (SAM) *&lt;br /&gt;
| .mbi&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Medtronic *&lt;br /&gt;
| .wg1&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| MEF (Multiscale Electrophysiology File) *&lt;br /&gt;
| .xml&lt;br /&gt;
| MEF 2.0&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_MEF_Files Reading MEF Files]&lt;br /&gt;
|-&lt;br /&gt;
| Micromed *&lt;br /&gt;
| .trc&lt;br /&gt;
| Micromed System98 EEG file (version 3 &amp;amp; 4)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Neuralynx *&lt;br /&gt;
| .ncs&lt;br /&gt;
| &lt;br /&gt;
| requires BESA Research version 7.0 or higher&lt;br /&gt;
|-&lt;br /&gt;
| NeurOne (Bittium, formerly known as Mega Electronics) *&lt;br /&gt;
| .xml&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Neuronic *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| NeuroScan&lt;br /&gt;
| .cnt .avg&lt;br /&gt;
| NeuroScan 3.x&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_Neuroscan_Files Reading NeuroScan Files]]&lt;br /&gt;
|-&lt;br /&gt;
| NeuroScan Curry 7 *&lt;br /&gt;
| .rs3 .dap .dat .ce*&lt;br /&gt;
| Curry 6 and 7 files&lt;br /&gt;
| requires BESA Research version 7.0 or higher. See also [http://wiki.besa.de/index.php?title=Reading_Neuroscan_Files Reading NeuroScan Files]&lt;br /&gt;
|-&lt;br /&gt;
| NeuroScan Curry 8 *&lt;br /&gt;
| .dpa .cdt .ceo&lt;br /&gt;
| Curry 8 files&lt;br /&gt;
| requires BESA Research 7.1 or higher&lt;br /&gt;
|-&lt;br /&gt;
| NexStim&lt;br /&gt;
| .nxe&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Nicolet (Nicolet Biomedical Inc.) *&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| NicoletOne / Nervus (Nicolet Biomedical Inc.) *&lt;br /&gt;
| .e .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Nihon Kohden&lt;br /&gt;
| .eeg&lt;br /&gt;
| EEG-1100, EEG-1200, EEG-2100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Philips MFF&lt;br /&gt;
| .mff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Phoenix II (EMS) *&lt;br /&gt;
| s*.0 s*.1 …&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Stellate Systems (Harmonie) *, **&lt;br /&gt;
| .sig&lt;br /&gt;
| Harmonie 5.2c, 5.4, 6.1, 6.2, 7a&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Stellate Systems (Monitor) *, **&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Vangard (LaMont Medical Inc.) *&lt;br /&gt;
| B****, no extension&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| XDF *&lt;br /&gt;
| .xdf&lt;br /&gt;
| &lt;br /&gt;
| requires BESA Research 7.1 or higher&lt;br /&gt;
|-&lt;br /&gt;
| XLTEK&lt;br /&gt;
| .eeg .erd&lt;br /&gt;
| up to v8.1&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If files are in one of these formats, they can be read directly and conversion is not required.&lt;br /&gt;
BESA Research also has a new, flexible interface for importing ASCII files which can be used in conjunction with the ASCII export functions of your software.&lt;br /&gt;
Any EEG format can be converted to the compressed BESA binary format, ASCII format, EDF+ or simple binary format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; Install this reader using &amp;quot;''Install Additional Readers.htm''&amp;quot; in the &amp;quot;''Utilities\Additional Readers\''&amp;quot; subfolder.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt; The EEG data format requires installation of the corresponding EEG system reader software or SDK.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;***&amp;lt;/nowiki&amp;gt; The Cadwell reader requires the installation of the Cadwell Arc API. If this API is not already installed on your computer, download it from the following link and install it on your computer: [https://my.hidrive.com/lnk/PFh5kbFb Link]. The API must be installed in the suggested default path on your C: drive.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;****&amp;lt;/nowiki&amp;gt; Please note that a valid license for the IWave library is required in order to be able to read InstEP files.&lt;br /&gt;
&lt;br /&gt;
==Supported MEG data formats==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Format / Manufacturer / Software&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Extension&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Formats Version&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| ASCII&lt;br /&gt;
| .avr .mul&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=ASCII_File_Format ASCII File Format]&lt;br /&gt;
|-&lt;br /&gt;
| BESA 2000 / FOCUS High Compression Format&lt;br /&gt;
| .foc .fsg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BTI (special export program exp2BESAbin in Unix system)&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CTF&lt;br /&gt;
| .meg4&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Elekta Neuromag Functional Image File Format (FIFF)&lt;br /&gt;
| .fif&lt;br /&gt;
| FIFF v2.0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Ricoh *&lt;br /&gt;
| .con&lt;br /&gt;
|v3.0&lt;br /&gt;
|requires BESA Research 7.0 or higher &lt;br /&gt;
|-&lt;br /&gt;
| Yokogawa *&lt;br /&gt;
| .con .raw .ave .SQD &lt;br /&gt;
|up to version 2 &lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; Install this reader using &amp;quot;''Install Additional Readers.htm''&amp;quot; in the &amp;quot;''Utilities\Additional Readers\''&amp;quot; subfolder.&lt;br /&gt;
&lt;br /&gt;
[[Category:Preprocessing]] [[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Supported_Data_Formats</id>
		<title>Supported Data Formats</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Supported_Data_Formats"/>
				<updated>2021-10-11T10:07:50Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 6.1 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
BESA Research supports most major EEG and MEG file formats. Most file format readers are written by ourselves, others are supplied by the manufacturers.&lt;br /&gt;
This document gives an overview of all the data formats that can be imported in BESA Research 6.1 or higher. If your file format cannot be found in this list, please contact us via our support form: [https://www.besa.de/support/support-page/ BESA support form]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;The readers are part of the product installations, and the latest readers are included in the product installations.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Supported EEG data formats==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Format / Manufacturer / Software&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Extension&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; class=&amp;quot;unsortable&amp;quot; | File Formats Version&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; class=&amp;quot;unsortable&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| Alpha-Trace (alpha-trace medical software)&lt;br /&gt;
| .alp&lt;br /&gt;
| tested up to v418-05&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ASCII&lt;br /&gt;
| .avr .mul&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=ASCII_File_Format ASCII File Format]&lt;br /&gt;
|-&lt;br /&gt;
| ATES *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BDF (BioSemi)&lt;br /&gt;
| .bdf&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_BioSemi_data_with_BESA Reading BioSemi data]&lt;br /&gt;
|-&lt;br /&gt;
| Beekeeper64 (Telefactor)&lt;br /&gt;
| .eeg .dat&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Bio-logic (CEEGraph) *&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BrainAmp / BrainVision (Brain Products)&lt;br /&gt;
| .eeg .vhdr&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BrainLab (Schwarzer)&lt;br /&gt;
| .sig&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BrainStar (Schwind Medizintechnik)&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Cadwell *, ***&lt;br /&gt;
| .flex&lt;br /&gt;
| Arc API 2.1.106.0&lt;br /&gt;
| ARC API needs to be installed ***&lt;br /&gt;
|-&lt;br /&gt;
| Compumedics (ProFusion) *, **&lt;br /&gt;
| .sdy&lt;br /&gt;
| ProFusion EEG 4, 5&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DCmes, PolyDC (MES)&lt;br /&gt;
| .dat&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Deltamed (Coherence) *&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Deltamed (Neurofile)&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Deymed (Truescan)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EBNeuro (Galileo) *, **&lt;br /&gt;
| .gnt .set&lt;br /&gt;
| Galileo.NT, Galileo.NET 3.5&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_EBNeuro_Files Reading EBNeuro Files]&lt;br /&gt;
|-&lt;br /&gt;
| EDF (European Data Format)&lt;br /&gt;
| .edf&lt;br /&gt;
| EDF, EDF+&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_EDF_Files Reading EDF Files]&lt;br /&gt;
|-&lt;br /&gt;
| EEProbe (ANT)&lt;br /&gt;
| .cnt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Electrical Geodesics, Inc. - Raw data format&lt;br /&gt;
| .raw .ses&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_EGI_RAW_Files Reading EGI Raw Files]&lt;br /&gt;
|-&lt;br /&gt;
| Electrical Geodesics, Inc. - Metafile Format (EGI MFF) *&lt;br /&gt;
| .xml&lt;br /&gt;
| up to MFF v3&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ERPSS *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| g.Tec (Guger Technologies)&lt;br /&gt;
| .hdf5&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Galileo (EBNeuro) *&lt;br /&gt;
| .nt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Generic Reader (any ASCII formats; see BESA Program Help)&lt;br /&gt;
| .avr .mul&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Grass-Telefactor (TwinRef) *&lt;br /&gt;
| .ref&lt;br /&gt;
| up to Twin v3.1&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| InstEP *, ****&lt;br /&gt;
| .c .is .ia&lt;br /&gt;
| up to version 7.3 of the IWave Input/Output library&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Konstanz file format *&lt;br /&gt;
| .raw .sum&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ManScan interchange format (SAM) *&lt;br /&gt;
| .mbi&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Medtronic *&lt;br /&gt;
| .wg1&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| MEF (Multiscale Electrophysiology File) *&lt;br /&gt;
| .xml&lt;br /&gt;
| MEF 2.0&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_MEF_Files Reading MEF Files]&lt;br /&gt;
|-&lt;br /&gt;
| Micromed *&lt;br /&gt;
| .trc&lt;br /&gt;
| Micromed System98 EEG file (version 3 &amp;amp; 4)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Neuralynx *&lt;br /&gt;
| .ncs&lt;br /&gt;
| &lt;br /&gt;
| requires BESA Research version 7.0 or higher&lt;br /&gt;
|-&lt;br /&gt;
| NeurOne (Bittium, formerly known as Mega Electronics) *&lt;br /&gt;
| .xml&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Neuronic *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| NeuroScan&lt;br /&gt;
| .cnt .avg&lt;br /&gt;
| NeuroScan 3.x&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_Neuroscan_Files Reading NeuroScan Files]]&lt;br /&gt;
|-&lt;br /&gt;
| NeuroScan Curry 7 *&lt;br /&gt;
| .rs3 .dap .dat .ce*&lt;br /&gt;
| Curry 6 and 7 files&lt;br /&gt;
| requires BESA Research version 7.0 or higher. See also [http://wiki.besa.de/index.php?title=Reading_Neuroscan_Files Reading NeuroScan Files]&lt;br /&gt;
|-&lt;br /&gt;
| NeuroScan Curry 8 *&lt;br /&gt;
| .dpa .cdt .ceo&lt;br /&gt;
| Curry 8 files&lt;br /&gt;
| requires BESA Research 7.1 or higher&lt;br /&gt;
|-&lt;br /&gt;
| NexStim&lt;br /&gt;
| .nxe&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Nicolet (Nicolet Biomedical Inc.) *&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| NicoletOne / Nervus (Nicolet Biomedical Inc.) *&lt;br /&gt;
| .e .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Nihon Kohden&lt;br /&gt;
| .eeg&lt;br /&gt;
| EEG-1100, EEG-1200, EEG-2100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Philips MFF&lt;br /&gt;
| .mff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Phoenix II (EMS) *&lt;br /&gt;
| s*.0 s*.1 …&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Stellate Systems (Harmonie) *, **&lt;br /&gt;
| .sig&lt;br /&gt;
| Harmonie 5.2c, 5.4, 6.1, 6.2, 7a&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Stellate Systems (Monitor) *, **&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Vangard (LaMont Medical Inc.) *&lt;br /&gt;
| B****, no extension&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| XDF *&lt;br /&gt;
| .xdf&lt;br /&gt;
| &lt;br /&gt;
| requires BESA Research 7.1 or higher&lt;br /&gt;
|-&lt;br /&gt;
| XLTEK&lt;br /&gt;
| .eeg .erd&lt;br /&gt;
| up to v8.1&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If files are in one of these formats, they can be read directly and conversion is not required.&lt;br /&gt;
BESA Research also has a new, flexible interface for importing ASCII files which can be used in conjunction with the ASCII export functions of your software.&lt;br /&gt;
Any EEG format can be converted to the compressed BESA binary format, ASCII format, EDF+ or simple binary format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; Install this reader using &amp;quot;''Install Additional Readers.htm''&amp;quot; in the &amp;quot;''Utilities\Additional Readers\''&amp;quot; subfolder.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt; The EEG data format requires installation of the corresponding EEG system reader software or SDK.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;***&amp;lt;/nowiki&amp;gt; The Cadwell reader requires the installation of the Cadwell Arc API. If this API is not already installed on your computer, download it from the following link and install it on your computer: [ftp://h1772544.stratoserver.net/public/Readers/Cadwell/ Link]. The API must be installed in the suggested default path on your C: drive.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;****&amp;lt;/nowiki&amp;gt; Please note that a valid license for the IWave library is required in order to be able to read InstEP files.&lt;br /&gt;
&lt;br /&gt;
==Supported MEG data formats==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Format / Manufacturer / Software&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Extension&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Formats Version&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| ASCII&lt;br /&gt;
| .avr .mul&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=ASCII_File_Format ASCII File Format]&lt;br /&gt;
|-&lt;br /&gt;
| BESA 2000 / FOCUS High Compression Format&lt;br /&gt;
| .foc .fsg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BTI (special export program exp2BESAbin in Unix system)&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CTF&lt;br /&gt;
| .meg4&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Elekta Neuromag Functional Image File Format (FIFF)&lt;br /&gt;
| .fif&lt;br /&gt;
| FIFF v2.0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Ricoh *&lt;br /&gt;
| .con&lt;br /&gt;
|v3.0&lt;br /&gt;
|requires BESA Research 7.0 or higher &lt;br /&gt;
|-&lt;br /&gt;
| Yokogawa *&lt;br /&gt;
| .con .raw .ave .SQD &lt;br /&gt;
|up to version 2 &lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; Install this reader using &amp;quot;''Install Additional Readers.htm''&amp;quot; in the &amp;quot;''Utilities\Additional Readers\''&amp;quot; subfolder.&lt;br /&gt;
&lt;br /&gt;
[[Category:Preprocessing]] [[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Supported_Data_Formats</id>
		<title>Supported Data Formats</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Supported_Data_Formats"/>
				<updated>2021-10-11T10:06:48Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 6.1 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
BESA Research supports most major EEG and MEG file formats. Most file format readers are written by ourselves, others are supplied by the manufacturers.&lt;br /&gt;
This document gives an overview of all the data formats that can be imported in BESA Research 6.1 or higher. If your file format cannot be found in this list, please contact us via our support form: [https://www.besa.de/support/support-page/ BESA support form]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;The readers are part of the product installations, and the latest readers are included in the product installations.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Supported EEG data formats==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Format / Manufacturer / Software&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Extension&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; class=&amp;quot;unsortable&amp;quot; | File Formats Version&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; class=&amp;quot;unsortable&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| Alpha-Trace (alpha-trace medical software)&lt;br /&gt;
| .alp&lt;br /&gt;
| tested up to v418-05&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ASCII&lt;br /&gt;
| .avr .mul&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=ASCII_File_Format ASCII File Format]&lt;br /&gt;
|-&lt;br /&gt;
| ATES *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BDF (BioSemi)&lt;br /&gt;
| .bdf&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_BioSemi_data_with_BESA Reading BioSemi data]&lt;br /&gt;
|-&lt;br /&gt;
| Beekeeper64 (Telefactor)&lt;br /&gt;
| .eeg .dat&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Bio-logic (CEEGraph) *&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BrainAmp / BrainVision (Brain Products)&lt;br /&gt;
| .eeg .vhdr&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BrainLab (Schwarzer)&lt;br /&gt;
| .sig&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BrainStar (Schwind Medizintechnik)&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Cadwell *, ***&lt;br /&gt;
| .flex&lt;br /&gt;
| Arc API 2.1.106.0&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Compumedics (ProFusion) *, **&lt;br /&gt;
| .sdy&lt;br /&gt;
| ProFusion EEG 4, 5&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DCmes, PolyDC (MES)&lt;br /&gt;
| .dat&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Deltamed (Coherence) *&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Deltamed (Neurofile)&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Deymed (Truescan)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EBNeuro (Galileo) *, **&lt;br /&gt;
| .gnt .set&lt;br /&gt;
| Galileo.NT, Galileo.NET 3.5&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_EBNeuro_Files Reading EBNeuro Files]&lt;br /&gt;
|-&lt;br /&gt;
| EDF (European Data Format)&lt;br /&gt;
| .edf&lt;br /&gt;
| EDF, EDF+&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_EDF_Files Reading EDF Files]&lt;br /&gt;
|-&lt;br /&gt;
| EEProbe (ANT)&lt;br /&gt;
| .cnt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Electrical Geodesics, Inc. - Raw data format&lt;br /&gt;
| .raw .ses&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_EGI_RAW_Files Reading EGI Raw Files]&lt;br /&gt;
|-&lt;br /&gt;
| Electrical Geodesics, Inc. - Metafile Format (EGI MFF) *&lt;br /&gt;
| .xml&lt;br /&gt;
| up to MFF v3&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ERPSS *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| g.Tec (Guger Technologies)&lt;br /&gt;
| .hdf5&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Galileo (EBNeuro) *&lt;br /&gt;
| .nt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Generic Reader (any ASCII formats; see BESA Program Help)&lt;br /&gt;
| .avr .mul&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Grass-Telefactor (TwinRef) *&lt;br /&gt;
| .ref&lt;br /&gt;
| up to Twin v3.1&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| InstEP *, ****&lt;br /&gt;
| .c .is .ia&lt;br /&gt;
| up to version 7.3 of the IWave Input/Output library&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Konstanz file format *&lt;br /&gt;
| .raw .sum&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ManScan interchange format (SAM) *&lt;br /&gt;
| .mbi&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Medtronic *&lt;br /&gt;
| .wg1&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| MEF (Multiscale Electrophysiology File) *&lt;br /&gt;
| .xml&lt;br /&gt;
| MEF 2.0&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_MEF_Files Reading MEF Files]&lt;br /&gt;
|-&lt;br /&gt;
| Micromed *&lt;br /&gt;
| .trc&lt;br /&gt;
| Micromed System98 EEG file (version 3 &amp;amp; 4)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Neuralynx *&lt;br /&gt;
| .ncs&lt;br /&gt;
| &lt;br /&gt;
| requires BESA Research version 7.0 or higher&lt;br /&gt;
|-&lt;br /&gt;
| NeurOne (Bittium, formerly known as Mega Electronics) *&lt;br /&gt;
| .xml&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Neuronic *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| NeuroScan&lt;br /&gt;
| .cnt .avg&lt;br /&gt;
| NeuroScan 3.x&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_Neuroscan_Files Reading NeuroScan Files]]&lt;br /&gt;
|-&lt;br /&gt;
| NeuroScan Curry 7 *&lt;br /&gt;
| .rs3 .dap .dat .ce*&lt;br /&gt;
| Curry 6 and 7 files&lt;br /&gt;
| requires BESA Research version 7.0 or higher. See also [http://wiki.besa.de/index.php?title=Reading_Neuroscan_Files Reading NeuroScan Files]&lt;br /&gt;
|-&lt;br /&gt;
| NeuroScan Curry 8 *&lt;br /&gt;
| .dpa .cdt .ceo&lt;br /&gt;
| Curry 8 files&lt;br /&gt;
| requires BESA Research 7.1 or higher&lt;br /&gt;
|-&lt;br /&gt;
| NexStim&lt;br /&gt;
| .nxe&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Nicolet (Nicolet Biomedical Inc.) *&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| NicoletOne / Nervus (Nicolet Biomedical Inc.) *&lt;br /&gt;
| .e .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Nihon Kohden&lt;br /&gt;
| .eeg&lt;br /&gt;
| EEG-1100, EEG-1200, EEG-2100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Philips MFF&lt;br /&gt;
| .mff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Phoenix II (EMS) *&lt;br /&gt;
| s*.0 s*.1 …&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Stellate Systems (Harmonie) *, **&lt;br /&gt;
| .sig&lt;br /&gt;
| Harmonie 5.2c, 5.4, 6.1, 6.2, 7a&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Stellate Systems (Monitor) *, **&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Vangard (LaMont Medical Inc.) *&lt;br /&gt;
| B****, no extension&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| XDF *&lt;br /&gt;
| .xdf&lt;br /&gt;
| &lt;br /&gt;
| requires BESA Research 7.1 or higher&lt;br /&gt;
|-&lt;br /&gt;
| XLTEK&lt;br /&gt;
| .eeg .erd&lt;br /&gt;
| up to v8.1&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If files are in one of these formats, they can be read directly and conversion is not required.&lt;br /&gt;
BESA Research also has a new, flexible interface for importing ASCII files which can be used in conjunction with the ASCII export functions of your software.&lt;br /&gt;
Any EEG format can be converted to the compressed BESA binary format, ASCII format, EDF+ or simple binary format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; Install this reader using &amp;quot;''Install Additional Readers.htm''&amp;quot; in the &amp;quot;''Utilities\Additional Readers\''&amp;quot; subfolder.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt; The EEG data format requires installation of the corresponding EEG system reader software or SDK.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;***&amp;lt;/nowiki&amp;gt; The Cadwell reader requires the installation of the Cadwell Arc API. If this API is not already installed on your computer, download it from the following link and install it on your computer: [ftp://h1772544.stratoserver.net/public/Readers/Cadwell/ Link]. The API must be installed in the suggested default path on your C: drive.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;****&amp;lt;/nowiki&amp;gt; Please note that a valid license for the IWave library is required in order to be able to read InstEP files.&lt;br /&gt;
&lt;br /&gt;
==Supported MEG data formats==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Format / Manufacturer / Software&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Extension&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Formats Version&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| ASCII&lt;br /&gt;
| .avr .mul&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=ASCII_File_Format ASCII File Format]&lt;br /&gt;
|-&lt;br /&gt;
| BESA 2000 / FOCUS High Compression Format&lt;br /&gt;
| .foc .fsg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BTI (special export program exp2BESAbin in Unix system)&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CTF&lt;br /&gt;
| .meg4&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Elekta Neuromag Functional Image File Format (FIFF)&lt;br /&gt;
| .fif&lt;br /&gt;
| FIFF v2.0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Ricoh *&lt;br /&gt;
| .con&lt;br /&gt;
|v3.0&lt;br /&gt;
|requires BESA Research 7.0 or higher &lt;br /&gt;
|-&lt;br /&gt;
| Yokogawa *&lt;br /&gt;
| .con .raw .ave .SQD &lt;br /&gt;
|up to version 2 &lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; Install this reader using &amp;quot;''Install Additional Readers.htm''&amp;quot; in the &amp;quot;''Utilities\Additional Readers\''&amp;quot; subfolder.&lt;br /&gt;
&lt;br /&gt;
[[Category:Preprocessing]] [[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Supported_Data_Formats</id>
		<title>Supported Data Formats</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Supported_Data_Formats"/>
				<updated>2021-10-11T10:04:41Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 6.1 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
BESA Research supports most major EEG and MEG file formats. Most file format readers are written by ourselves, others are supplied by the manufacturers.&lt;br /&gt;
This document gives an overview of all the data formats that can be imported in BESA Research 6.1 or higher. If your file format cannot be found in this list, please contact us via our support form: [https://www.besa.de/support/support-page/ BESA support form]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;The readers are part of the product installations, and the latest readers are included in the product installations.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Supported EEG data formats==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Format / Manufacturer / Software&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Extension&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; class=&amp;quot;unsortable&amp;quot; | File Formats Version&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; class=&amp;quot;unsortable&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| Alpha-Trace (alpha-trace medical software)&lt;br /&gt;
| .alp&lt;br /&gt;
| tested up to v418-05&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ASCII&lt;br /&gt;
| .avr .mul&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=ASCII_File_Format ASCII File Format]&lt;br /&gt;
|-&lt;br /&gt;
| ATES *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BDF (BioSemi)&lt;br /&gt;
| .bdf&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_BioSemi_data_with_BESA Reading BioSemi data]&lt;br /&gt;
|-&lt;br /&gt;
| Beekeeper64 (Telefactor)&lt;br /&gt;
| .eeg .dat&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Bio-logic (CEEGraph) *&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BrainAmp / BrainVision (Brain Products)&lt;br /&gt;
| .eeg .vhdr&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BrainLab (Schwarzer)&lt;br /&gt;
| .sig&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BrainStar (Schwind Medizintechnik)&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Cadwell *, ***&lt;br /&gt;
| .flex&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Compumedics (ProFusion) *, **&lt;br /&gt;
| .sdy&lt;br /&gt;
| ProFusion EEG 4, 5&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DCmes, PolyDC (MES)&lt;br /&gt;
| .dat&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Deltamed (Coherence) *&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Deltamed (Neurofile)&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Deymed (Truescan)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EBNeuro (Galileo) *, **&lt;br /&gt;
| .gnt .set&lt;br /&gt;
| Galileo.NT, Galileo.NET 3.5&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_EBNeuro_Files Reading EBNeuro Files]&lt;br /&gt;
|-&lt;br /&gt;
| EDF (European Data Format)&lt;br /&gt;
| .edf&lt;br /&gt;
| EDF, EDF+&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_EDF_Files Reading EDF Files]&lt;br /&gt;
|-&lt;br /&gt;
| EEProbe (ANT)&lt;br /&gt;
| .cnt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Electrical Geodesics, Inc. - Raw data format&lt;br /&gt;
| .raw .ses&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_EGI_RAW_Files Reading EGI Raw Files]&lt;br /&gt;
|-&lt;br /&gt;
| Electrical Geodesics, Inc. - Metafile Format (EGI MFF) *&lt;br /&gt;
| .xml&lt;br /&gt;
| up to MFF v3&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ERPSS *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| g.Tec (Guger Technologies)&lt;br /&gt;
| .hdf5&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Galileo (EBNeuro) *&lt;br /&gt;
| .nt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Generic Reader (any ASCII formats; see BESA Program Help)&lt;br /&gt;
| .avr .mul&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Grass-Telefactor (TwinRef) *&lt;br /&gt;
| .ref&lt;br /&gt;
| up to Twin v3.1&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| InstEP *, ****&lt;br /&gt;
| .c .is .ia&lt;br /&gt;
| up to version 7.3 of the IWave Input/Output library&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Konstanz file format *&lt;br /&gt;
| .raw .sum&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ManScan interchange format (SAM) *&lt;br /&gt;
| .mbi&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Medtronic *&lt;br /&gt;
| .wg1&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| MEF (Multiscale Electrophysiology File) *&lt;br /&gt;
| .xml&lt;br /&gt;
| MEF 2.0&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_MEF_Files Reading MEF Files]&lt;br /&gt;
|-&lt;br /&gt;
| Micromed *&lt;br /&gt;
| .trc&lt;br /&gt;
| Micromed System98 EEG file (version 3 &amp;amp; 4)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Neuralynx *&lt;br /&gt;
| .ncs&lt;br /&gt;
| &lt;br /&gt;
| requires BESA Research version 7.0 or higher&lt;br /&gt;
|-&lt;br /&gt;
| NeurOne (Bittium, formerly known as Mega Electronics) *&lt;br /&gt;
| .xml&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Neuronic *&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| NeuroScan&lt;br /&gt;
| .cnt .avg&lt;br /&gt;
| NeuroScan 3.x&lt;br /&gt;
| [http://wiki.besa.de/index.php?title=Reading_Neuroscan_Files Reading NeuroScan Files]]&lt;br /&gt;
|-&lt;br /&gt;
| NeuroScan Curry 7 *&lt;br /&gt;
| .rs3 .dap .dat .ce*&lt;br /&gt;
| Curry 6 and 7 files&lt;br /&gt;
| requires BESA Research version 7.0 or higher. See also [http://wiki.besa.de/index.php?title=Reading_Neuroscan_Files Reading NeuroScan Files]&lt;br /&gt;
|-&lt;br /&gt;
| NeuroScan Curry 8 *&lt;br /&gt;
| .dpa .cdt .ceo&lt;br /&gt;
| Curry 8 files&lt;br /&gt;
| requires BESA Research 7.1 or higher&lt;br /&gt;
|-&lt;br /&gt;
| NexStim&lt;br /&gt;
| .nxe&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Nicolet (Nicolet Biomedical Inc.) *&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| NicoletOne / Nervus (Nicolet Biomedical Inc.) *&lt;br /&gt;
| .e .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Nihon Kohden&lt;br /&gt;
| .eeg&lt;br /&gt;
| EEG-1100, EEG-1200, EEG-2100&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Philips MFF&lt;br /&gt;
| .mff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Phoenix II (EMS) *&lt;br /&gt;
| s*.0 s*.1 …&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Stellate Systems (Harmonie) *, **&lt;br /&gt;
| .sig&lt;br /&gt;
| Harmonie 5.2c, 5.4, 6.1, 6.2, 7a&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Stellate Systems (Monitor) *, **&lt;br /&gt;
| .eeg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Vangard (LaMont Medical Inc.) *&lt;br /&gt;
| B****, no extension&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| XDF *&lt;br /&gt;
| .xdf&lt;br /&gt;
| &lt;br /&gt;
| requires BESA Research 7.1 or higher&lt;br /&gt;
|-&lt;br /&gt;
| XLTEK&lt;br /&gt;
| .eeg .erd&lt;br /&gt;
| up to v8.1&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If files are in one of these formats, they can be read directly and conversion is not required.&lt;br /&gt;
BESA Research also has a new, flexible interface for importing ASCII files which can be used in conjunction with the ASCII export functions of your software.&lt;br /&gt;
Any EEG format can be converted to the compressed BESA binary format, ASCII format, EDF+ or simple binary format.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; Install this reader using &amp;quot;''Install Additional Readers.htm''&amp;quot; in the &amp;quot;''Utilities\Additional Readers\''&amp;quot; subfolder.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;**&amp;lt;/nowiki&amp;gt; The EEG data format requires installation of the corresponding EEG system reader software or SDK.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;***&amp;lt;/nowiki&amp;gt; The Cadwell reader requires the installation of the Cadwell Arc API. If this API is not already installed on your computer, download it from the following link and install it on your computer: [ftp://h1772544.stratoserver.net/public/Readers/Cadwell/ Link]. The API must be installed in the suggested default path on your C: drive.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;****&amp;lt;/nowiki&amp;gt; Please note that a valid license for the IWave library is required in order to be able to read InstEP files.&lt;br /&gt;
&lt;br /&gt;
==Supported MEG data formats==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Format / Manufacturer / Software&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Extension&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | File Formats Version&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Notes&lt;br /&gt;
|-&lt;br /&gt;
| ASCII&lt;br /&gt;
| .avr .mul&lt;br /&gt;
| &lt;br /&gt;
| [http://wiki.besa.de/index.php?title=ASCII_File_Format ASCII File Format]&lt;br /&gt;
|-&lt;br /&gt;
| BESA 2000 / FOCUS High Compression Format&lt;br /&gt;
| .foc .fsg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BTI (special export program exp2BESAbin in Unix system)&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CTF&lt;br /&gt;
| .meg4&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Elekta Neuromag Functional Image File Format (FIFF)&lt;br /&gt;
| .fif&lt;br /&gt;
| FIFF v2.0&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Ricoh *&lt;br /&gt;
| .con&lt;br /&gt;
|v3.0&lt;br /&gt;
|requires BESA Research 7.0 or higher &lt;br /&gt;
|-&lt;br /&gt;
| Yokogawa *&lt;br /&gt;
| .con .raw .ave .SQD &lt;br /&gt;
|up to version 2 &lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; Install this reader using &amp;quot;''Install Additional Readers.htm''&amp;quot; in the &amp;quot;''Utilities\Additional Readers\''&amp;quot; subfolder.&lt;br /&gt;
&lt;br /&gt;
[[Category:Preprocessing]] [[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=FAQ:HASP</id>
		<title>FAQ:HASP</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=FAQ:HASP"/>
				<updated>2021-05-06T07:54:08Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: Redirected page to Licensing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Licensing]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI</id>
		<title>Integration with MRI and fMRI</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI"/>
				<updated>2021-05-06T07:06:02Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA MRI&lt;br /&gt;
|version = BESA Research 6.1 or higher&amp;lt;br/&amp;gt;BESA MRI 2.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- = BESA Research Integration with MRI and fMRI = --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Both for developing and evaluating dipole source models of EEG or MEG activity, it is useful to have access to structural MRI or fMRI data.&lt;br /&gt;
&lt;br /&gt;
The BESA MRI software allows to preprocess structural MRI data so that the individual anatomical information contained in the MRI can be utilized in BESA Research. BESA MRI makes it possible ...&lt;br /&gt;
* ... to align the EEG and MEG sensors with the structural MRI data.&lt;br /&gt;
* ... to read and display the aligned, individual Talairach structural MRIs directly in the BESA Research Source Analysis module. In this way, source analysis results can be presented on top of the aligned MRIs, which allows us to evaluate the anatomical regions to which the reconstructed sources may correspond.&lt;br /&gt;
* ... to use an individual, realistically shaped FEM head model for source analysis in BESA Research. FEM head models take into account the individual volume conduction properties of the subject's head derived from the structural MRI data. This allows for more accurate source analysis (Yvert 1997, Lanfer 2012).&lt;br /&gt;
&lt;br /&gt;
To offer an easy integration with fMRI data we have, in collaboration with Rainer Goebel, optimized the interface between BESA Research and BrainVoyagerQX. &lt;br /&gt;
&lt;br /&gt;
With these tools, we can ...&lt;br /&gt;
* ... use fMRI BOLD regions or MRI structures to initialize dipole models.&lt;br /&gt;
* ... visualize dipoles from BESA Research models together with the structural MRI in BrainVoyager in order to evaluate the regions to which the dipoles may correspond.&lt;br /&gt;
* ... combine the localization advantages of (f)MRI with the high temporal resolution of EEG and MEG, for instance by using (f)MRI to place the sources, and the source waveforms of BESA Research to provide feedback about the time course of the source activity.&lt;br /&gt;
* ... overlay source analysis results obtained in BESA Research with fMRI data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' For simpler coregistration, we recommend to use BrainVoyagerQX rather than the older BrainVoyager, but BESA Research will work with both program versions.&lt;br /&gt;
&lt;br /&gt;
The chapters below describe the steps necessary to integrate the MRI and fMRI data with BESA Research. Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website: [https://www.brainvoyager.com/downloads/downloads.html BrainVoyager Downloads].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Aligning Coordinate Systems'''&lt;br /&gt;
&lt;br /&gt;
* For a given BESA data set, the electrode and other head surface points need to be aligned to the MRI coordinates.&lt;br /&gt;
* The basic steps necessary to align the EEG electrode locations, the MEG sensors and the MRI are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How Coregistration is done]].&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BESA MRI can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BrainVoyager are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How To set up Coregistration between BESA and BrainVoyager]].&lt;br /&gt;
* In BESA Research, all necessary settings with regard to the alignment are made in the [[Integration_with_MRI_and_fMRI#The_Coregistration_Dialog|Coregistration Dialog]].&lt;br /&gt;
* Requirements with respect to the MRI data for a good coregistration can be found in Section [[#MRI_Requirements_for_Good_Coregistration|MRI Requirements for Good Coregistration]].&lt;br /&gt;
* Requirements with respect to EEG and MEG data for a good coregistration can be found in Section [[#EEG/MEG Data Requirements for Good Coregistration|EEG/MEG Data Requirements for Good Coregistration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Generating an individual, realistically shaped FEM head model'''&lt;br /&gt;
&lt;br /&gt;
* The generation of a FEM head model that can be used in BESA Research is done in BESA MRI as an additional step following the EEG / MEG to MRI coregistration.&lt;br /&gt;
* Detailed instructions on how to generate the FEM head model can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Co-locating dipoles and MRI locations'''&lt;br /&gt;
&lt;br /&gt;
* After aligning the EEG / MEG and the MRI data it is possible to co-locate dipoles and MRI locations. This means, it is possible to visualize the dipoles and to specify the dipole parameters in the MRI coordinate system.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-locate sources and MRI in the BESA Research Source Module]] describes how in the BESA Research Source Analysis module dipoles can directly be visualized in the space of the individual MRI.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]] describes how to send a source model from BESA Research to BrainVoyager for further inspection.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]] describes how to insert a dipole at a location defined in the MRI in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
Lanfer, B., I. Paul-Jordanov, M. Scherg, and C. H. Wolters. “Influence of Interior Cerebrospinal Fluid Compartments on EEG Source Analysis.” In Proceedings BMT 2012, Vol. 57. Jena: De Gruyter, 2012. doi:10.1515/bmt-2012-4020.&lt;br /&gt;
&lt;br /&gt;
Yvert, B., O. Bertrand, M. Thévenet, J. F. Echallier, and J. Pernier. “A Systematic Evaluation of the Spherical Model Accuracy in EEG Dipole Localization.” Electroencephalography and Clinical Neurophysiology 102, no. 5 (May 1997): 452–59. doi:16/S0921-884X(97)96611-X.&lt;br /&gt;
&lt;br /&gt;
== How Coregistration is done ==&lt;br /&gt;
&lt;br /&gt;
This section outlines the basic steps to coregister the EEG / MEG data to an individual MRI. These steps are necessary to load an individual MRI into BESA Research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What happens:'''&lt;br /&gt;
&lt;br /&gt;
* EEG / MEG sensor locations and the MRI data are defined in different coordinate systems. Setting up coregistration is the process of aligning the two coordinate systems.&lt;br /&gt;
* BESA Research uses the ''Coregistration Dialog'' to coordinate the alignment procedure.&lt;br /&gt;
* Alignment is done with the ''AC-PC-transformed MRI''.&lt;br /&gt;
* BESA Research displays the ''Talairach-transformed MRI'' in the source analysis module.&lt;br /&gt;
* A coregistration file (with the extension &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.sfh'''&amp;lt;/span&amp;gt;&amp;quot;) is used to mediate between BESA Research and BESA MRI (or BrainVoyagerQX):&lt;br /&gt;
* BESA Research writes the coregistration file which contains the coordinates of head surface points (fiducials, electrodes, other digitized surface points).&lt;br /&gt;
* The coordinates are read into BESA MRI (or BrainVoyager), and aligned with the AC-PC-transformed MRI. The alignment information is then appended to the ''coregistration file''. The names of the AC-PC MRI (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.vmr&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the surface mesh (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.srf&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), and, if available, the Talairach transformation, are also appended.&lt;br /&gt;
* BESA Research reads the coregistration file and appends the name of the Talairach-transformed MRI and head surface. If a brain surface has been created, this is also appended.&lt;br /&gt;
* Subsequently, BESA Research reads the coregistration file automatically when loading the data file.&lt;br /&gt;
* In the BESA Research source module, the individual MRI is displayed instead of the standard MRI. Talairach coordinates of dipoles are the &amp;quot;real&amp;quot; Talairach coordinates as defined, e.g., in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The steps you have to take (once for each data set):'''&lt;br /&gt;
&lt;br /&gt;
* From the BESA Research ''Coregistration Dialog'', write a coregistration file. Switch to BESA MRI (or BrainVoyagerQX).&lt;br /&gt;
* If BESA MRI is used follow the steps in the coregistration quickguide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* If BrainVoyager is used follow the steps in Section “''How to set up coregistration between BESA and BrainVoyager”.''&lt;br /&gt;
* Back in BESA Research, reload the altered '''coregistration file'''. When using BESA MRI the file names of the generated surface and volume data files will be automatically filled in. When using BrainVoyager file names are only filled in automatically when the files are named according to the file naming conventions. Otherwise, file names have to be set manually.&lt;br /&gt;
* The coregistration file is now associated with the data file in the BESA Research database and will be used automatically the next time the file is opened in BESA Research. If the database entry is cleared, and the data are reloaded, you must make sure the coregistration file is also loaded (either using the ''Coregistration Dialog'' or the ''Channel and digitized head surface point information Dialog'').&lt;br /&gt;
&lt;br /&gt;
==  Alignment of BESA and MRICoordinate Systems  ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration Dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog is opened either from the ''Channel and digitized head surface point information'' (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) ''dialog ''by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit/Coreg'''&amp;lt;/span&amp;gt; button, or from the main menu (&amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File/MRI&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Coregistration...'''&amp;lt;/span&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the coregistration dialog is invoked from an EEG data set in which no digitized electrode coordinates are available (i.e. standard electrode positions located on a sphere are assumed), BESA Research presents a warning message, saying that for MRI coregistration realistic electrode coordinates produce better results. BESA Research has a list of such realistic standard coordinates (i.e. located on a pre-defined standard head surface) for various electrodes available in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;, which is located in the Standard Electrode folder. If all electrodes in the dataset are listed in this file, a dialog window suggests to apply this file to the current data set, i.e. to switch from standard sphere coordinates to the standard realistic electrode coordinates in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;. If the suggestion is accepted, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; is assigned to the dataset (see Channel and digitized head surface point information (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) dialog).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Dialog:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (1).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Select MRI prog'''&amp;lt;/span&amp;gt; button to select your preferred MRI program. The current choice is between ''BESA MRI.exe'' and ''BrainVoyagerQX.exe''. The path to the MRI program is saved (in ''System\BESA.set'') and will be remembered by BESA Research. The top right hand button (now showing '''BESA MRI''') shows the current selection.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BESA MRI'''&amp;lt;/span&amp;gt; button to start the process of aligning the BESA Research and MRI coordinate systems. If no coregistration (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) file is defined in the dialog (empty ''Surface coregistration file edit box''), BESA Research will first prompt for a file name. We recommend saving this file to the folder where the MRIs are kept. The MRI program will then be started. When you return to the ''Coregistration Dialog'', BESA Research checks if the ''Coregistration File'' has changed. If so, the dialog is updated with the new information.&lt;br /&gt;
* Press the top &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse... '''&amp;lt;/span&amp;gt;button to select a preexisting ''Coregistration File''.&lt;br /&gt;
* The entries in the edit boxes below show the files that will be used in the BESA Research Source Analysis module when the individual MRI is loaded. When using BESA MRI the file names will be automatically filled in. If you are using BrainVoagerQX and you are following our (and the BrainVoyagerQX) recommended naming conventions for files, and the files exist, then the names will be filled in automatically after you have completed the alignment procedure in BrainVoyagerQX. Otherwise you may have to browse for the files.&lt;br /&gt;
* Below the edit boxes the FEM field states whether all necessary information for the individual FEM head model were found in the coregistration file. If the field says ''Individual FEM for EEG'' ''defined!'' then all necessary data was found and the individual FEM EEG head model can be used in the BESA Research Source Analysis module. A similar message indicates whether the FEM MEG head model is available.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note that the MRI and the surfaces are Talairach-transformed! Alignment between BESA Research and the individual MRI is done with the MRI transformed to the AC-PC coordinate system, but the BESA Research Source Analysis module uses the Talairach-transformed image data and surfaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Coregistration Using BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
It is assumed that you know how to load an MRI as a 3D data set into BrainVoyagerQX, and how to clean the image so that regions outside the head are black. We also assume knowledge of how to create AC-PC-aligned and Talairach-transformed MRIs.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* BESA Research. Start the ''Coregistration Dialog''. Export the Coregistration File (head surface points) from your data by pressing the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; '''BrainVoyagerQX'''&amp;lt;/span&amp;gt; button in the dialog. Save the file to the directory where your MRI is located. BrainVoyagerQX is started.&lt;br /&gt;
* BrainVoyagerQX. Load the MRI corresponding to the EEG/MEG data. For optimal performance, the MRI should be cleaned so that regions outside the head are black. Prepare an AC-PC-transformed MRI and a Talairach MRI. For each, generate a surface mesh. Save these files following our recommended naming conventions (see chapter [[Integration_with_MRI_and_fMRI#MRI_file_Name_Conventions|MRI File Name Conventions]]). Save the Talairach coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If these steps have already been performed, load the ACPC MRI and load the ACPC mesh. If you want to generate a brain surface mesh, see chapter [[Integration_with_MRI_and_fMRI#How_to_Generate_a_Brain_Surface_Mesh|How to Generate a Brain Surface Mesh]].&lt;br /&gt;
* BrainVoyagerQX. Load the Coregistration File (''EEG-MEG BESA/Load Surface Points''). The points will be displayed, but they are not aligned to the head:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (2).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Define fiducial points on the head surface. Right click on the 3D head display and select the ''Fiducials Dialog'' in the drop-down menu:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (3).gif ‎]]  [[Image:MRI Integration (4).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Rotate the head (by holding the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Shift '''&amp;lt;/span&amp;gt;button down and clicking and dragging with the mouse) so that the Nasion is clearly visible. Move the mouse to the Nasion, and press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl+Left Click'''&amp;lt;/span&amp;gt;. The coordinates of the Nasion are inserted into the dialog. Repeat for the left preauricular point, and then for the right preauricular point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (5).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: if you have defined your fiducials differently in your BESA Research data (e.g. ear holes), click on the corresponding points in the MRI. If you have additional head surface points (step 8), accuracy in pinpointing the fiducials is not critical.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. In the Fiducials Dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Fit fiducials'''&amp;lt;/span&amp;gt; button. The head surface points are now more or less aligned to the head.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (6).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Now select '''''EEG-MEG BESA/Fit Surface Points...'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (7).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not see the right half of the dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Advanced &amp;gt;&amp;gt;'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Specify the distances of the digitization points from the skin. In the illustration above, the digitization points for electrodes are estimated to be 8 mm from the surface of the head. For the purpose of accurate alignment, the distance of digitization points from skin section of the dialog needs to be filled in correctly. We recommend that &amp;quot;Restrain solution around fiducials&amp;quot; is checked, and a reasonable limit (here 3 mm) of the restraint is defined. Then press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (8).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BrainVoyager fits the points to the head, stretching x, y, and z coordinates to obtain a better fit than before.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: The fit performed during this step accounts for scaling inequalities between the x, y, and z axes in the MRI. Coregistration gains in accuracy over the use of fiducials alone a) because more head surface points are used, and b) because the scaling inequalities are accounted for.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alignment is now completed. If you only want to display the structural MRI in the BESA Source Module, you can return to the BESA Coregistration Dialog.&lt;br /&gt;
* BESA Research. When you switch back to the Coregistration Dialog, BESA Research will try to fill in the names of the Talairach MRI and surface meshes. If the names are not filled in, use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse...'''&amp;lt;/span&amp;gt; buttons to select the MRI and surface meshes. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to save the Coregistration File. Alignment is completed!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The alignment steps need only be performed once for a given MRI and EEG/MEG data set. Otherwise, after starting BrainVoyager, just load the MRI, the surface mesh, and the surface points (see [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done |How to Set Up Coregistration with BrainVoyager after Alignment has been Done]]). Now the following actions are possible: see chapters&lt;br /&gt;
&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-Locate Sources and MRI in the BESA Research Source Module]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]&lt;br /&gt;
&lt;br /&gt;
=== MRI file Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
If you follow the naming conventions for file names as described here, BESA Research detects the file names it requires, and the ''Coregistration Dialog'' is filled in automatically.&lt;br /&gt;
&lt;br /&gt;
Please note that BESA MRI automatically uses these naming conventions for the generated files.&lt;br /&gt;
&lt;br /&gt;
* '''The AC-PC MRI file name''' should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.srf'''&amp;lt;/span&amp;gt;&amp;quot;. After alignment, BrainVoyagerQX writes these names to the Coregistration File.&lt;br /&gt;
* '''The Talairach MRI file name '''should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If defined, the brain surface mesh should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot; ('''WM''' = '''w'''hite '''m'''atter).&lt;br /&gt;
* '''How BESA Research finds the Talairach files.''' When BESA Research rereads the Coregistration File after alignment of the coordinate systems, it finds the ACPC file names and defines the corresponding TAL file names. If these files exist, the names are entered into the Coregistration Dialog. For instance, if the Coregistration File contains the name &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for the files &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;, and &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If these files exist, they are entered into the dialog.&lt;br /&gt;
* '''Older BrainVoyager version.''' If you use BrainVoyager.exe to align coordinate systems, the file names are not saved with the Coregistration File. In this case, browse for the Talairach or the ACPC MRI from the Coregistration Dialog. BESA Research will use the rules as described above to insert the correct file names into the dialog.&lt;br /&gt;
* '''Missing Talairach coordinates.''' If, after aligning coordinate systems, the Talairach coordinates are missing from the Coregistration File (you forgot to load the Talairach coordinates in BrainVoyagerQX, or you used BrainVoyager.exe), BESA Research will look for a file ending with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot;, and read the coordinates from this file. You can also browse for a &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file in the Coregistration Dialog. For instance, if the MRI file is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MR_'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot; to find the Talairach coordinates.&lt;br /&gt;
* '''File names in the Coregistration File are saved relative to the Coregistration File location, if they are in the same folder.''' If the MRIs are in the same folder as the Coregistration File they will be recorded as &amp;quot;.\filename&amp;quot; (e.g. &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.\MRI PB_tal.vmr'''&amp;lt;/span&amp;gt;&amp;quot;). This means that you can copy the Coregistration File together with the MRIs and meshes to a different folder, and BESA Research will be able to locate the files when the Coregistration File is opened. If the MRIs are saved in a different folder from the Coregistration File, the absolute paths are saved in the file. If the files are moved to new locations, you will have to restart the Coregistration Dialog and redefine the file locations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to Generate a Brain Surface Mesh ===&lt;br /&gt;
&lt;br /&gt;
BESA Research is able to compute surface images, such as (Cortical LORETA, Cortical CLARA, Minimum Norm) using an individual cortex surface as the source space. A suitable cortex surface for this purpose can be effortlessly created using BESA MRI. Alternatively, BrainVoyager can be used for the creation of the brain surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA MRI'''&lt;br /&gt;
* The brain surface generation is performed as one work step of the BESA MRI segmentation workflow.&lt;br /&gt;
* The cortex surface reconstruction is done using a robust and accurate automatic segmentation procedure.&lt;br /&gt;
* Details on how to generate the brain surface mesh in BESA MRI can be found in the coregistration quickguide which is available on the BESA homepage: [http://www.besa.de/downloads/quick-guides/ Quick Guides].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BrainVoyager'''&lt;br /&gt;
* BrainVoyagerQX provides a semiautomatic procedure to generate meshes for the brain surface of the Talairach MRI. Please refer to the BrainVoyager Help to find out how to do this.&lt;br /&gt;
* The result of the BrainVoyager procedure is two meshes, one for the left and one for the right hemisphere.&lt;br /&gt;
* BESA Research requires a single mesh. Therefore, load first one mesh (''Meshes/Load Mesh..''.), and append the other mesh (''Meshes/Add Mesh...''). Merge these two meshes (''Meshes/Merge'' ''meshes in surface window'') and then save the result (''Meshes/Save Mesh...''). If possible, use the recommended name conventions for the resulting file (file name ends in &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf&amp;quot;). '''&amp;lt;/span&amp;gt;For instance, if the Talairach MRI is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, name the brain surface mesh &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;.&lt;br /&gt;
* See also the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website: [http://brainvoyager.com/Downloads.html BrainVoyager Downloads].&lt;br /&gt;
&lt;br /&gt;
==  Co-locating Dipoles and MRI Locations ==&lt;br /&gt;
&lt;br /&gt;
=== Co-locating Sources and MRI in the BESA Research Source Module ===&lt;br /&gt;
&lt;br /&gt;
If the alignment procedure using BESA MRI (or BrainVoyager) has been completed then you can load the individual structural MRI in the Source Module by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''A''''&amp;lt;/span&amp;gt; or using a mouse right click and selecting '''''Display MRI'''''.&lt;br /&gt;
&lt;br /&gt;
Sources in the current model are then overlayed onto the individual MRI.&lt;br /&gt;
&lt;br /&gt;
A double-click at any location in the MRI will define a new source at the corresponding location in the BESA Research head model.&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (9).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
=== Coregistration with BrainVoyager after Alignment has been Done ===&lt;br /&gt;
&lt;br /&gt;
Alignment between BESA Research and BrainVoyager is only required once for a given BESA Research data set and the corresponding MRI. At a later time, if you want to Co-locate sources between BESA Research and BrainVoyager, perform the following steps in BrainVoyager:&lt;br /&gt;
* Load the MRI.&lt;br /&gt;
* Load the head surface mesh (''Meshes/Load Mesh..''.).&lt;br /&gt;
* Load the Coregistration File (''EEG-MEG BESA/Load Surface Points..''.).&lt;br /&gt;
&lt;br /&gt;
BrainVoyager is now ready for Co-location.&lt;br /&gt;
&lt;br /&gt;
=== Send a Dipole from BESA Research to BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
First, start BrainVoyager(QX). This can be done from the BESA Research Source Module by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager '''&amp;lt;/span&amp;gt;button. Note that in the Source Module, the ''Options / Preferences / BrainVoyager'' tab allows to define the path to BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
In BrainVoyager, [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|set up coregistration]].&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, highlight the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
Program control will automatically switch to BrainVoyager. The head will be cut at the section corresponding to the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (10).gif‎|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that all dipoles in the current model are sent to BrainVoyager. The highlighted dipole (here, the red dipole) determines the plane at which the head will be cut.&lt;br /&gt;
&lt;br /&gt;
Note that the dipoles are visible in both the surface module and in the 2D view:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (11).gif|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Define a Dipole in BESA Research at a Location Defined in the MRI ===&lt;br /&gt;
&lt;br /&gt;
First set up coregistration (see chapter [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|Coregistration with BrainVoyager after Alignment has been Done]]).&lt;br /&gt;
&lt;br /&gt;
In the BrainVoyager 2D MRI view, place the mouse over the point at which you would like to define a dipole. Right click at this point. If this point lies within an fRMI cluster, BrainVoyager will automatically determine its center and use it as a seeding point instead. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send Seed Point To BESA....'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (12).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
The following Dialog is opened:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (13).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send to BESA'''&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BESA Source Analysis window appears. The new dipole or regional source (depending on the setting in the ‘Options’ dialog in the Source Analysis window is now displayed at the corresponding location. If a dipole is seeded, BESA automatically fits its orientation. For further adjustment of the model, you may need to refit the orientation, e.g. at a certain time range, or in the presence of other sources.&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website: [http://brainvoyager.com/Downloads.html BrainVoyager Downloads].&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration File (*.sfh) ===&lt;br /&gt;
&lt;br /&gt;
This file is used to mediate between BESA Research and BESA MRI (or BrainVoyager(QX)). When it is first written by BESA Research, it contains a list of the digitized head surface points (fiducials, electrodes, other digitized points), e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
NrOfPoints: 68&lt;br /&gt;
 Fid_Nz                    0.00000     103.10000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T9                  -78.40000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T10                  73.00000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Ele_E1                  -28.70000      23.90000     122.30000   3 255    0    0&lt;br /&gt;
 Ele_E2                  -80.40000      19.80000      75.90000   3 255    0    0&lt;br /&gt;
 Ele_E3                  -84.00000      37.90000       9.00000   3 255    0    0&lt;br /&gt;
 Ele_E4                  -17.60000      92.90000      89.10000   3 255    0    0&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
 Ele_E63                  -6.80000    -104.00000      54.40000   3 255    0    0&lt;br /&gt;
 Ele_E64                 -42.80000     -46.90000     115.60000   3 255    0    0&lt;br /&gt;
 Ele_Cz'                  -2.10000       2.20000     131.10000   3 255    0    0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line contains a label, the coordinates in the Head Coordinate system, and parameters specifying the size and color of the sensor or head surface point as displayed in BESA MRI (or BrainVoyager).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After aligning the coordinate systems, BESA MRI (or BrainVoyagerQX) appends lines defining the transformation between the BESA Research and the MRI coordinate systems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Trans-data(in BV-coords): 3 translation, 3 rotation (in grad), 3 scale&lt;br /&gt;
37.435 15.811 2.820 0.025 1.938 8.779  1.009 0.973 0.977&lt;br /&gt;
Fiducials:&lt;br /&gt;
41.7873  148.0180  128.0844&lt;br /&gt;
154.7772  169.4783  204.1080&lt;br /&gt;
147.0154  168.9746  54.1266&lt;br /&gt;
Midpoint (in BV-coords):&lt;br /&gt;
128.0000  128.0000  128.0000&lt;br /&gt;
Volume:  C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.vmr&lt;br /&gt;
Surface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.srf&lt;br /&gt;
AC: 128 128 128&lt;br /&gt;
PC: 154 128 128&lt;br /&gt;
AP: 58 128 128&lt;br /&gt;
PP: 241 129 130&lt;br /&gt;
SP: 154 50 128&lt;br /&gt;
IP: 128 172 128&lt;br /&gt;
RP: 128 128 60&lt;br /&gt;
LP: 165 128 198&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Older versions of BrainVoyager.exe do not append the lines starting with &amp;quot;Volume&amp;quot;. In addition, the Talairach coordinates (starting at &amp;quot;AC: ...&amp;quot;) are not appended if they were not loaded in BrainVoyagerQX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, when the Coregistration Dialog in BESA Research has found the Talairach MRI and surface meshes, and you press the OK button, BESA Research appends the additional file names:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TalVolume: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.vmr&lt;br /&gt;
TalSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.srf&lt;br /&gt;
TalBrainSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal_wm.srf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA MRI already inserts the correct file names into the coregistration file when doing the coregistration. When also an EEG or MEG  FEM head model is generated then additional lines are appended to the coregistration file containing the file names of the generated FEM data files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MRI Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend a high quality T1-weighted anatomical image with 1 mm³ voxels (e.g. 256 x 256 saggital scan with 1 mm spacing).&lt;br /&gt;
&lt;br /&gt;
In order to define the surface mesh, a clear contrast between the head surface and the outside of the head (T1-weighting) is required. Noise and measurement artifacts can influence the representation of the scalp surface. When doing the coregistration in BrainVoyager improvements in noisy images often can be achieved by cleaning up the image after first reading it using the tools provided by BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
For coregistration with head surface points, it is useful to include the whole head in the image, including nose and ears. If surface points on the nose are included with the EEG/MEG data set, these points help to stabilize the fit of head surface points to the surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EEG/MEG Data Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend several (30 or more) digitized head surface points in addition to the fiducials, including points on the nose (nose tip and sides). These points may include electrodes. In the case of electrodes, it is important to measure the distance from the scalp to the digitization point, i.e. the electrode thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI</id>
		<title>Integration with MRI and fMRI</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI"/>
				<updated>2021-05-06T07:05:04Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Define a Dipole in BESA Research at a Location Defined in the MRI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA MRI&lt;br /&gt;
|version = BESA Research 6.1 or higher&amp;lt;br/&amp;gt;BESA MRI 2.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- = BESA Research Integration with MRI and fMRI = --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Both for developing and evaluating dipole source models of EEG or MEG activity, it is useful to have access to structural MRI or fMRI data.&lt;br /&gt;
&lt;br /&gt;
The BESA MRI software allows to preprocess structural MRI data so that the individual anatomical information contained in the MRI can be utilized in BESA Research. BESA MRI makes it possible ...&lt;br /&gt;
* ... to align the EEG and MEG sensors with the structural MRI data.&lt;br /&gt;
* ... to read and display the aligned, individual Talairach structural MRIs directly in the BESA Research Source Analysis module. In this way, source analysis results can be presented on top of the aligned MRIs, which allows us to evaluate the anatomical regions to which the reconstructed sources may correspond.&lt;br /&gt;
* ... to use an individual, realistically shaped FEM head model for source analysis in BESA Research. FEM head models take into account the individual volume conduction properties of the subject's head derived from the structural MRI data. This allows for more accurate source analysis (Yvert 1997, Lanfer 2012).&lt;br /&gt;
&lt;br /&gt;
To offer an easy integration with fMRI data we have, in collaboration with Rainer Goebel, optimized the interface between BESA Research and BrainVoyagerQX. &lt;br /&gt;
&lt;br /&gt;
With these tools, we can ...&lt;br /&gt;
* ... use fMRI BOLD regions or MRI structures to initialize dipole models.&lt;br /&gt;
* ... visualize dipoles from BESA Research models together with the structural MRI in BrainVoyager in order to evaluate the regions to which the dipoles may correspond.&lt;br /&gt;
* ... combine the localization advantages of (f)MRI with the high temporal resolution of EEG and MEG, for instance by using (f)MRI to place the sources, and the source waveforms of BESA Research to provide feedback about the time course of the source activity.&lt;br /&gt;
* ... overlay source analysis results obtained in BESA Research with fMRI data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' For simpler coregistration, we recommend to use BrainVoyagerQX rather than the older BrainVoyager, but BESA Research will work with both program versions.&lt;br /&gt;
&lt;br /&gt;
The chapters below describe the steps necessary to integrate the MRI and fMRI data with BESA Research. Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([https://www.brainvoyager.com/downloads/downloads.html BrainVoyager - Downloads]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Aligning Coordinate Systems'''&lt;br /&gt;
&lt;br /&gt;
* For a given BESA data set, the electrode and other head surface points need to be aligned to the MRI coordinates.&lt;br /&gt;
* The basic steps necessary to align the EEG electrode locations, the MEG sensors and the MRI are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How Coregistration is done]].&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BESA MRI can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BrainVoyager are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How To set up Coregistration between BESA and BrainVoyager]].&lt;br /&gt;
* In BESA Research, all necessary settings with regard to the alignment are made in the [[Integration_with_MRI_and_fMRI#The_Coregistration_Dialog|Coregistration Dialog]].&lt;br /&gt;
* Requirements with respect to the MRI data for a good coregistration can be found in Section [[#MRI_Requirements_for_Good_Coregistration|MRI Requirements for Good Coregistration]].&lt;br /&gt;
* Requirements with respect to EEG and MEG data for a good coregistration can be found in Section [[#EEG/MEG Data Requirements for Good Coregistration|EEG/MEG Data Requirements for Good Coregistration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Generating an individual, realistically shaped FEM head model'''&lt;br /&gt;
&lt;br /&gt;
* The generation of a FEM head model that can be used in BESA Research is done in BESA MRI as an additional step following the EEG / MEG to MRI coregistration.&lt;br /&gt;
* Detailed instructions on how to generate the FEM head model can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Co-locating dipoles and MRI locations'''&lt;br /&gt;
&lt;br /&gt;
* After aligning the EEG / MEG and the MRI data it is possible to co-locate dipoles and MRI locations. This means, it is possible to visualize the dipoles and to specify the dipole parameters in the MRI coordinate system.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-locate sources and MRI in the BESA Research Source Module]] describes how in the BESA Research Source Analysis module dipoles can directly be visualized in the space of the individual MRI.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]] describes how to send a source model from BESA Research to BrainVoyager for further inspection.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]] describes how to insert a dipole at a location defined in the MRI in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
Lanfer, B., I. Paul-Jordanov, M. Scherg, and C. H. Wolters. “Influence of Interior Cerebrospinal Fluid Compartments on EEG Source Analysis.” In Proceedings BMT 2012, Vol. 57. Jena: De Gruyter, 2012. doi:10.1515/bmt-2012-4020.&lt;br /&gt;
&lt;br /&gt;
Yvert, B., O. Bertrand, M. Thévenet, J. F. Echallier, and J. Pernier. “A Systematic Evaluation of the Spherical Model Accuracy in EEG Dipole Localization.” Electroencephalography and Clinical Neurophysiology 102, no. 5 (May 1997): 452–59. doi:16/S0921-884X(97)96611-X.&lt;br /&gt;
&lt;br /&gt;
== How Coregistration is done ==&lt;br /&gt;
&lt;br /&gt;
This section outlines the basic steps to coregister the EEG / MEG data to an individual MRI. These steps are necessary to load an individual MRI into BESA Research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What happens:'''&lt;br /&gt;
&lt;br /&gt;
* EEG / MEG sensor locations and the MRI data are defined in different coordinate systems. Setting up coregistration is the process of aligning the two coordinate systems.&lt;br /&gt;
* BESA Research uses the ''Coregistration Dialog'' to coordinate the alignment procedure.&lt;br /&gt;
* Alignment is done with the ''AC-PC-transformed MRI''.&lt;br /&gt;
* BESA Research displays the ''Talairach-transformed MRI'' in the source analysis module.&lt;br /&gt;
* A coregistration file (with the extension &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.sfh'''&amp;lt;/span&amp;gt;&amp;quot;) is used to mediate between BESA Research and BESA MRI (or BrainVoyagerQX):&lt;br /&gt;
* BESA Research writes the coregistration file which contains the coordinates of head surface points (fiducials, electrodes, other digitized surface points).&lt;br /&gt;
* The coordinates are read into BESA MRI (or BrainVoyager), and aligned with the AC-PC-transformed MRI. The alignment information is then appended to the ''coregistration file''. The names of the AC-PC MRI (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.vmr&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the surface mesh (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.srf&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), and, if available, the Talairach transformation, are also appended.&lt;br /&gt;
* BESA Research reads the coregistration file and appends the name of the Talairach-transformed MRI and head surface. If a brain surface has been created, this is also appended.&lt;br /&gt;
* Subsequently, BESA Research reads the coregistration file automatically when loading the data file.&lt;br /&gt;
* In the BESA Research source module, the individual MRI is displayed instead of the standard MRI. Talairach coordinates of dipoles are the &amp;quot;real&amp;quot; Talairach coordinates as defined, e.g., in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The steps you have to take (once for each data set):'''&lt;br /&gt;
&lt;br /&gt;
* From the BESA Research ''Coregistration Dialog'', write a coregistration file. Switch to BESA MRI (or BrainVoyagerQX).&lt;br /&gt;
* If BESA MRI is used follow the steps in the coregistration quickguide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* If BrainVoyager is used follow the steps in Section “''How to set up coregistration between BESA and BrainVoyager”.''&lt;br /&gt;
* Back in BESA Research, reload the altered '''coregistration file'''. When using BESA MRI the file names of the generated surface and volume data files will be automatically filled in. When using BrainVoyager file names are only filled in automatically when the files are named according to the file naming conventions. Otherwise, file names have to be set manually.&lt;br /&gt;
* The coregistration file is now associated with the data file in the BESA Research database and will be used automatically the next time the file is opened in BESA Research. If the database entry is cleared, and the data are reloaded, you must make sure the coregistration file is also loaded (either using the ''Coregistration Dialog'' or the ''Channel and digitized head surface point information Dialog'').&lt;br /&gt;
&lt;br /&gt;
==  Alignment of BESA and MRICoordinate Systems  ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration Dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog is opened either from the ''Channel and digitized head surface point information'' (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) ''dialog ''by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit/Coreg'''&amp;lt;/span&amp;gt; button, or from the main menu (&amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File/MRI&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Coregistration...'''&amp;lt;/span&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the coregistration dialog is invoked from an EEG data set in which no digitized electrode coordinates are available (i.e. standard electrode positions located on a sphere are assumed), BESA Research presents a warning message, saying that for MRI coregistration realistic electrode coordinates produce better results. BESA Research has a list of such realistic standard coordinates (i.e. located on a pre-defined standard head surface) for various electrodes available in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;, which is located in the Standard Electrode folder. If all electrodes in the dataset are listed in this file, a dialog window suggests to apply this file to the current data set, i.e. to switch from standard sphere coordinates to the standard realistic electrode coordinates in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;. If the suggestion is accepted, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; is assigned to the dataset (see Channel and digitized head surface point information (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) dialog).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Dialog:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (1).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Select MRI prog'''&amp;lt;/span&amp;gt; button to select your preferred MRI program. The current choice is between ''BESA MRI.exe'' and ''BrainVoyagerQX.exe''. The path to the MRI program is saved (in ''System\BESA.set'') and will be remembered by BESA Research. The top right hand button (now showing '''BESA MRI''') shows the current selection.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BESA MRI'''&amp;lt;/span&amp;gt; button to start the process of aligning the BESA Research and MRI coordinate systems. If no coregistration (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) file is defined in the dialog (empty ''Surface coregistration file edit box''), BESA Research will first prompt for a file name. We recommend saving this file to the folder where the MRIs are kept. The MRI program will then be started. When you return to the ''Coregistration Dialog'', BESA Research checks if the ''Coregistration File'' has changed. If so, the dialog is updated with the new information.&lt;br /&gt;
* Press the top &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse... '''&amp;lt;/span&amp;gt;button to select a preexisting ''Coregistration File''.&lt;br /&gt;
* The entries in the edit boxes below show the files that will be used in the BESA Research Source Analysis module when the individual MRI is loaded. When using BESA MRI the file names will be automatically filled in. If you are using BrainVoagerQX and you are following our (and the BrainVoyagerQX) recommended naming conventions for files, and the files exist, then the names will be filled in automatically after you have completed the alignment procedure in BrainVoyagerQX. Otherwise you may have to browse for the files.&lt;br /&gt;
* Below the edit boxes the FEM field states whether all necessary information for the individual FEM head model were found in the coregistration file. If the field says ''Individual FEM for EEG'' ''defined!'' then all necessary data was found and the individual FEM EEG head model can be used in the BESA Research Source Analysis module. A similar message indicates whether the FEM MEG head model is available.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note that the MRI and the surfaces are Talairach-transformed! Alignment between BESA Research and the individual MRI is done with the MRI transformed to the AC-PC coordinate system, but the BESA Research Source Analysis module uses the Talairach-transformed image data and surfaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Coregistration Using BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
It is assumed that you know how to load an MRI as a 3D data set into BrainVoyagerQX, and how to clean the image so that regions outside the head are black. We also assume knowledge of how to create AC-PC-aligned and Talairach-transformed MRIs.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* BESA Research. Start the ''Coregistration Dialog''. Export the Coregistration File (head surface points) from your data by pressing the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; '''BrainVoyagerQX'''&amp;lt;/span&amp;gt; button in the dialog. Save the file to the directory where your MRI is located. BrainVoyagerQX is started.&lt;br /&gt;
* BrainVoyagerQX. Load the MRI corresponding to the EEG/MEG data. For optimal performance, the MRI should be cleaned so that regions outside the head are black. Prepare an AC-PC-transformed MRI and a Talairach MRI. For each, generate a surface mesh. Save these files following our recommended naming conventions (see chapter [[Integration_with_MRI_and_fMRI#MRI_file_Name_Conventions|MRI File Name Conventions]]). Save the Talairach coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If these steps have already been performed, load the ACPC MRI and load the ACPC mesh. If you want to generate a brain surface mesh, see chapter [[Integration_with_MRI_and_fMRI#How_to_Generate_a_Brain_Surface_Mesh|How to Generate a Brain Surface Mesh]].&lt;br /&gt;
* BrainVoyagerQX. Load the Coregistration File (''EEG-MEG BESA/Load Surface Points''). The points will be displayed, but they are not aligned to the head:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (2).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Define fiducial points on the head surface. Right click on the 3D head display and select the ''Fiducials Dialog'' in the drop-down menu:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (3).gif ‎]]  [[Image:MRI Integration (4).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Rotate the head (by holding the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Shift '''&amp;lt;/span&amp;gt;button down and clicking and dragging with the mouse) so that the Nasion is clearly visible. Move the mouse to the Nasion, and press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl+Left Click'''&amp;lt;/span&amp;gt;. The coordinates of the Nasion are inserted into the dialog. Repeat for the left preauricular point, and then for the right preauricular point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (5).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: if you have defined your fiducials differently in your BESA Research data (e.g. ear holes), click on the corresponding points in the MRI. If you have additional head surface points (step 8), accuracy in pinpointing the fiducials is not critical.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. In the Fiducials Dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Fit fiducials'''&amp;lt;/span&amp;gt; button. The head surface points are now more or less aligned to the head.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (6).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Now select '''''EEG-MEG BESA/Fit Surface Points...'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (7).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not see the right half of the dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Advanced &amp;gt;&amp;gt;'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Specify the distances of the digitization points from the skin. In the illustration above, the digitization points for electrodes are estimated to be 8 mm from the surface of the head. For the purpose of accurate alignment, the distance of digitization points from skin section of the dialog needs to be filled in correctly. We recommend that &amp;quot;Restrain solution around fiducials&amp;quot; is checked, and a reasonable limit (here 3 mm) of the restraint is defined. Then press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (8).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BrainVoyager fits the points to the head, stretching x, y, and z coordinates to obtain a better fit than before.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: The fit performed during this step accounts for scaling inequalities between the x, y, and z axes in the MRI. Coregistration gains in accuracy over the use of fiducials alone a) because more head surface points are used, and b) because the scaling inequalities are accounted for.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alignment is now completed. If you only want to display the structural MRI in the BESA Source Module, you can return to the BESA Coregistration Dialog.&lt;br /&gt;
* BESA Research. When you switch back to the Coregistration Dialog, BESA Research will try to fill in the names of the Talairach MRI and surface meshes. If the names are not filled in, use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse...'''&amp;lt;/span&amp;gt; buttons to select the MRI and surface meshes. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to save the Coregistration File. Alignment is completed!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The alignment steps need only be performed once for a given MRI and EEG/MEG data set. Otherwise, after starting BrainVoyager, just load the MRI, the surface mesh, and the surface points (see [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done |How to Set Up Coregistration with BrainVoyager after Alignment has been Done]]). Now the following actions are possible: see chapters&lt;br /&gt;
&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-Locate Sources and MRI in the BESA Research Source Module]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]&lt;br /&gt;
&lt;br /&gt;
=== MRI file Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
If you follow the naming conventions for file names as described here, BESA Research detects the file names it requires, and the ''Coregistration Dialog'' is filled in automatically.&lt;br /&gt;
&lt;br /&gt;
Please note that BESA MRI automatically uses these naming conventions for the generated files.&lt;br /&gt;
&lt;br /&gt;
* '''The AC-PC MRI file name''' should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.srf'''&amp;lt;/span&amp;gt;&amp;quot;. After alignment, BrainVoyagerQX writes these names to the Coregistration File.&lt;br /&gt;
* '''The Talairach MRI file name '''should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If defined, the brain surface mesh should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot; ('''WM''' = '''w'''hite '''m'''atter).&lt;br /&gt;
* '''How BESA Research finds the Talairach files.''' When BESA Research rereads the Coregistration File after alignment of the coordinate systems, it finds the ACPC file names and defines the corresponding TAL file names. If these files exist, the names are entered into the Coregistration Dialog. For instance, if the Coregistration File contains the name &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for the files &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;, and &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If these files exist, they are entered into the dialog.&lt;br /&gt;
* '''Older BrainVoyager version.''' If you use BrainVoyager.exe to align coordinate systems, the file names are not saved with the Coregistration File. In this case, browse for the Talairach or the ACPC MRI from the Coregistration Dialog. BESA Research will use the rules as described above to insert the correct file names into the dialog.&lt;br /&gt;
* '''Missing Talairach coordinates.''' If, after aligning coordinate systems, the Talairach coordinates are missing from the Coregistration File (you forgot to load the Talairach coordinates in BrainVoyagerQX, or you used BrainVoyager.exe), BESA Research will look for a file ending with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot;, and read the coordinates from this file. You can also browse for a &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file in the Coregistration Dialog. For instance, if the MRI file is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MR_'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot; to find the Talairach coordinates.&lt;br /&gt;
* '''File names in the Coregistration File are saved relative to the Coregistration File location, if they are in the same folder.''' If the MRIs are in the same folder as the Coregistration File they will be recorded as &amp;quot;.\filename&amp;quot; (e.g. &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.\MRI PB_tal.vmr'''&amp;lt;/span&amp;gt;&amp;quot;). This means that you can copy the Coregistration File together with the MRIs and meshes to a different folder, and BESA Research will be able to locate the files when the Coregistration File is opened. If the MRIs are saved in a different folder from the Coregistration File, the absolute paths are saved in the file. If the files are moved to new locations, you will have to restart the Coregistration Dialog and redefine the file locations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to Generate a Brain Surface Mesh ===&lt;br /&gt;
&lt;br /&gt;
BESA Research is able to compute surface images, such as (Cortical LORETA, Cortical CLARA, Minimum Norm) using an individual cortex surface as the source space. A suitable cortex surface for this purpose can be effortlessly created using BESA MRI. Alternatively, BrainVoyager can be used for the creation of the brain surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA MRI'''&lt;br /&gt;
* The brain surface generation is performed as one work step of the BESA MRI segmentation workflow.&lt;br /&gt;
* The cortex surface reconstruction is done using a robust and accurate automatic segmentation procedure.&lt;br /&gt;
* Details on how to generate the brain surface mesh in BESA MRI can be found in the coregistration quickguide which is available on the BESA homepage: [http://www.besa.de/downloads/quick-guides/ Quick Guides].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BrainVoyager'''&lt;br /&gt;
* BrainVoyagerQX provides a semiautomatic procedure to generate meshes for the brain surface of the Talairach MRI. Please refer to the BrainVoyager Help to find out how to do this.&lt;br /&gt;
* The result of the BrainVoyager procedure is two meshes, one for the left and one for the right hemisphere.&lt;br /&gt;
* BESA Research requires a single mesh. Therefore, load first one mesh (''Meshes/Load Mesh..''.), and append the other mesh (''Meshes/Add Mesh...''). Merge these two meshes (''Meshes/Merge'' ''meshes in surface window'') and then save the result (''Meshes/Save Mesh...''). If possible, use the recommended name conventions for the resulting file (file name ends in &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf&amp;quot;). '''&amp;lt;/span&amp;gt;For instance, if the Talairach MRI is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, name the brain surface mesh &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;.&lt;br /&gt;
* See also the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website: [http://brainvoyager.com/Downloads.html BrainVoyager Downloads].&lt;br /&gt;
&lt;br /&gt;
==  Co-locating Dipoles and MRI Locations ==&lt;br /&gt;
&lt;br /&gt;
=== Co-locating Sources and MRI in the BESA Research Source Module ===&lt;br /&gt;
&lt;br /&gt;
If the alignment procedure using BESA MRI (or BrainVoyager) has been completed then you can load the individual structural MRI in the Source Module by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''A''''&amp;lt;/span&amp;gt; or using a mouse right click and selecting '''''Display MRI'''''.&lt;br /&gt;
&lt;br /&gt;
Sources in the current model are then overlayed onto the individual MRI.&lt;br /&gt;
&lt;br /&gt;
A double-click at any location in the MRI will define a new source at the corresponding location in the BESA Research head model.&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (9).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
=== Coregistration with BrainVoyager after Alignment has been Done ===&lt;br /&gt;
&lt;br /&gt;
Alignment between BESA Research and BrainVoyager is only required once for a given BESA Research data set and the corresponding MRI. At a later time, if you want to Co-locate sources between BESA Research and BrainVoyager, perform the following steps in BrainVoyager:&lt;br /&gt;
* Load the MRI.&lt;br /&gt;
* Load the head surface mesh (''Meshes/Load Mesh..''.).&lt;br /&gt;
* Load the Coregistration File (''EEG-MEG BESA/Load Surface Points..''.).&lt;br /&gt;
&lt;br /&gt;
BrainVoyager is now ready for Co-location.&lt;br /&gt;
&lt;br /&gt;
=== Send a Dipole from BESA Research to BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
First, start BrainVoyager(QX). This can be done from the BESA Research Source Module by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager '''&amp;lt;/span&amp;gt;button. Note that in the Source Module, the ''Options / Preferences / BrainVoyager'' tab allows to define the path to BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
In BrainVoyager, [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|set up coregistration]].&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, highlight the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
Program control will automatically switch to BrainVoyager. The head will be cut at the section corresponding to the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (10).gif‎|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that all dipoles in the current model are sent to BrainVoyager. The highlighted dipole (here, the red dipole) determines the plane at which the head will be cut.&lt;br /&gt;
&lt;br /&gt;
Note that the dipoles are visible in both the surface module and in the 2D view:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (11).gif|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Define a Dipole in BESA Research at a Location Defined in the MRI ===&lt;br /&gt;
&lt;br /&gt;
First set up coregistration (see chapter [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|Coregistration with BrainVoyager after Alignment has been Done]]).&lt;br /&gt;
&lt;br /&gt;
In the BrainVoyager 2D MRI view, place the mouse over the point at which you would like to define a dipole. Right click at this point. If this point lies within an fRMI cluster, BrainVoyager will automatically determine its center and use it as a seeding point instead. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send Seed Point To BESA....'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (12).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
The following Dialog is opened:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (13).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send to BESA'''&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BESA Source Analysis window appears. The new dipole or regional source (depending on the setting in the ‘Options’ dialog in the Source Analysis window is now displayed at the corresponding location. If a dipole is seeded, BESA automatically fits its orientation. For further adjustment of the model, you may need to refit the orientation, e.g. at a certain time range, or in the presence of other sources.&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website: [http://brainvoyager.com/Downloads.html BrainVoyager Downloads].&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration File (*.sfh) ===&lt;br /&gt;
&lt;br /&gt;
This file is used to mediate between BESA Research and BESA MRI (or BrainVoyager(QX)). When it is first written by BESA Research, it contains a list of the digitized head surface points (fiducials, electrodes, other digitized points), e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
NrOfPoints: 68&lt;br /&gt;
 Fid_Nz                    0.00000     103.10000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T9                  -78.40000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T10                  73.00000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Ele_E1                  -28.70000      23.90000     122.30000   3 255    0    0&lt;br /&gt;
 Ele_E2                  -80.40000      19.80000      75.90000   3 255    0    0&lt;br /&gt;
 Ele_E3                  -84.00000      37.90000       9.00000   3 255    0    0&lt;br /&gt;
 Ele_E4                  -17.60000      92.90000      89.10000   3 255    0    0&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
 Ele_E63                  -6.80000    -104.00000      54.40000   3 255    0    0&lt;br /&gt;
 Ele_E64                 -42.80000     -46.90000     115.60000   3 255    0    0&lt;br /&gt;
 Ele_Cz'                  -2.10000       2.20000     131.10000   3 255    0    0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line contains a label, the coordinates in the Head Coordinate system, and parameters specifying the size and color of the sensor or head surface point as displayed in BESA MRI (or BrainVoyager).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After aligning the coordinate systems, BESA MRI (or BrainVoyagerQX) appends lines defining the transformation between the BESA Research and the MRI coordinate systems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Trans-data(in BV-coords): 3 translation, 3 rotation (in grad), 3 scale&lt;br /&gt;
37.435 15.811 2.820 0.025 1.938 8.779  1.009 0.973 0.977&lt;br /&gt;
Fiducials:&lt;br /&gt;
41.7873  148.0180  128.0844&lt;br /&gt;
154.7772  169.4783  204.1080&lt;br /&gt;
147.0154  168.9746  54.1266&lt;br /&gt;
Midpoint (in BV-coords):&lt;br /&gt;
128.0000  128.0000  128.0000&lt;br /&gt;
Volume:  C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.vmr&lt;br /&gt;
Surface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.srf&lt;br /&gt;
AC: 128 128 128&lt;br /&gt;
PC: 154 128 128&lt;br /&gt;
AP: 58 128 128&lt;br /&gt;
PP: 241 129 130&lt;br /&gt;
SP: 154 50 128&lt;br /&gt;
IP: 128 172 128&lt;br /&gt;
RP: 128 128 60&lt;br /&gt;
LP: 165 128 198&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Older versions of BrainVoyager.exe do not append the lines starting with &amp;quot;Volume&amp;quot;. In addition, the Talairach coordinates (starting at &amp;quot;AC: ...&amp;quot;) are not appended if they were not loaded in BrainVoyagerQX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, when the Coregistration Dialog in BESA Research has found the Talairach MRI and surface meshes, and you press the OK button, BESA Research appends the additional file names:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TalVolume: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.vmr&lt;br /&gt;
TalSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.srf&lt;br /&gt;
TalBrainSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal_wm.srf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA MRI already inserts the correct file names into the coregistration file when doing the coregistration. When also an EEG or MEG  FEM head model is generated then additional lines are appended to the coregistration file containing the file names of the generated FEM data files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MRI Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend a high quality T1-weighted anatomical image with 1 mm³ voxels (e.g. 256 x 256 saggital scan with 1 mm spacing).&lt;br /&gt;
&lt;br /&gt;
In order to define the surface mesh, a clear contrast between the head surface and the outside of the head (T1-weighting) is required. Noise and measurement artifacts can influence the representation of the scalp surface. When doing the coregistration in BrainVoyager improvements in noisy images often can be achieved by cleaning up the image after first reading it using the tools provided by BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
For coregistration with head surface points, it is useful to include the whole head in the image, including nose and ears. If surface points on the nose are included with the EEG/MEG data set, these points help to stabilize the fit of head surface points to the surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EEG/MEG Data Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend several (30 or more) digitized head surface points in addition to the fiducials, including points on the nose (nose tip and sides). These points may include electrodes. In the case of electrodes, it is important to measure the distance from the scalp to the digitization point, i.e. the electrode thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI</id>
		<title>Integration with MRI and fMRI</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI"/>
				<updated>2021-05-06T07:03:44Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* How to Generate a Brain Surface Mesh */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA MRI&lt;br /&gt;
|version = BESA Research 6.1 or higher&amp;lt;br/&amp;gt;BESA MRI 2.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- = BESA Research Integration with MRI and fMRI = --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Both for developing and evaluating dipole source models of EEG or MEG activity, it is useful to have access to structural MRI or fMRI data.&lt;br /&gt;
&lt;br /&gt;
The BESA MRI software allows to preprocess structural MRI data so that the individual anatomical information contained in the MRI can be utilized in BESA Research. BESA MRI makes it possible ...&lt;br /&gt;
* ... to align the EEG and MEG sensors with the structural MRI data.&lt;br /&gt;
* ... to read and display the aligned, individual Talairach structural MRIs directly in the BESA Research Source Analysis module. In this way, source analysis results can be presented on top of the aligned MRIs, which allows us to evaluate the anatomical regions to which the reconstructed sources may correspond.&lt;br /&gt;
* ... to use an individual, realistically shaped FEM head model for source analysis in BESA Research. FEM head models take into account the individual volume conduction properties of the subject's head derived from the structural MRI data. This allows for more accurate source analysis (Yvert 1997, Lanfer 2012).&lt;br /&gt;
&lt;br /&gt;
To offer an easy integration with fMRI data we have, in collaboration with Rainer Goebel, optimized the interface between BESA Research and BrainVoyagerQX. &lt;br /&gt;
&lt;br /&gt;
With these tools, we can ...&lt;br /&gt;
* ... use fMRI BOLD regions or MRI structures to initialize dipole models.&lt;br /&gt;
* ... visualize dipoles from BESA Research models together with the structural MRI in BrainVoyager in order to evaluate the regions to which the dipoles may correspond.&lt;br /&gt;
* ... combine the localization advantages of (f)MRI with the high temporal resolution of EEG and MEG, for instance by using (f)MRI to place the sources, and the source waveforms of BESA Research to provide feedback about the time course of the source activity.&lt;br /&gt;
* ... overlay source analysis results obtained in BESA Research with fMRI data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' For simpler coregistration, we recommend to use BrainVoyagerQX rather than the older BrainVoyager, but BESA Research will work with both program versions.&lt;br /&gt;
&lt;br /&gt;
The chapters below describe the steps necessary to integrate the MRI and fMRI data with BESA Research. Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([https://www.brainvoyager.com/downloads/downloads.html BrainVoyager - Downloads]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Aligning Coordinate Systems'''&lt;br /&gt;
&lt;br /&gt;
* For a given BESA data set, the electrode and other head surface points need to be aligned to the MRI coordinates.&lt;br /&gt;
* The basic steps necessary to align the EEG electrode locations, the MEG sensors and the MRI are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How Coregistration is done]].&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BESA MRI can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BrainVoyager are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How To set up Coregistration between BESA and BrainVoyager]].&lt;br /&gt;
* In BESA Research, all necessary settings with regard to the alignment are made in the [[Integration_with_MRI_and_fMRI#The_Coregistration_Dialog|Coregistration Dialog]].&lt;br /&gt;
* Requirements with respect to the MRI data for a good coregistration can be found in Section [[#MRI_Requirements_for_Good_Coregistration|MRI Requirements for Good Coregistration]].&lt;br /&gt;
* Requirements with respect to EEG and MEG data for a good coregistration can be found in Section [[#EEG/MEG Data Requirements for Good Coregistration|EEG/MEG Data Requirements for Good Coregistration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Generating an individual, realistically shaped FEM head model'''&lt;br /&gt;
&lt;br /&gt;
* The generation of a FEM head model that can be used in BESA Research is done in BESA MRI as an additional step following the EEG / MEG to MRI coregistration.&lt;br /&gt;
* Detailed instructions on how to generate the FEM head model can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Co-locating dipoles and MRI locations'''&lt;br /&gt;
&lt;br /&gt;
* After aligning the EEG / MEG and the MRI data it is possible to co-locate dipoles and MRI locations. This means, it is possible to visualize the dipoles and to specify the dipole parameters in the MRI coordinate system.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-locate sources and MRI in the BESA Research Source Module]] describes how in the BESA Research Source Analysis module dipoles can directly be visualized in the space of the individual MRI.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]] describes how to send a source model from BESA Research to BrainVoyager for further inspection.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]] describes how to insert a dipole at a location defined in the MRI in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
Lanfer, B., I. Paul-Jordanov, M. Scherg, and C. H. Wolters. “Influence of Interior Cerebrospinal Fluid Compartments on EEG Source Analysis.” In Proceedings BMT 2012, Vol. 57. Jena: De Gruyter, 2012. doi:10.1515/bmt-2012-4020.&lt;br /&gt;
&lt;br /&gt;
Yvert, B., O. Bertrand, M. Thévenet, J. F. Echallier, and J. Pernier. “A Systematic Evaluation of the Spherical Model Accuracy in EEG Dipole Localization.” Electroencephalography and Clinical Neurophysiology 102, no. 5 (May 1997): 452–59. doi:16/S0921-884X(97)96611-X.&lt;br /&gt;
&lt;br /&gt;
== How Coregistration is done ==&lt;br /&gt;
&lt;br /&gt;
This section outlines the basic steps to coregister the EEG / MEG data to an individual MRI. These steps are necessary to load an individual MRI into BESA Research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What happens:'''&lt;br /&gt;
&lt;br /&gt;
* EEG / MEG sensor locations and the MRI data are defined in different coordinate systems. Setting up coregistration is the process of aligning the two coordinate systems.&lt;br /&gt;
* BESA Research uses the ''Coregistration Dialog'' to coordinate the alignment procedure.&lt;br /&gt;
* Alignment is done with the ''AC-PC-transformed MRI''.&lt;br /&gt;
* BESA Research displays the ''Talairach-transformed MRI'' in the source analysis module.&lt;br /&gt;
* A coregistration file (with the extension &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.sfh'''&amp;lt;/span&amp;gt;&amp;quot;) is used to mediate between BESA Research and BESA MRI (or BrainVoyagerQX):&lt;br /&gt;
* BESA Research writes the coregistration file which contains the coordinates of head surface points (fiducials, electrodes, other digitized surface points).&lt;br /&gt;
* The coordinates are read into BESA MRI (or BrainVoyager), and aligned with the AC-PC-transformed MRI. The alignment information is then appended to the ''coregistration file''. The names of the AC-PC MRI (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.vmr&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the surface mesh (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.srf&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), and, if available, the Talairach transformation, are also appended.&lt;br /&gt;
* BESA Research reads the coregistration file and appends the name of the Talairach-transformed MRI and head surface. If a brain surface has been created, this is also appended.&lt;br /&gt;
* Subsequently, BESA Research reads the coregistration file automatically when loading the data file.&lt;br /&gt;
* In the BESA Research source module, the individual MRI is displayed instead of the standard MRI. Talairach coordinates of dipoles are the &amp;quot;real&amp;quot; Talairach coordinates as defined, e.g., in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The steps you have to take (once for each data set):'''&lt;br /&gt;
&lt;br /&gt;
* From the BESA Research ''Coregistration Dialog'', write a coregistration file. Switch to BESA MRI (or BrainVoyagerQX).&lt;br /&gt;
* If BESA MRI is used follow the steps in the coregistration quickguide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* If BrainVoyager is used follow the steps in Section “''How to set up coregistration between BESA and BrainVoyager”.''&lt;br /&gt;
* Back in BESA Research, reload the altered '''coregistration file'''. When using BESA MRI the file names of the generated surface and volume data files will be automatically filled in. When using BrainVoyager file names are only filled in automatically when the files are named according to the file naming conventions. Otherwise, file names have to be set manually.&lt;br /&gt;
* The coregistration file is now associated with the data file in the BESA Research database and will be used automatically the next time the file is opened in BESA Research. If the database entry is cleared, and the data are reloaded, you must make sure the coregistration file is also loaded (either using the ''Coregistration Dialog'' or the ''Channel and digitized head surface point information Dialog'').&lt;br /&gt;
&lt;br /&gt;
==  Alignment of BESA and MRICoordinate Systems  ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration Dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog is opened either from the ''Channel and digitized head surface point information'' (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) ''dialog ''by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit/Coreg'''&amp;lt;/span&amp;gt; button, or from the main menu (&amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File/MRI&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Coregistration...'''&amp;lt;/span&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the coregistration dialog is invoked from an EEG data set in which no digitized electrode coordinates are available (i.e. standard electrode positions located on a sphere are assumed), BESA Research presents a warning message, saying that for MRI coregistration realistic electrode coordinates produce better results. BESA Research has a list of such realistic standard coordinates (i.e. located on a pre-defined standard head surface) for various electrodes available in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;, which is located in the Standard Electrode folder. If all electrodes in the dataset are listed in this file, a dialog window suggests to apply this file to the current data set, i.e. to switch from standard sphere coordinates to the standard realistic electrode coordinates in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;. If the suggestion is accepted, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; is assigned to the dataset (see Channel and digitized head surface point information (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) dialog).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Dialog:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (1).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Select MRI prog'''&amp;lt;/span&amp;gt; button to select your preferred MRI program. The current choice is between ''BESA MRI.exe'' and ''BrainVoyagerQX.exe''. The path to the MRI program is saved (in ''System\BESA.set'') and will be remembered by BESA Research. The top right hand button (now showing '''BESA MRI''') shows the current selection.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BESA MRI'''&amp;lt;/span&amp;gt; button to start the process of aligning the BESA Research and MRI coordinate systems. If no coregistration (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) file is defined in the dialog (empty ''Surface coregistration file edit box''), BESA Research will first prompt for a file name. We recommend saving this file to the folder where the MRIs are kept. The MRI program will then be started. When you return to the ''Coregistration Dialog'', BESA Research checks if the ''Coregistration File'' has changed. If so, the dialog is updated with the new information.&lt;br /&gt;
* Press the top &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse... '''&amp;lt;/span&amp;gt;button to select a preexisting ''Coregistration File''.&lt;br /&gt;
* The entries in the edit boxes below show the files that will be used in the BESA Research Source Analysis module when the individual MRI is loaded. When using BESA MRI the file names will be automatically filled in. If you are using BrainVoagerQX and you are following our (and the BrainVoyagerQX) recommended naming conventions for files, and the files exist, then the names will be filled in automatically after you have completed the alignment procedure in BrainVoyagerQX. Otherwise you may have to browse for the files.&lt;br /&gt;
* Below the edit boxes the FEM field states whether all necessary information for the individual FEM head model were found in the coregistration file. If the field says ''Individual FEM for EEG'' ''defined!'' then all necessary data was found and the individual FEM EEG head model can be used in the BESA Research Source Analysis module. A similar message indicates whether the FEM MEG head model is available.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note that the MRI and the surfaces are Talairach-transformed! Alignment between BESA Research and the individual MRI is done with the MRI transformed to the AC-PC coordinate system, but the BESA Research Source Analysis module uses the Talairach-transformed image data and surfaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Coregistration Using BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
It is assumed that you know how to load an MRI as a 3D data set into BrainVoyagerQX, and how to clean the image so that regions outside the head are black. We also assume knowledge of how to create AC-PC-aligned and Talairach-transformed MRIs.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* BESA Research. Start the ''Coregistration Dialog''. Export the Coregistration File (head surface points) from your data by pressing the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; '''BrainVoyagerQX'''&amp;lt;/span&amp;gt; button in the dialog. Save the file to the directory where your MRI is located. BrainVoyagerQX is started.&lt;br /&gt;
* BrainVoyagerQX. Load the MRI corresponding to the EEG/MEG data. For optimal performance, the MRI should be cleaned so that regions outside the head are black. Prepare an AC-PC-transformed MRI and a Talairach MRI. For each, generate a surface mesh. Save these files following our recommended naming conventions (see chapter [[Integration_with_MRI_and_fMRI#MRI_file_Name_Conventions|MRI File Name Conventions]]). Save the Talairach coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If these steps have already been performed, load the ACPC MRI and load the ACPC mesh. If you want to generate a brain surface mesh, see chapter [[Integration_with_MRI_and_fMRI#How_to_Generate_a_Brain_Surface_Mesh|How to Generate a Brain Surface Mesh]].&lt;br /&gt;
* BrainVoyagerQX. Load the Coregistration File (''EEG-MEG BESA/Load Surface Points''). The points will be displayed, but they are not aligned to the head:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (2).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Define fiducial points on the head surface. Right click on the 3D head display and select the ''Fiducials Dialog'' in the drop-down menu:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (3).gif ‎]]  [[Image:MRI Integration (4).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Rotate the head (by holding the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Shift '''&amp;lt;/span&amp;gt;button down and clicking and dragging with the mouse) so that the Nasion is clearly visible. Move the mouse to the Nasion, and press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl+Left Click'''&amp;lt;/span&amp;gt;. The coordinates of the Nasion are inserted into the dialog. Repeat for the left preauricular point, and then for the right preauricular point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (5).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: if you have defined your fiducials differently in your BESA Research data (e.g. ear holes), click on the corresponding points in the MRI. If you have additional head surface points (step 8), accuracy in pinpointing the fiducials is not critical.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. In the Fiducials Dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Fit fiducials'''&amp;lt;/span&amp;gt; button. The head surface points are now more or less aligned to the head.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (6).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Now select '''''EEG-MEG BESA/Fit Surface Points...'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (7).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not see the right half of the dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Advanced &amp;gt;&amp;gt;'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Specify the distances of the digitization points from the skin. In the illustration above, the digitization points for electrodes are estimated to be 8 mm from the surface of the head. For the purpose of accurate alignment, the distance of digitization points from skin section of the dialog needs to be filled in correctly. We recommend that &amp;quot;Restrain solution around fiducials&amp;quot; is checked, and a reasonable limit (here 3 mm) of the restraint is defined. Then press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (8).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BrainVoyager fits the points to the head, stretching x, y, and z coordinates to obtain a better fit than before.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: The fit performed during this step accounts for scaling inequalities between the x, y, and z axes in the MRI. Coregistration gains in accuracy over the use of fiducials alone a) because more head surface points are used, and b) because the scaling inequalities are accounted for.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alignment is now completed. If you only want to display the structural MRI in the BESA Source Module, you can return to the BESA Coregistration Dialog.&lt;br /&gt;
* BESA Research. When you switch back to the Coregistration Dialog, BESA Research will try to fill in the names of the Talairach MRI and surface meshes. If the names are not filled in, use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse...'''&amp;lt;/span&amp;gt; buttons to select the MRI and surface meshes. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to save the Coregistration File. Alignment is completed!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The alignment steps need only be performed once for a given MRI and EEG/MEG data set. Otherwise, after starting BrainVoyager, just load the MRI, the surface mesh, and the surface points (see [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done |How to Set Up Coregistration with BrainVoyager after Alignment has been Done]]). Now the following actions are possible: see chapters&lt;br /&gt;
&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-Locate Sources and MRI in the BESA Research Source Module]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]&lt;br /&gt;
&lt;br /&gt;
=== MRI file Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
If you follow the naming conventions for file names as described here, BESA Research detects the file names it requires, and the ''Coregistration Dialog'' is filled in automatically.&lt;br /&gt;
&lt;br /&gt;
Please note that BESA MRI automatically uses these naming conventions for the generated files.&lt;br /&gt;
&lt;br /&gt;
* '''The AC-PC MRI file name''' should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.srf'''&amp;lt;/span&amp;gt;&amp;quot;. After alignment, BrainVoyagerQX writes these names to the Coregistration File.&lt;br /&gt;
* '''The Talairach MRI file name '''should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If defined, the brain surface mesh should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot; ('''WM''' = '''w'''hite '''m'''atter).&lt;br /&gt;
* '''How BESA Research finds the Talairach files.''' When BESA Research rereads the Coregistration File after alignment of the coordinate systems, it finds the ACPC file names and defines the corresponding TAL file names. If these files exist, the names are entered into the Coregistration Dialog. For instance, if the Coregistration File contains the name &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for the files &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;, and &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If these files exist, they are entered into the dialog.&lt;br /&gt;
* '''Older BrainVoyager version.''' If you use BrainVoyager.exe to align coordinate systems, the file names are not saved with the Coregistration File. In this case, browse for the Talairach or the ACPC MRI from the Coregistration Dialog. BESA Research will use the rules as described above to insert the correct file names into the dialog.&lt;br /&gt;
* '''Missing Talairach coordinates.''' If, after aligning coordinate systems, the Talairach coordinates are missing from the Coregistration File (you forgot to load the Talairach coordinates in BrainVoyagerQX, or you used BrainVoyager.exe), BESA Research will look for a file ending with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot;, and read the coordinates from this file. You can also browse for a &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file in the Coregistration Dialog. For instance, if the MRI file is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MR_'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot; to find the Talairach coordinates.&lt;br /&gt;
* '''File names in the Coregistration File are saved relative to the Coregistration File location, if they are in the same folder.''' If the MRIs are in the same folder as the Coregistration File they will be recorded as &amp;quot;.\filename&amp;quot; (e.g. &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.\MRI PB_tal.vmr'''&amp;lt;/span&amp;gt;&amp;quot;). This means that you can copy the Coregistration File together with the MRIs and meshes to a different folder, and BESA Research will be able to locate the files when the Coregistration File is opened. If the MRIs are saved in a different folder from the Coregistration File, the absolute paths are saved in the file. If the files are moved to new locations, you will have to restart the Coregistration Dialog and redefine the file locations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to Generate a Brain Surface Mesh ===&lt;br /&gt;
&lt;br /&gt;
BESA Research is able to compute surface images, such as (Cortical LORETA, Cortical CLARA, Minimum Norm) using an individual cortex surface as the source space. A suitable cortex surface for this purpose can be effortlessly created using BESA MRI. Alternatively, BrainVoyager can be used for the creation of the brain surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA MRI'''&lt;br /&gt;
* The brain surface generation is performed as one work step of the BESA MRI segmentation workflow.&lt;br /&gt;
* The cortex surface reconstruction is done using a robust and accurate automatic segmentation procedure.&lt;br /&gt;
* Details on how to generate the brain surface mesh in BESA MRI can be found in the coregistration quickguide which is available on the BESA homepage: [http://www.besa.de/downloads/quick-guides/ Quick Guides].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BrainVoyager'''&lt;br /&gt;
* BrainVoyagerQX provides a semiautomatic procedure to generate meshes for the brain surface of the Talairach MRI. Please refer to the BrainVoyager Help to find out how to do this.&lt;br /&gt;
* The result of the BrainVoyager procedure is two meshes, one for the left and one for the right hemisphere.&lt;br /&gt;
* BESA Research requires a single mesh. Therefore, load first one mesh (''Meshes/Load Mesh..''.), and append the other mesh (''Meshes/Add Mesh...''). Merge these two meshes (''Meshes/Merge'' ''meshes in surface window'') and then save the result (''Meshes/Save Mesh...''). If possible, use the recommended name conventions for the resulting file (file name ends in &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf&amp;quot;). '''&amp;lt;/span&amp;gt;For instance, if the Talairach MRI is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, name the brain surface mesh &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;.&lt;br /&gt;
* See also the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website: [http://brainvoyager.com/Downloads.html BrainVoyager Downloads].&lt;br /&gt;
&lt;br /&gt;
==  Co-locating Dipoles and MRI Locations ==&lt;br /&gt;
&lt;br /&gt;
=== Co-locating Sources and MRI in the BESA Research Source Module ===&lt;br /&gt;
&lt;br /&gt;
If the alignment procedure using BESA MRI (or BrainVoyager) has been completed then you can load the individual structural MRI in the Source Module by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''A''''&amp;lt;/span&amp;gt; or using a mouse right click and selecting '''''Display MRI'''''.&lt;br /&gt;
&lt;br /&gt;
Sources in the current model are then overlayed onto the individual MRI.&lt;br /&gt;
&lt;br /&gt;
A double-click at any location in the MRI will define a new source at the corresponding location in the BESA Research head model.&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (9).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
=== Coregistration with BrainVoyager after Alignment has been Done ===&lt;br /&gt;
&lt;br /&gt;
Alignment between BESA Research and BrainVoyager is only required once for a given BESA Research data set and the corresponding MRI. At a later time, if you want to Co-locate sources between BESA Research and BrainVoyager, perform the following steps in BrainVoyager:&lt;br /&gt;
* Load the MRI.&lt;br /&gt;
* Load the head surface mesh (''Meshes/Load Mesh..''.).&lt;br /&gt;
* Load the Coregistration File (''EEG-MEG BESA/Load Surface Points..''.).&lt;br /&gt;
&lt;br /&gt;
BrainVoyager is now ready for Co-location.&lt;br /&gt;
&lt;br /&gt;
=== Send a Dipole from BESA Research to BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
First, start BrainVoyager(QX). This can be done from the BESA Research Source Module by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager '''&amp;lt;/span&amp;gt;button. Note that in the Source Module, the ''Options / Preferences / BrainVoyager'' tab allows to define the path to BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
In BrainVoyager, [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|set up coregistration]].&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, highlight the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
Program control will automatically switch to BrainVoyager. The head will be cut at the section corresponding to the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (10).gif‎|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that all dipoles in the current model are sent to BrainVoyager. The highlighted dipole (here, the red dipole) determines the plane at which the head will be cut.&lt;br /&gt;
&lt;br /&gt;
Note that the dipoles are visible in both the surface module and in the 2D view:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (11).gif|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Define a Dipole in BESA Research at a Location Defined in the MRI ===&lt;br /&gt;
&lt;br /&gt;
First set up coregistration (see chapter [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|Coregistration with BrainVoyager after Alignment has been Done]]).&lt;br /&gt;
&lt;br /&gt;
In the BrainVoyager 2D MRI view, place the mouse over the point at which you would like to define a dipole. Right click at this point. If this point lies within an fRMI cluster, BrainVoyager will automatically determine its center and use it as a seeding point instead. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send Seed Point To BESA....'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (12).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
The following Dialog is opened:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (13).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send to BESA'''&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BESA Source Analysis window appears. The new dipole or regional source (depending on the setting in the ‘Options’ dialog in the Source Analysis window is now displayed at the corresponding location. If a dipole is seeded, BESA automatically fits its orientation. For further adjustment of the model, you may need to refit the orientation, e.g. at a certain time range, or in the presence of other sources.&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([http://brainvoyager.com/Downloads.html http://brainvoyager.com/Downloads.html]).&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration File (*.sfh) ===&lt;br /&gt;
&lt;br /&gt;
This file is used to mediate between BESA Research and BESA MRI (or BrainVoyager(QX)). When it is first written by BESA Research, it contains a list of the digitized head surface points (fiducials, electrodes, other digitized points), e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
NrOfPoints: 68&lt;br /&gt;
 Fid_Nz                    0.00000     103.10000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T9                  -78.40000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T10                  73.00000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Ele_E1                  -28.70000      23.90000     122.30000   3 255    0    0&lt;br /&gt;
 Ele_E2                  -80.40000      19.80000      75.90000   3 255    0    0&lt;br /&gt;
 Ele_E3                  -84.00000      37.90000       9.00000   3 255    0    0&lt;br /&gt;
 Ele_E4                  -17.60000      92.90000      89.10000   3 255    0    0&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
 Ele_E63                  -6.80000    -104.00000      54.40000   3 255    0    0&lt;br /&gt;
 Ele_E64                 -42.80000     -46.90000     115.60000   3 255    0    0&lt;br /&gt;
 Ele_Cz'                  -2.10000       2.20000     131.10000   3 255    0    0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line contains a label, the coordinates in the Head Coordinate system, and parameters specifying the size and color of the sensor or head surface point as displayed in BESA MRI (or BrainVoyager).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After aligning the coordinate systems, BESA MRI (or BrainVoyagerQX) appends lines defining the transformation between the BESA Research and the MRI coordinate systems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Trans-data(in BV-coords): 3 translation, 3 rotation (in grad), 3 scale&lt;br /&gt;
37.435 15.811 2.820 0.025 1.938 8.779  1.009 0.973 0.977&lt;br /&gt;
Fiducials:&lt;br /&gt;
41.7873  148.0180  128.0844&lt;br /&gt;
154.7772  169.4783  204.1080&lt;br /&gt;
147.0154  168.9746  54.1266&lt;br /&gt;
Midpoint (in BV-coords):&lt;br /&gt;
128.0000  128.0000  128.0000&lt;br /&gt;
Volume:  C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.vmr&lt;br /&gt;
Surface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.srf&lt;br /&gt;
AC: 128 128 128&lt;br /&gt;
PC: 154 128 128&lt;br /&gt;
AP: 58 128 128&lt;br /&gt;
PP: 241 129 130&lt;br /&gt;
SP: 154 50 128&lt;br /&gt;
IP: 128 172 128&lt;br /&gt;
RP: 128 128 60&lt;br /&gt;
LP: 165 128 198&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Older versions of BrainVoyager.exe do not append the lines starting with &amp;quot;Volume&amp;quot;. In addition, the Talairach coordinates (starting at &amp;quot;AC: ...&amp;quot;) are not appended if they were not loaded in BrainVoyagerQX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, when the Coregistration Dialog in BESA Research has found the Talairach MRI and surface meshes, and you press the OK button, BESA Research appends the additional file names:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TalVolume: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.vmr&lt;br /&gt;
TalSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.srf&lt;br /&gt;
TalBrainSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal_wm.srf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA MRI already inserts the correct file names into the coregistration file when doing the coregistration. When also an EEG or MEG  FEM head model is generated then additional lines are appended to the coregistration file containing the file names of the generated FEM data files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MRI Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend a high quality T1-weighted anatomical image with 1 mm³ voxels (e.g. 256 x 256 saggital scan with 1 mm spacing).&lt;br /&gt;
&lt;br /&gt;
In order to define the surface mesh, a clear contrast between the head surface and the outside of the head (T1-weighting) is required. Noise and measurement artifacts can influence the representation of the scalp surface. When doing the coregistration in BrainVoyager improvements in noisy images often can be achieved by cleaning up the image after first reading it using the tools provided by BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
For coregistration with head surface points, it is useful to include the whole head in the image, including nose and ears. If surface points on the nose are included with the EEG/MEG data set, these points help to stabilize the fit of head surface points to the surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EEG/MEG Data Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend several (30 or more) digitized head surface points in addition to the fiducials, including points on the nose (nose tip and sides). These points may include electrodes. In the case of electrodes, it is important to measure the distance from the scalp to the digitization point, i.e. the electrode thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI</id>
		<title>Integration with MRI and fMRI</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI"/>
				<updated>2021-05-06T06:58:03Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Alignment of BESA and MRICoordinate Systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA MRI&lt;br /&gt;
|version = BESA Research 6.1 or higher&amp;lt;br/&amp;gt;BESA MRI 2.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- = BESA Research Integration with MRI and fMRI = --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Both for developing and evaluating dipole source models of EEG or MEG activity, it is useful to have access to structural MRI or fMRI data.&lt;br /&gt;
&lt;br /&gt;
The BESA MRI software allows to preprocess structural MRI data so that the individual anatomical information contained in the MRI can be utilized in BESA Research. BESA MRI makes it possible ...&lt;br /&gt;
* ... to align the EEG and MEG sensors with the structural MRI data.&lt;br /&gt;
* ... to read and display the aligned, individual Talairach structural MRIs directly in the BESA Research Source Analysis module. In this way, source analysis results can be presented on top of the aligned MRIs, which allows us to evaluate the anatomical regions to which the reconstructed sources may correspond.&lt;br /&gt;
* ... to use an individual, realistically shaped FEM head model for source analysis in BESA Research. FEM head models take into account the individual volume conduction properties of the subject's head derived from the structural MRI data. This allows for more accurate source analysis (Yvert 1997, Lanfer 2012).&lt;br /&gt;
&lt;br /&gt;
To offer an easy integration with fMRI data we have, in collaboration with Rainer Goebel, optimized the interface between BESA Research and BrainVoyagerQX. &lt;br /&gt;
&lt;br /&gt;
With these tools, we can ...&lt;br /&gt;
* ... use fMRI BOLD regions or MRI structures to initialize dipole models.&lt;br /&gt;
* ... visualize dipoles from BESA Research models together with the structural MRI in BrainVoyager in order to evaluate the regions to which the dipoles may correspond.&lt;br /&gt;
* ... combine the localization advantages of (f)MRI with the high temporal resolution of EEG and MEG, for instance by using (f)MRI to place the sources, and the source waveforms of BESA Research to provide feedback about the time course of the source activity.&lt;br /&gt;
* ... overlay source analysis results obtained in BESA Research with fMRI data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' For simpler coregistration, we recommend to use BrainVoyagerQX rather than the older BrainVoyager, but BESA Research will work with both program versions.&lt;br /&gt;
&lt;br /&gt;
The chapters below describe the steps necessary to integrate the MRI and fMRI data with BESA Research. Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([https://www.brainvoyager.com/downloads/downloads.html BrainVoyager - Downloads]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Aligning Coordinate Systems'''&lt;br /&gt;
&lt;br /&gt;
* For a given BESA data set, the electrode and other head surface points need to be aligned to the MRI coordinates.&lt;br /&gt;
* The basic steps necessary to align the EEG electrode locations, the MEG sensors and the MRI are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How Coregistration is done]].&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BESA MRI can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BrainVoyager are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How To set up Coregistration between BESA and BrainVoyager]].&lt;br /&gt;
* In BESA Research, all necessary settings with regard to the alignment are made in the [[Integration_with_MRI_and_fMRI#The_Coregistration_Dialog|Coregistration Dialog]].&lt;br /&gt;
* Requirements with respect to the MRI data for a good coregistration can be found in Section [[#MRI_Requirements_for_Good_Coregistration|MRI Requirements for Good Coregistration]].&lt;br /&gt;
* Requirements with respect to EEG and MEG data for a good coregistration can be found in Section [[#EEG/MEG Data Requirements for Good Coregistration|EEG/MEG Data Requirements for Good Coregistration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Generating an individual, realistically shaped FEM head model'''&lt;br /&gt;
&lt;br /&gt;
* The generation of a FEM head model that can be used in BESA Research is done in BESA MRI as an additional step following the EEG / MEG to MRI coregistration.&lt;br /&gt;
* Detailed instructions on how to generate the FEM head model can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Co-locating dipoles and MRI locations'''&lt;br /&gt;
&lt;br /&gt;
* After aligning the EEG / MEG and the MRI data it is possible to co-locate dipoles and MRI locations. This means, it is possible to visualize the dipoles and to specify the dipole parameters in the MRI coordinate system.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-locate sources and MRI in the BESA Research Source Module]] describes how in the BESA Research Source Analysis module dipoles can directly be visualized in the space of the individual MRI.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]] describes how to send a source model from BESA Research to BrainVoyager for further inspection.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]] describes how to insert a dipole at a location defined in the MRI in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
Lanfer, B., I. Paul-Jordanov, M. Scherg, and C. H. Wolters. “Influence of Interior Cerebrospinal Fluid Compartments on EEG Source Analysis.” In Proceedings BMT 2012, Vol. 57. Jena: De Gruyter, 2012. doi:10.1515/bmt-2012-4020.&lt;br /&gt;
&lt;br /&gt;
Yvert, B., O. Bertrand, M. Thévenet, J. F. Echallier, and J. Pernier. “A Systematic Evaluation of the Spherical Model Accuracy in EEG Dipole Localization.” Electroencephalography and Clinical Neurophysiology 102, no. 5 (May 1997): 452–59. doi:16/S0921-884X(97)96611-X.&lt;br /&gt;
&lt;br /&gt;
== How Coregistration is done ==&lt;br /&gt;
&lt;br /&gt;
This section outlines the basic steps to coregister the EEG / MEG data to an individual MRI. These steps are necessary to load an individual MRI into BESA Research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What happens:'''&lt;br /&gt;
&lt;br /&gt;
* EEG / MEG sensor locations and the MRI data are defined in different coordinate systems. Setting up coregistration is the process of aligning the two coordinate systems.&lt;br /&gt;
* BESA Research uses the ''Coregistration Dialog'' to coordinate the alignment procedure.&lt;br /&gt;
* Alignment is done with the ''AC-PC-transformed MRI''.&lt;br /&gt;
* BESA Research displays the ''Talairach-transformed MRI'' in the source analysis module.&lt;br /&gt;
* A coregistration file (with the extension &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.sfh'''&amp;lt;/span&amp;gt;&amp;quot;) is used to mediate between BESA Research and BESA MRI (or BrainVoyagerQX):&lt;br /&gt;
* BESA Research writes the coregistration file which contains the coordinates of head surface points (fiducials, electrodes, other digitized surface points).&lt;br /&gt;
* The coordinates are read into BESA MRI (or BrainVoyager), and aligned with the AC-PC-transformed MRI. The alignment information is then appended to the ''coregistration file''. The names of the AC-PC MRI (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.vmr&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the surface mesh (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.srf&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), and, if available, the Talairach transformation, are also appended.&lt;br /&gt;
* BESA Research reads the coregistration file and appends the name of the Talairach-transformed MRI and head surface. If a brain surface has been created, this is also appended.&lt;br /&gt;
* Subsequently, BESA Research reads the coregistration file automatically when loading the data file.&lt;br /&gt;
* In the BESA Research source module, the individual MRI is displayed instead of the standard MRI. Talairach coordinates of dipoles are the &amp;quot;real&amp;quot; Talairach coordinates as defined, e.g., in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The steps you have to take (once for each data set):'''&lt;br /&gt;
&lt;br /&gt;
* From the BESA Research ''Coregistration Dialog'', write a coregistration file. Switch to BESA MRI (or BrainVoyagerQX).&lt;br /&gt;
* If BESA MRI is used follow the steps in the coregistration quickguide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* If BrainVoyager is used follow the steps in Section “''How to set up coregistration between BESA and BrainVoyager”.''&lt;br /&gt;
* Back in BESA Research, reload the altered '''coregistration file'''. When using BESA MRI the file names of the generated surface and volume data files will be automatically filled in. When using BrainVoyager file names are only filled in automatically when the files are named according to the file naming conventions. Otherwise, file names have to be set manually.&lt;br /&gt;
* The coregistration file is now associated with the data file in the BESA Research database and will be used automatically the next time the file is opened in BESA Research. If the database entry is cleared, and the data are reloaded, you must make sure the coregistration file is also loaded (either using the ''Coregistration Dialog'' or the ''Channel and digitized head surface point information Dialog'').&lt;br /&gt;
&lt;br /&gt;
==  Alignment of BESA and MRICoordinate Systems  ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration Dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog is opened either from the ''Channel and digitized head surface point information'' (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) ''dialog ''by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit/Coreg'''&amp;lt;/span&amp;gt; button, or from the main menu (&amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File/MRI&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Coregistration...'''&amp;lt;/span&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the coregistration dialog is invoked from an EEG data set in which no digitized electrode coordinates are available (i.e. standard electrode positions located on a sphere are assumed), BESA Research presents a warning message, saying that for MRI coregistration realistic electrode coordinates produce better results. BESA Research has a list of such realistic standard coordinates (i.e. located on a pre-defined standard head surface) for various electrodes available in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;, which is located in the Standard Electrode folder. If all electrodes in the dataset are listed in this file, a dialog window suggests to apply this file to the current data set, i.e. to switch from standard sphere coordinates to the standard realistic electrode coordinates in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;. If the suggestion is accepted, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; is assigned to the dataset (see Channel and digitized head surface point information (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) dialog).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Dialog:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (1).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Select MRI prog'''&amp;lt;/span&amp;gt; button to select your preferred MRI program. The current choice is between ''BESA MRI.exe'' and ''BrainVoyagerQX.exe''. The path to the MRI program is saved (in ''System\BESA.set'') and will be remembered by BESA Research. The top right hand button (now showing '''BESA MRI''') shows the current selection.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BESA MRI'''&amp;lt;/span&amp;gt; button to start the process of aligning the BESA Research and MRI coordinate systems. If no coregistration (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) file is defined in the dialog (empty ''Surface coregistration file edit box''), BESA Research will first prompt for a file name. We recommend saving this file to the folder where the MRIs are kept. The MRI program will then be started. When you return to the ''Coregistration Dialog'', BESA Research checks if the ''Coregistration File'' has changed. If so, the dialog is updated with the new information.&lt;br /&gt;
* Press the top &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse... '''&amp;lt;/span&amp;gt;button to select a preexisting ''Coregistration File''.&lt;br /&gt;
* The entries in the edit boxes below show the files that will be used in the BESA Research Source Analysis module when the individual MRI is loaded. When using BESA MRI the file names will be automatically filled in. If you are using BrainVoagerQX and you are following our (and the BrainVoyagerQX) recommended naming conventions for files, and the files exist, then the names will be filled in automatically after you have completed the alignment procedure in BrainVoyagerQX. Otherwise you may have to browse for the files.&lt;br /&gt;
* Below the edit boxes the FEM field states whether all necessary information for the individual FEM head model were found in the coregistration file. If the field says ''Individual FEM for EEG'' ''defined!'' then all necessary data was found and the individual FEM EEG head model can be used in the BESA Research Source Analysis module. A similar message indicates whether the FEM MEG head model is available.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note that the MRI and the surfaces are Talairach-transformed! Alignment between BESA Research and the individual MRI is done with the MRI transformed to the AC-PC coordinate system, but the BESA Research Source Analysis module uses the Talairach-transformed image data and surfaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Coregistration Using BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
It is assumed that you know how to load an MRI as a 3D data set into BrainVoyagerQX, and how to clean the image so that regions outside the head are black. We also assume knowledge of how to create AC-PC-aligned and Talairach-transformed MRIs.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* BESA Research. Start the ''Coregistration Dialog''. Export the Coregistration File (head surface points) from your data by pressing the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; '''BrainVoyagerQX'''&amp;lt;/span&amp;gt; button in the dialog. Save the file to the directory where your MRI is located. BrainVoyagerQX is started.&lt;br /&gt;
* BrainVoyagerQX. Load the MRI corresponding to the EEG/MEG data. For optimal performance, the MRI should be cleaned so that regions outside the head are black. Prepare an AC-PC-transformed MRI and a Talairach MRI. For each, generate a surface mesh. Save these files following our recommended naming conventions (see chapter [[Integration_with_MRI_and_fMRI#MRI_file_Name_Conventions|MRI File Name Conventions]]). Save the Talairach coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If these steps have already been performed, load the ACPC MRI and load the ACPC mesh. If you want to generate a brain surface mesh, see chapter [[Integration_with_MRI_and_fMRI#How_to_Generate_a_Brain_Surface_Mesh|How to Generate a Brain Surface Mesh]].&lt;br /&gt;
* BrainVoyagerQX. Load the Coregistration File (''EEG-MEG BESA/Load Surface Points''). The points will be displayed, but they are not aligned to the head:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (2).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Define fiducial points on the head surface. Right click on the 3D head display and select the ''Fiducials Dialog'' in the drop-down menu:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (3).gif ‎]]  [[Image:MRI Integration (4).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Rotate the head (by holding the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Shift '''&amp;lt;/span&amp;gt;button down and clicking and dragging with the mouse) so that the Nasion is clearly visible. Move the mouse to the Nasion, and press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl+Left Click'''&amp;lt;/span&amp;gt;. The coordinates of the Nasion are inserted into the dialog. Repeat for the left preauricular point, and then for the right preauricular point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (5).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: if you have defined your fiducials differently in your BESA Research data (e.g. ear holes), click on the corresponding points in the MRI. If you have additional head surface points (step 8), accuracy in pinpointing the fiducials is not critical.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. In the Fiducials Dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Fit fiducials'''&amp;lt;/span&amp;gt; button. The head surface points are now more or less aligned to the head.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (6).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Now select '''''EEG-MEG BESA/Fit Surface Points...'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (7).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not see the right half of the dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Advanced &amp;gt;&amp;gt;'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Specify the distances of the digitization points from the skin. In the illustration above, the digitization points for electrodes are estimated to be 8 mm from the surface of the head. For the purpose of accurate alignment, the distance of digitization points from skin section of the dialog needs to be filled in correctly. We recommend that &amp;quot;Restrain solution around fiducials&amp;quot; is checked, and a reasonable limit (here 3 mm) of the restraint is defined. Then press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (8).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BrainVoyager fits the points to the head, stretching x, y, and z coordinates to obtain a better fit than before.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: The fit performed during this step accounts for scaling inequalities between the x, y, and z axes in the MRI. Coregistration gains in accuracy over the use of fiducials alone a) because more head surface points are used, and b) because the scaling inequalities are accounted for.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alignment is now completed. If you only want to display the structural MRI in the BESA Source Module, you can return to the BESA Coregistration Dialog.&lt;br /&gt;
* BESA Research. When you switch back to the Coregistration Dialog, BESA Research will try to fill in the names of the Talairach MRI and surface meshes. If the names are not filled in, use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse...'''&amp;lt;/span&amp;gt; buttons to select the MRI and surface meshes. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to save the Coregistration File. Alignment is completed!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The alignment steps need only be performed once for a given MRI and EEG/MEG data set. Otherwise, after starting BrainVoyager, just load the MRI, the surface mesh, and the surface points (see [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done |How to Set Up Coregistration with BrainVoyager after Alignment has been Done]]). Now the following actions are possible: see chapters&lt;br /&gt;
&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-Locate Sources and MRI in the BESA Research Source Module]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]&lt;br /&gt;
&lt;br /&gt;
=== MRI file Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
If you follow the naming conventions for file names as described here, BESA Research detects the file names it requires, and the ''Coregistration Dialog'' is filled in automatically.&lt;br /&gt;
&lt;br /&gt;
Please note that BESA MRI automatically uses these naming conventions for the generated files.&lt;br /&gt;
&lt;br /&gt;
* '''The AC-PC MRI file name''' should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.srf'''&amp;lt;/span&amp;gt;&amp;quot;. After alignment, BrainVoyagerQX writes these names to the Coregistration File.&lt;br /&gt;
* '''The Talairach MRI file name '''should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If defined, the brain surface mesh should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot; ('''WM''' = '''w'''hite '''m'''atter).&lt;br /&gt;
* '''How BESA Research finds the Talairach files.''' When BESA Research rereads the Coregistration File after alignment of the coordinate systems, it finds the ACPC file names and defines the corresponding TAL file names. If these files exist, the names are entered into the Coregistration Dialog. For instance, if the Coregistration File contains the name &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for the files &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;, and &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If these files exist, they are entered into the dialog.&lt;br /&gt;
* '''Older BrainVoyager version.''' If you use BrainVoyager.exe to align coordinate systems, the file names are not saved with the Coregistration File. In this case, browse for the Talairach or the ACPC MRI from the Coregistration Dialog. BESA Research will use the rules as described above to insert the correct file names into the dialog.&lt;br /&gt;
* '''Missing Talairach coordinates.''' If, after aligning coordinate systems, the Talairach coordinates are missing from the Coregistration File (you forgot to load the Talairach coordinates in BrainVoyagerQX, or you used BrainVoyager.exe), BESA Research will look for a file ending with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot;, and read the coordinates from this file. You can also browse for a &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file in the Coregistration Dialog. For instance, if the MRI file is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MR_'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot; to find the Talairach coordinates.&lt;br /&gt;
* '''File names in the Coregistration File are saved relative to the Coregistration File location, if they are in the same folder.''' If the MRIs are in the same folder as the Coregistration File they will be recorded as &amp;quot;.\filename&amp;quot; (e.g. &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.\MRI PB_tal.vmr'''&amp;lt;/span&amp;gt;&amp;quot;). This means that you can copy the Coregistration File together with the MRIs and meshes to a different folder, and BESA Research will be able to locate the files when the Coregistration File is opened. If the MRIs are saved in a different folder from the Coregistration File, the absolute paths are saved in the file. If the files are moved to new locations, you will have to restart the Coregistration Dialog and redefine the file locations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to Generate a Brain Surface Mesh ===&lt;br /&gt;
&lt;br /&gt;
BESA Research is able to compute surface images, such as (Cortical LORETA, Cortical CLARA, Minimum Norm) using an individual cortex surface as the source space. A suitable cortex surface for this purpose can be effortlessly created using BESA MRI. Alternatively, BrainVoyager can be used for the creation of the brain surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA MRI'''&lt;br /&gt;
* The brain surface generation is performed as one work step of the BESA MRI segmentation workflow.&lt;br /&gt;
* The cortex surface reconstruction is done using a robust and accurate automatic segmentation procedure.&lt;br /&gt;
* Details on how to generate the brain surface mesh in BESA MRI can be found in the coregistration quickguide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BrainVoyager'''&lt;br /&gt;
* BrainVoyagerQX provides a semiautomatic procedure to generate meshes for the brain surface of the Talairach MRI. Please refer to the BrainVoyager Help to find out how to do this.&lt;br /&gt;
* The result of the BrainVoyager procedure is two meshes, one for the left and one for the right hemisphere.&lt;br /&gt;
* BESA Research requires a single mesh. Therefore, load first one mesh (''Meshes/Load Mesh..''.), and append the other mesh (''Meshes/Add Mesh...''). Merge these two meshes (''Meshes/Merge'' ''meshes in surface window'') and then save the result (''Meshes/Save Mesh...''). If possible, use the recommended name conventions for the resulting file (file name ends in &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf&amp;quot;). '''&amp;lt;/span&amp;gt;For instance, if the Talairach MRI is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, name the brain surface mesh &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;.&lt;br /&gt;
* See also the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website (http://brainvoyager.com/Downloads.html).&lt;br /&gt;
&lt;br /&gt;
==  Co-locating Dipoles and MRI Locations ==&lt;br /&gt;
&lt;br /&gt;
=== Co-locating Sources and MRI in the BESA Research Source Module ===&lt;br /&gt;
&lt;br /&gt;
If the alignment procedure using BESA MRI (or BrainVoyager) has been completed then you can load the individual structural MRI in the Source Module by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''A''''&amp;lt;/span&amp;gt; or using a mouse right click and selecting '''''Display MRI'''''.&lt;br /&gt;
&lt;br /&gt;
Sources in the current model are then overlayed onto the individual MRI.&lt;br /&gt;
&lt;br /&gt;
A double-click at any location in the MRI will define a new source at the corresponding location in the BESA Research head model.&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (9).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
=== Coregistration with BrainVoyager after Alignment has been Done ===&lt;br /&gt;
&lt;br /&gt;
Alignment between BESA Research and BrainVoyager is only required once for a given BESA Research data set and the corresponding MRI. At a later time, if you want to Co-locate sources between BESA Research and BrainVoyager, perform the following steps in BrainVoyager:&lt;br /&gt;
* Load the MRI.&lt;br /&gt;
* Load the head surface mesh (''Meshes/Load Mesh..''.).&lt;br /&gt;
* Load the Coregistration File (''EEG-MEG BESA/Load Surface Points..''.).&lt;br /&gt;
&lt;br /&gt;
BrainVoyager is now ready for Co-location.&lt;br /&gt;
&lt;br /&gt;
=== Send a Dipole from BESA Research to BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
First, start BrainVoyager(QX). This can be done from the BESA Research Source Module by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager '''&amp;lt;/span&amp;gt;button. Note that in the Source Module, the ''Options / Preferences / BrainVoyager'' tab allows to define the path to BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
In BrainVoyager, [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|set up coregistration]].&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, highlight the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
Program control will automatically switch to BrainVoyager. The head will be cut at the section corresponding to the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (10).gif‎|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that all dipoles in the current model are sent to BrainVoyager. The highlighted dipole (here, the red dipole) determines the plane at which the head will be cut.&lt;br /&gt;
&lt;br /&gt;
Note that the dipoles are visible in both the surface module and in the 2D view:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (11).gif|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Define a Dipole in BESA Research at a Location Defined in the MRI ===&lt;br /&gt;
&lt;br /&gt;
First set up coregistration (see chapter [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|Coregistration with BrainVoyager after Alignment has been Done]]).&lt;br /&gt;
&lt;br /&gt;
In the BrainVoyager 2D MRI view, place the mouse over the point at which you would like to define a dipole. Right click at this point. If this point lies within an fRMI cluster, BrainVoyager will automatically determine its center and use it as a seeding point instead. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send Seed Point To BESA....'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (12).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
The following Dialog is opened:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (13).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send to BESA'''&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BESA Source Analysis window appears. The new dipole or regional source (depending on the setting in the ‘Options’ dialog in the Source Analysis window is now displayed at the corresponding location. If a dipole is seeded, BESA automatically fits its orientation. For further adjustment of the model, you may need to refit the orientation, e.g. at a certain time range, or in the presence of other sources.&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([http://brainvoyager.com/Downloads.html http://brainvoyager.com/Downloads.html]).&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration File (*.sfh) ===&lt;br /&gt;
&lt;br /&gt;
This file is used to mediate between BESA Research and BESA MRI (or BrainVoyager(QX)). When it is first written by BESA Research, it contains a list of the digitized head surface points (fiducials, electrodes, other digitized points), e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
NrOfPoints: 68&lt;br /&gt;
 Fid_Nz                    0.00000     103.10000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T9                  -78.40000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T10                  73.00000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Ele_E1                  -28.70000      23.90000     122.30000   3 255    0    0&lt;br /&gt;
 Ele_E2                  -80.40000      19.80000      75.90000   3 255    0    0&lt;br /&gt;
 Ele_E3                  -84.00000      37.90000       9.00000   3 255    0    0&lt;br /&gt;
 Ele_E4                  -17.60000      92.90000      89.10000   3 255    0    0&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
 Ele_E63                  -6.80000    -104.00000      54.40000   3 255    0    0&lt;br /&gt;
 Ele_E64                 -42.80000     -46.90000     115.60000   3 255    0    0&lt;br /&gt;
 Ele_Cz'                  -2.10000       2.20000     131.10000   3 255    0    0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line contains a label, the coordinates in the Head Coordinate system, and parameters specifying the size and color of the sensor or head surface point as displayed in BESA MRI (or BrainVoyager).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After aligning the coordinate systems, BESA MRI (or BrainVoyagerQX) appends lines defining the transformation between the BESA Research and the MRI coordinate systems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Trans-data(in BV-coords): 3 translation, 3 rotation (in grad), 3 scale&lt;br /&gt;
37.435 15.811 2.820 0.025 1.938 8.779  1.009 0.973 0.977&lt;br /&gt;
Fiducials:&lt;br /&gt;
41.7873  148.0180  128.0844&lt;br /&gt;
154.7772  169.4783  204.1080&lt;br /&gt;
147.0154  168.9746  54.1266&lt;br /&gt;
Midpoint (in BV-coords):&lt;br /&gt;
128.0000  128.0000  128.0000&lt;br /&gt;
Volume:  C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.vmr&lt;br /&gt;
Surface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.srf&lt;br /&gt;
AC: 128 128 128&lt;br /&gt;
PC: 154 128 128&lt;br /&gt;
AP: 58 128 128&lt;br /&gt;
PP: 241 129 130&lt;br /&gt;
SP: 154 50 128&lt;br /&gt;
IP: 128 172 128&lt;br /&gt;
RP: 128 128 60&lt;br /&gt;
LP: 165 128 198&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Older versions of BrainVoyager.exe do not append the lines starting with &amp;quot;Volume&amp;quot;. In addition, the Talairach coordinates (starting at &amp;quot;AC: ...&amp;quot;) are not appended if they were not loaded in BrainVoyagerQX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, when the Coregistration Dialog in BESA Research has found the Talairach MRI and surface meshes, and you press the OK button, BESA Research appends the additional file names:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TalVolume: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.vmr&lt;br /&gt;
TalSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.srf&lt;br /&gt;
TalBrainSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal_wm.srf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA MRI already inserts the correct file names into the coregistration file when doing the coregistration. When also an EEG or MEG  FEM head model is generated then additional lines are appended to the coregistration file containing the file names of the generated FEM data files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MRI Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend a high quality T1-weighted anatomical image with 1 mm³ voxels (e.g. 256 x 256 saggital scan with 1 mm spacing).&lt;br /&gt;
&lt;br /&gt;
In order to define the surface mesh, a clear contrast between the head surface and the outside of the head (T1-weighting) is required. Noise and measurement artifacts can influence the representation of the scalp surface. When doing the coregistration in BrainVoyager improvements in noisy images often can be achieved by cleaning up the image after first reading it using the tools provided by BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
For coregistration with head surface points, it is useful to include the whole head in the image, including nose and ears. If surface points on the nose are included with the EEG/MEG data set, these points help to stabilize the fit of head surface points to the surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EEG/MEG Data Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend several (30 or more) digitized head surface points in addition to the fiducials, including points on the nose (nose tip and sides). These points may include electrodes. In the case of electrodes, it is important to measure the distance from the scalp to the digitization point, i.e. the electrode thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI</id>
		<title>Integration with MRI and fMRI</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI"/>
				<updated>2021-05-06T06:57:08Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Define a Dipole in BESA Research at a Location Defined in the MRI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA MRI&lt;br /&gt;
|version = BESA Research 6.1 or higher&amp;lt;br/&amp;gt;BESA MRI 2.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- = BESA Research Integration with MRI and fMRI = --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Both for developing and evaluating dipole source models of EEG or MEG activity, it is useful to have access to structural MRI or fMRI data.&lt;br /&gt;
&lt;br /&gt;
The BESA MRI software allows to preprocess structural MRI data so that the individual anatomical information contained in the MRI can be utilized in BESA Research. BESA MRI makes it possible ...&lt;br /&gt;
* ... to align the EEG and MEG sensors with the structural MRI data.&lt;br /&gt;
* ... to read and display the aligned, individual Talairach structural MRIs directly in the BESA Research Source Analysis module. In this way, source analysis results can be presented on top of the aligned MRIs, which allows us to evaluate the anatomical regions to which the reconstructed sources may correspond.&lt;br /&gt;
* ... to use an individual, realistically shaped FEM head model for source analysis in BESA Research. FEM head models take into account the individual volume conduction properties of the subject's head derived from the structural MRI data. This allows for more accurate source analysis (Yvert 1997, Lanfer 2012).&lt;br /&gt;
&lt;br /&gt;
To offer an easy integration with fMRI data we have, in collaboration with Rainer Goebel, optimized the interface between BESA Research and BrainVoyagerQX. &lt;br /&gt;
&lt;br /&gt;
With these tools, we can ...&lt;br /&gt;
* ... use fMRI BOLD regions or MRI structures to initialize dipole models.&lt;br /&gt;
* ... visualize dipoles from BESA Research models together with the structural MRI in BrainVoyager in order to evaluate the regions to which the dipoles may correspond.&lt;br /&gt;
* ... combine the localization advantages of (f)MRI with the high temporal resolution of EEG and MEG, for instance by using (f)MRI to place the sources, and the source waveforms of BESA Research to provide feedback about the time course of the source activity.&lt;br /&gt;
* ... overlay source analysis results obtained in BESA Research with fMRI data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' For simpler coregistration, we recommend to use BrainVoyagerQX rather than the older BrainVoyager, but BESA Research will work with both program versions.&lt;br /&gt;
&lt;br /&gt;
The chapters below describe the steps necessary to integrate the MRI and fMRI data with BESA Research. Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([https://www.brainvoyager.com/downloads/downloads.html BrainVoyager - Downloads]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Aligning Coordinate Systems'''&lt;br /&gt;
&lt;br /&gt;
* For a given BESA data set, the electrode and other head surface points need to be aligned to the MRI coordinates.&lt;br /&gt;
* The basic steps necessary to align the EEG electrode locations, the MEG sensors and the MRI are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How Coregistration is done]].&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BESA MRI can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BrainVoyager are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How To set up Coregistration between BESA and BrainVoyager]].&lt;br /&gt;
* In BESA Research, all necessary settings with regard to the alignment are made in the [[Integration_with_MRI_and_fMRI#The_Coregistration_Dialog|Coregistration Dialog]].&lt;br /&gt;
* Requirements with respect to the MRI data for a good coregistration can be found in Section [[#MRI_Requirements_for_Good_Coregistration|MRI Requirements for Good Coregistration]].&lt;br /&gt;
* Requirements with respect to EEG and MEG data for a good coregistration can be found in Section [[#EEG/MEG Data Requirements for Good Coregistration|EEG/MEG Data Requirements for Good Coregistration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Generating an individual, realistically shaped FEM head model'''&lt;br /&gt;
&lt;br /&gt;
* The generation of a FEM head model that can be used in BESA Research is done in BESA MRI as an additional step following the EEG / MEG to MRI coregistration.&lt;br /&gt;
* Detailed instructions on how to generate the FEM head model can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Co-locating dipoles and MRI locations'''&lt;br /&gt;
&lt;br /&gt;
* After aligning the EEG / MEG and the MRI data it is possible to co-locate dipoles and MRI locations. This means, it is possible to visualize the dipoles and to specify the dipole parameters in the MRI coordinate system.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-locate sources and MRI in the BESA Research Source Module]] describes how in the BESA Research Source Analysis module dipoles can directly be visualized in the space of the individual MRI.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]] describes how to send a source model from BESA Research to BrainVoyager for further inspection.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]] describes how to insert a dipole at a location defined in the MRI in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
Lanfer, B., I. Paul-Jordanov, M. Scherg, and C. H. Wolters. “Influence of Interior Cerebrospinal Fluid Compartments on EEG Source Analysis.” In Proceedings BMT 2012, Vol. 57. Jena: De Gruyter, 2012. doi:10.1515/bmt-2012-4020.&lt;br /&gt;
&lt;br /&gt;
Yvert, B., O. Bertrand, M. Thévenet, J. F. Echallier, and J. Pernier. “A Systematic Evaluation of the Spherical Model Accuracy in EEG Dipole Localization.” Electroencephalography and Clinical Neurophysiology 102, no. 5 (May 1997): 452–59. doi:16/S0921-884X(97)96611-X.&lt;br /&gt;
&lt;br /&gt;
== How Coregistration is done ==&lt;br /&gt;
&lt;br /&gt;
This section outlines the basic steps to coregister the EEG / MEG data to an individual MRI. These steps are necessary to load an individual MRI into BESA Research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What happens:'''&lt;br /&gt;
&lt;br /&gt;
* EEG / MEG sensor locations and the MRI data are defined in different coordinate systems. Setting up coregistration is the process of aligning the two coordinate systems.&lt;br /&gt;
* BESA Research uses the ''Coregistration Dialog'' to coordinate the alignment procedure.&lt;br /&gt;
* Alignment is done with the ''AC-PC-transformed MRI''.&lt;br /&gt;
* BESA Research displays the ''Talairach-transformed MRI'' in the source analysis module.&lt;br /&gt;
* A coregistration file (with the extension &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.sfh'''&amp;lt;/span&amp;gt;&amp;quot;) is used to mediate between BESA Research and BESA MRI (or BrainVoyagerQX):&lt;br /&gt;
* BESA Research writes the coregistration file which contains the coordinates of head surface points (fiducials, electrodes, other digitized surface points).&lt;br /&gt;
* The coordinates are read into BESA MRI (or BrainVoyager), and aligned with the AC-PC-transformed MRI. The alignment information is then appended to the ''coregistration file''. The names of the AC-PC MRI (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.vmr&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the surface mesh (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.srf&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), and, if available, the Talairach transformation, are also appended.&lt;br /&gt;
* BESA Research reads the coregistration file and appends the name of the Talairach-transformed MRI and head surface. If a brain surface has been created, this is also appended.&lt;br /&gt;
* Subsequently, BESA Research reads the coregistration file automatically when loading the data file.&lt;br /&gt;
* In the BESA Research source module, the individual MRI is displayed instead of the standard MRI. Talairach coordinates of dipoles are the &amp;quot;real&amp;quot; Talairach coordinates as defined, e.g., in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The steps you have to take (once for each data set):'''&lt;br /&gt;
&lt;br /&gt;
* From the BESA Research ''Coregistration Dialog'', write a coregistration file. Switch to BESA MRI (or BrainVoyagerQX).&lt;br /&gt;
* If BESA MRI is used follow the steps in the coregistration quickguide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* If BrainVoyager is used follow the steps in Section “''How to set up coregistration between BESA and BrainVoyager”.''&lt;br /&gt;
* Back in BESA Research, reload the altered '''coregistration file'''. When using BESA MRI the file names of the generated surface and volume data files will be automatically filled in. When using BrainVoyager file names are only filled in automatically when the files are named according to the file naming conventions. Otherwise, file names have to be set manually.&lt;br /&gt;
* The coregistration file is now associated with the data file in the BESA Research database and will be used automatically the next time the file is opened in BESA Research. If the database entry is cleared, and the data are reloaded, you must make sure the coregistration file is also loaded (either using the ''Coregistration Dialog'' or the ''Channel and digitized head surface point information Dialog'').&lt;br /&gt;
&lt;br /&gt;
==  Alignment of BESA and MRICoordinate Systems  ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration Dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog is opened either from the ''Channel and digitized head surface point information'' (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) ''dialog ''by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit/Coreg'''&amp;lt;/span&amp;gt; button, or from the main menu (&amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File/MRI&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Coregistration...'''&amp;lt;/span&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the coregistration dialog is invoked from an EEG data set in which no digitized electrode coordinates are available (i.e. standard electrode positions located on a sphere are assumed), BESA Research presents a warning message, saying that for MRI coregistration realistic electrode coordinates produce better results. BESA Research has a list of such realistic standard coordinates (i.e. located on a pre-defined standard head surface) for various electrodes available in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;, which is located in the Standard Electrode folder. If all electrodes in the dataset are listed in this file, a dialog window suggests to apply this file to the current data set, i.e. to switch from standard sphere coordinates to the standard realistic electrode coordinates in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;. If the suggestion is accepted, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; is assigned to the dataset (see Channel and digitized head surface point information (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) dialog).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Dialog:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (1).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Select MRI prog'''&amp;lt;/span&amp;gt; button to select your preferred MRI program. The current choice is between ''BESA MRI.exe'' and ''BrainVoyagerQX.exe''. The path to the MRI program is saved (in ''System\BESA.set'') and will be remembered by BESA Research. The top right hand button (now showing '''BESA MRI''') shows the current selection.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BESA MRI'''&amp;lt;/span&amp;gt; button to start the process of aligning the BESA Research and MRI coordinate systems. If no coregistration (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) file is defined in the dialog (empty ''Surface coregistration file edit box''), BESA Research will first prompt for a file name. We recommend saving this file to the folder where the MRIs are kept. The MRI program will then be started. When you return to the ''Coregistration Dialog'', BESA Research checks if the ''Coregistration File'' has changed. If so, the dialog is updated with the new information.&lt;br /&gt;
* Press the top &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse... '''&amp;lt;/span&amp;gt;button to select a preexisting ''Coregistration File''.&lt;br /&gt;
* The entries in the edit boxes below show the files that will be used in the BESA Research Source Analysis module when the individual MRI is loaded. When using BESA MRI the file names will be automatically filled in. If you are using BrainVoagerQX and you are following our (and the BrainVoyagerQX) recommended naming conventions for files, and the files exist, then the names will be filled in automatically after you have completed the alignment procedure in BrainVoyagerQX. Otherwise you may have to browse for the files.&lt;br /&gt;
* Below the edit boxes the FEM field states whether all necessary information for the individual FEM head model were found in the coregistration file. If the field says ''Individual FEM for EEG'' ''defined!'' then all necessary data was found and the individual FEM EEG head model can be used in the BESA Research Source Analysis module. A similar message indicates whether the FEM MEG head model is available.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note that the MRI and the surfaces are Talairach-transformed! Alignment between BESA Research and the individual MRI is done with the MRI transformed to the AC-PC coordinate system, but the BESA Research Source Analysis module uses the Talairach-transformed image data and surfaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Coregistration Using BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
It is assumed that you know how to load an MRI as a 3D data set into BrainVoyagerQX, and how to clean the image so that regions outside the head are black. We also assume knowledge of how to create AC-PC-aligned and Talairach-transformed MRIs.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* BESA Research. Start the ''Coregistration Dialog''. Export the Coregistration File (head surface points) from your data by pressing the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; '''BrainVoyagerQX'''&amp;lt;/span&amp;gt; button in the dialog. Save the file to the directory where your MRI is located. BrainVoyagerQX is started.&lt;br /&gt;
* BrainVoyagerQX. Load the MRI corresponding to the EEG/MEG data. For optimal performance, the MRI should be cleaned so that regions outside the head are black. Prepare an AC-PC-transformed MRI and a Talairach MRI. For each, generate a surface mesh. Save these files following our recommended naming conventions (see chapter [[Integration_with_MRI_and_fMRI#MRI_file_Name_Conventions|MRI File Name Conventions]]). Save the Talairach coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If these steps have already been performed, load the ACPC MRI and load the ACPC mesh. If you want to generate a brain surface mesh, see chapter [[Integration_with_MRI_and_fMRI#How_to_Generate_a_Brain_Surface_Mesh|How to Generate a Brain Surface Mesh]].&lt;br /&gt;
* BrainVoyagerQX. Load the Coregistration File (''EEG-MEG BESA/Load Surface Points''). The points will be displayed, but they are not aligned to the head:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (2).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Define fiducial points on the head surface. Right click on the 3D head display and select the ''Fiducials Dialog'' in the drop-down menu:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (3).gif ‎]]  [[Image:MRI Integration (4).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Rotate the head (by holding the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Shift '''&amp;lt;/span&amp;gt;button down and clicking and dragging with the mouse) so that the Nasion is clearly visible. Move the mouse to the Nasion, and press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl+Left Click'''&amp;lt;/span&amp;gt;. The coordinates of the Nasion are inserted into the dialog. Repeat for the left preauricular point, and then for the right preauricular point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (5).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: if you have defined your fiducials differently in your BESA Research data (e.g. ear holes), click on the corresponding points in the MRI. If you have additional head surface points (step 8), accuracy in pinpointing the fiducials is not critical.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. In the Fiducials Dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Fit fiducials'''&amp;lt;/span&amp;gt; button. The head surface points are now more or less aligned to the head.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (6).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Now select '''''EEG-MEG BESA/Fit Surface Points...'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (7).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not see the right half of the dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Advanced &amp;gt;&amp;gt;'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Specify the distances of the digitization points from the skin. In the illustration above, the digitization points for electrodes are estimated to be 8 mm from the surface of the head. For the purpose of accurate alignment, the distance of digitization points from skin section of the dialog needs to be filled in correctly. We recommend that &amp;quot;Restrain solution around fiducials&amp;quot; is checked, and a reasonable limit (here 3 mm) of the restraint is defined. Then press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (8).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BrainVoyager fits the points to the head, stretching x, y, and z coordinates to obtain a better fit than before.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: The fit performed during this step accounts for scaling inequalities between the x, y, and z axes in the MRI. Coregistration gains in accuracy over the use of fiducials alone a) because more head surface points are used, and b) because the scaling inequalities are accounted for.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alignment is now completed. If you only want to display the structural MRI in the BESA Source Module, you can return to the BESA Coregistration Dialog.&lt;br /&gt;
* BESA Research. When you switch back to the Coregistration Dialog, BESA Research will try to fill in the names of the Talairach MRI and surface meshes. If the names are not filled in, use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse...'''&amp;lt;/span&amp;gt; buttons to select the MRI and surface meshes. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to save the Coregistration File. Alignment is completed!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The alignment steps need only be performed once for a given MRI and EEG/MEG data set. Otherwise, after starting BrainVoyager, just load the MRI, the surface mesh, and the surface points (see “[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done |How to Set Up Coregistration with BrainVoyager after Alignment has been Done]]”). Now the following actions are possible: see chapters&lt;br /&gt;
&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-Locate Sources and MRI in the BESA Research Source Module]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]&lt;br /&gt;
&lt;br /&gt;
=== MRI file Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
If you follow the naming conventions for file names as described here, BESA Research detects the file names it requires, and the ''Coregistration Dialog'' is filled in automatically.&lt;br /&gt;
&lt;br /&gt;
Please note that BESA MRI automatically uses these naming conventions for the generated files.&lt;br /&gt;
&lt;br /&gt;
* '''The AC-PC MRI file name''' should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.srf'''&amp;lt;/span&amp;gt;&amp;quot;. After alignment, BrainVoyagerQX writes these names to the Coregistration File.&lt;br /&gt;
* '''The Talairach MRI file name '''should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If defined, the brain surface mesh should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot; ('''WM''' = '''w'''hite '''m'''atter).&lt;br /&gt;
* '''How BESA Research finds the Talairach files.''' When BESA Research rereads the Coregistration File after alignment of the coordinate systems, it finds the ACPC file names and defines the corresponding TAL file names. If these files exist, the names are entered into the Coregistration Dialog. For instance, if the Coregistration File contains the name &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for the files &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;, and &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If these files exist, they are entered into the dialog.&lt;br /&gt;
* '''Older BrainVoyager version.''' If you use BrainVoyager.exe to align coordinate systems, the file names are not saved with the Coregistration File. In this case, browse for the Talairach or the ACPC MRI from the Coregistration Dialog. BESA Research will use the rules as described above to insert the correct file names into the dialog.&lt;br /&gt;
* '''Missing Talairach coordinates.''' If, after aligning coordinate systems, the Talairach coordinates are missing from the Coregistration File (you forgot to load the Talairach coordinates in BrainVoyagerQX, or you used BrainVoyager.exe), BESA Research will look for a file ending with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot;, and read the coordinates from this file. You can also browse for a &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file in the Coregistration Dialog. For instance, if the MRI file is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MR_'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot; to find the Talairach coordinates.&lt;br /&gt;
* '''File names in the Coregistration File are saved relative to the Coregistration File location, if they are in the same folder.''' If the MRIs are in the same folder as the Coregistration File they will be recorded as &amp;quot;.\filename&amp;quot; (e.g. &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.\MRI PB_tal.vmr'''&amp;lt;/span&amp;gt;&amp;quot;). This means that you can copy the Coregistration File together with the MRIs and meshes to a different folder, and BESA Research will be able to locate the files when the Coregistration File is opened. If the MRIs are saved in a different folder from the Coregistration File, the absolute paths are saved in the file. If the files are moved to new locations, you will have to restart the Coregistration Dialog and redefine the file locations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to Generate a Brain Surface Mesh ===&lt;br /&gt;
&lt;br /&gt;
BESA Research is able to compute surface images, such as (Cortical LORETA, Cortical CLARA, Minimum Norm) using an individual cortex surface as the source space. A suitable cortex surface for this purpose can be effortlessly created using BESA MRI. Alternatively, BrainVoyager can be used for the creation of the brain surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA MRI'''&lt;br /&gt;
* The brain surface generation is performed as one work step of the BESA MRI segmentation workflow.&lt;br /&gt;
* The cortex surface reconstruction is done using a robust and accurate automatic segmentation procedure.&lt;br /&gt;
* Details on how to generate the brain surface mesh in BESA MRI can be found in the coregistration quickguide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BrainVoyager'''&lt;br /&gt;
* BrainVoyagerQX provides a semiautomatic procedure to generate meshes for the brain surface of the Talairach MRI. Please refer to the BrainVoyager Help to find out how to do this.&lt;br /&gt;
* The result of the BrainVoyager procedure is two meshes, one for the left and one for the right hemisphere.&lt;br /&gt;
* BESA Research requires a single mesh. Therefore, load first one mesh (''Meshes/Load Mesh..''.), and append the other mesh (''Meshes/Add Mesh...''). Merge these two meshes (''Meshes/Merge'' ''meshes in surface window'') and then save the result (''Meshes/Save Mesh...''). If possible, use the recommended name conventions for the resulting file (file name ends in &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf&amp;quot;). '''&amp;lt;/span&amp;gt;For instance, if the Talairach MRI is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, name the brain surface mesh &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;.&lt;br /&gt;
* See also the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website (http://brainvoyager.com/Downloads.html).&lt;br /&gt;
&lt;br /&gt;
==  Co-locating Dipoles and MRI Locations ==&lt;br /&gt;
&lt;br /&gt;
=== Co-locating Sources and MRI in the BESA Research Source Module ===&lt;br /&gt;
&lt;br /&gt;
If the alignment procedure using BESA MRI (or BrainVoyager) has been completed then you can load the individual structural MRI in the Source Module by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''A''''&amp;lt;/span&amp;gt; or using a mouse right click and selecting '''''Display MRI'''''.&lt;br /&gt;
&lt;br /&gt;
Sources in the current model are then overlayed onto the individual MRI.&lt;br /&gt;
&lt;br /&gt;
A double-click at any location in the MRI will define a new source at the corresponding location in the BESA Research head model.&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (9).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
=== Coregistration with BrainVoyager after Alignment has been Done ===&lt;br /&gt;
&lt;br /&gt;
Alignment between BESA Research and BrainVoyager is only required once for a given BESA Research data set and the corresponding MRI. At a later time, if you want to Co-locate sources between BESA Research and BrainVoyager, perform the following steps in BrainVoyager:&lt;br /&gt;
* Load the MRI.&lt;br /&gt;
* Load the head surface mesh (''Meshes/Load Mesh..''.).&lt;br /&gt;
* Load the Coregistration File (''EEG-MEG BESA/Load Surface Points..''.).&lt;br /&gt;
&lt;br /&gt;
BrainVoyager is now ready for Co-location.&lt;br /&gt;
&lt;br /&gt;
=== Send a Dipole from BESA Research to BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
First, start BrainVoyager(QX). This can be done from the BESA Research Source Module by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager '''&amp;lt;/span&amp;gt;button. Note that in the Source Module, the ''Options / Preferences / BrainVoyager'' tab allows to define the path to BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
In BrainVoyager, [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|set up coregistration]].&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, highlight the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
Program control will automatically switch to BrainVoyager. The head will be cut at the section corresponding to the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (10).gif‎|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that all dipoles in the current model are sent to BrainVoyager. The highlighted dipole (here, the red dipole) determines the plane at which the head will be cut.&lt;br /&gt;
&lt;br /&gt;
Note that the dipoles are visible in both the surface module and in the 2D view:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (11).gif|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Define a Dipole in BESA Research at a Location Defined in the MRI ===&lt;br /&gt;
&lt;br /&gt;
First set up coregistration (see chapter [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|Coregistration with BrainVoyager after Alignment has been Done]]).&lt;br /&gt;
&lt;br /&gt;
In the BrainVoyager 2D MRI view, place the mouse over the point at which you would like to define a dipole. Right click at this point. If this point lies within an fRMI cluster, BrainVoyager will automatically determine its center and use it as a seeding point instead. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send Seed Point To BESA....'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (12).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
The following Dialog is opened:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (13).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send to BESA'''&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BESA Source Analysis window appears. The new dipole or regional source (depending on the setting in the ‘Options’ dialog in the Source Analysis window is now displayed at the corresponding location. If a dipole is seeded, BESA automatically fits its orientation. For further adjustment of the model, you may need to refit the orientation, e.g. at a certain time range, or in the presence of other sources.&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([http://brainvoyager.com/Downloads.html http://brainvoyager.com/Downloads.html]).&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration File (*.sfh) ===&lt;br /&gt;
&lt;br /&gt;
This file is used to mediate between BESA Research and BESA MRI (or BrainVoyager(QX)). When it is first written by BESA Research, it contains a list of the digitized head surface points (fiducials, electrodes, other digitized points), e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
NrOfPoints: 68&lt;br /&gt;
 Fid_Nz                    0.00000     103.10000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T9                  -78.40000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T10                  73.00000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Ele_E1                  -28.70000      23.90000     122.30000   3 255    0    0&lt;br /&gt;
 Ele_E2                  -80.40000      19.80000      75.90000   3 255    0    0&lt;br /&gt;
 Ele_E3                  -84.00000      37.90000       9.00000   3 255    0    0&lt;br /&gt;
 Ele_E4                  -17.60000      92.90000      89.10000   3 255    0    0&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
 Ele_E63                  -6.80000    -104.00000      54.40000   3 255    0    0&lt;br /&gt;
 Ele_E64                 -42.80000     -46.90000     115.60000   3 255    0    0&lt;br /&gt;
 Ele_Cz'                  -2.10000       2.20000     131.10000   3 255    0    0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line contains a label, the coordinates in the Head Coordinate system, and parameters specifying the size and color of the sensor or head surface point as displayed in BESA MRI (or BrainVoyager).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After aligning the coordinate systems, BESA MRI (or BrainVoyagerQX) appends lines defining the transformation between the BESA Research and the MRI coordinate systems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Trans-data(in BV-coords): 3 translation, 3 rotation (in grad), 3 scale&lt;br /&gt;
37.435 15.811 2.820 0.025 1.938 8.779  1.009 0.973 0.977&lt;br /&gt;
Fiducials:&lt;br /&gt;
41.7873  148.0180  128.0844&lt;br /&gt;
154.7772  169.4783  204.1080&lt;br /&gt;
147.0154  168.9746  54.1266&lt;br /&gt;
Midpoint (in BV-coords):&lt;br /&gt;
128.0000  128.0000  128.0000&lt;br /&gt;
Volume:  C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.vmr&lt;br /&gt;
Surface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.srf&lt;br /&gt;
AC: 128 128 128&lt;br /&gt;
PC: 154 128 128&lt;br /&gt;
AP: 58 128 128&lt;br /&gt;
PP: 241 129 130&lt;br /&gt;
SP: 154 50 128&lt;br /&gt;
IP: 128 172 128&lt;br /&gt;
RP: 128 128 60&lt;br /&gt;
LP: 165 128 198&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Older versions of BrainVoyager.exe do not append the lines starting with &amp;quot;Volume&amp;quot;. In addition, the Talairach coordinates (starting at &amp;quot;AC: ...&amp;quot;) are not appended if they were not loaded in BrainVoyagerQX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, when the Coregistration Dialog in BESA Research has found the Talairach MRI and surface meshes, and you press the OK button, BESA Research appends the additional file names:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TalVolume: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.vmr&lt;br /&gt;
TalSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.srf&lt;br /&gt;
TalBrainSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal_wm.srf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA MRI already inserts the correct file names into the coregistration file when doing the coregistration. When also an EEG or MEG  FEM head model is generated then additional lines are appended to the coregistration file containing the file names of the generated FEM data files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MRI Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend a high quality T1-weighted anatomical image with 1 mm³ voxels (e.g. 256 x 256 saggital scan with 1 mm spacing).&lt;br /&gt;
&lt;br /&gt;
In order to define the surface mesh, a clear contrast between the head surface and the outside of the head (T1-weighting) is required. Noise and measurement artifacts can influence the representation of the scalp surface. When doing the coregistration in BrainVoyager improvements in noisy images often can be achieved by cleaning up the image after first reading it using the tools provided by BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
For coregistration with head surface points, it is useful to include the whole head in the image, including nose and ears. If surface points on the nose are included with the EEG/MEG data set, these points help to stabilize the fit of head surface points to the surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EEG/MEG Data Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend several (30 or more) digitized head surface points in addition to the fiducials, including points on the nose (nose tip and sides). These points may include electrodes. In the case of electrodes, it is important to measure the distance from the scalp to the digitization point, i.e. the electrode thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI</id>
		<title>Integration with MRI and fMRI</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI"/>
				<updated>2021-05-06T06:56:22Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Setting Up Coregistration Using BrainVoyager */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA MRI&lt;br /&gt;
|version = BESA Research 6.1 or higher&amp;lt;br/&amp;gt;BESA MRI 2.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- = BESA Research Integration with MRI and fMRI = --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Both for developing and evaluating dipole source models of EEG or MEG activity, it is useful to have access to structural MRI or fMRI data.&lt;br /&gt;
&lt;br /&gt;
The BESA MRI software allows to preprocess structural MRI data so that the individual anatomical information contained in the MRI can be utilized in BESA Research. BESA MRI makes it possible ...&lt;br /&gt;
* ... to align the EEG and MEG sensors with the structural MRI data.&lt;br /&gt;
* ... to read and display the aligned, individual Talairach structural MRIs directly in the BESA Research Source Analysis module. In this way, source analysis results can be presented on top of the aligned MRIs, which allows us to evaluate the anatomical regions to which the reconstructed sources may correspond.&lt;br /&gt;
* ... to use an individual, realistically shaped FEM head model for source analysis in BESA Research. FEM head models take into account the individual volume conduction properties of the subject's head derived from the structural MRI data. This allows for more accurate source analysis (Yvert 1997, Lanfer 2012).&lt;br /&gt;
&lt;br /&gt;
To offer an easy integration with fMRI data we have, in collaboration with Rainer Goebel, optimized the interface between BESA Research and BrainVoyagerQX. &lt;br /&gt;
&lt;br /&gt;
With these tools, we can ...&lt;br /&gt;
* ... use fMRI BOLD regions or MRI structures to initialize dipole models.&lt;br /&gt;
* ... visualize dipoles from BESA Research models together with the structural MRI in BrainVoyager in order to evaluate the regions to which the dipoles may correspond.&lt;br /&gt;
* ... combine the localization advantages of (f)MRI with the high temporal resolution of EEG and MEG, for instance by using (f)MRI to place the sources, and the source waveforms of BESA Research to provide feedback about the time course of the source activity.&lt;br /&gt;
* ... overlay source analysis results obtained in BESA Research with fMRI data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' For simpler coregistration, we recommend to use BrainVoyagerQX rather than the older BrainVoyager, but BESA Research will work with both program versions.&lt;br /&gt;
&lt;br /&gt;
The chapters below describe the steps necessary to integrate the MRI and fMRI data with BESA Research. Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([https://www.brainvoyager.com/downloads/downloads.html BrainVoyager - Downloads]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Aligning Coordinate Systems'''&lt;br /&gt;
&lt;br /&gt;
* For a given BESA data set, the electrode and other head surface points need to be aligned to the MRI coordinates.&lt;br /&gt;
* The basic steps necessary to align the EEG electrode locations, the MEG sensors and the MRI are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How Coregistration is done]].&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BESA MRI can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BrainVoyager are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How To set up Coregistration between BESA and BrainVoyager]].&lt;br /&gt;
* In BESA Research, all necessary settings with regard to the alignment are made in the [[Integration_with_MRI_and_fMRI#The_Coregistration_Dialog|Coregistration Dialog]].&lt;br /&gt;
* Requirements with respect to the MRI data for a good coregistration can be found in Section [[#MRI_Requirements_for_Good_Coregistration|MRI Requirements for Good Coregistration]].&lt;br /&gt;
* Requirements with respect to EEG and MEG data for a good coregistration can be found in Section [[#EEG/MEG Data Requirements for Good Coregistration|EEG/MEG Data Requirements for Good Coregistration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Generating an individual, realistically shaped FEM head model'''&lt;br /&gt;
&lt;br /&gt;
* The generation of a FEM head model that can be used in BESA Research is done in BESA MRI as an additional step following the EEG / MEG to MRI coregistration.&lt;br /&gt;
* Detailed instructions on how to generate the FEM head model can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Co-locating dipoles and MRI locations'''&lt;br /&gt;
&lt;br /&gt;
* After aligning the EEG / MEG and the MRI data it is possible to co-locate dipoles and MRI locations. This means, it is possible to visualize the dipoles and to specify the dipole parameters in the MRI coordinate system.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-locate sources and MRI in the BESA Research Source Module]] describes how in the BESA Research Source Analysis module dipoles can directly be visualized in the space of the individual MRI.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]] describes how to send a source model from BESA Research to BrainVoyager for further inspection.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]] describes how to insert a dipole at a location defined in the MRI in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
Lanfer, B., I. Paul-Jordanov, M. Scherg, and C. H. Wolters. “Influence of Interior Cerebrospinal Fluid Compartments on EEG Source Analysis.” In Proceedings BMT 2012, Vol. 57. Jena: De Gruyter, 2012. doi:10.1515/bmt-2012-4020.&lt;br /&gt;
&lt;br /&gt;
Yvert, B., O. Bertrand, M. Thévenet, J. F. Echallier, and J. Pernier. “A Systematic Evaluation of the Spherical Model Accuracy in EEG Dipole Localization.” Electroencephalography and Clinical Neurophysiology 102, no. 5 (May 1997): 452–59. doi:16/S0921-884X(97)96611-X.&lt;br /&gt;
&lt;br /&gt;
== How Coregistration is done ==&lt;br /&gt;
&lt;br /&gt;
This section outlines the basic steps to coregister the EEG / MEG data to an individual MRI. These steps are necessary to load an individual MRI into BESA Research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What happens:'''&lt;br /&gt;
&lt;br /&gt;
* EEG / MEG sensor locations and the MRI data are defined in different coordinate systems. Setting up coregistration is the process of aligning the two coordinate systems.&lt;br /&gt;
* BESA Research uses the ''Coregistration Dialog'' to coordinate the alignment procedure.&lt;br /&gt;
* Alignment is done with the ''AC-PC-transformed MRI''.&lt;br /&gt;
* BESA Research displays the ''Talairach-transformed MRI'' in the source analysis module.&lt;br /&gt;
* A coregistration file (with the extension &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.sfh'''&amp;lt;/span&amp;gt;&amp;quot;) is used to mediate between BESA Research and BESA MRI (or BrainVoyagerQX):&lt;br /&gt;
* BESA Research writes the coregistration file which contains the coordinates of head surface points (fiducials, electrodes, other digitized surface points).&lt;br /&gt;
* The coordinates are read into BESA MRI (or BrainVoyager), and aligned with the AC-PC-transformed MRI. The alignment information is then appended to the ''coregistration file''. The names of the AC-PC MRI (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.vmr&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the surface mesh (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.srf&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), and, if available, the Talairach transformation, are also appended.&lt;br /&gt;
* BESA Research reads the coregistration file and appends the name of the Talairach-transformed MRI and head surface. If a brain surface has been created, this is also appended.&lt;br /&gt;
* Subsequently, BESA Research reads the coregistration file automatically when loading the data file.&lt;br /&gt;
* In the BESA Research source module, the individual MRI is displayed instead of the standard MRI. Talairach coordinates of dipoles are the &amp;quot;real&amp;quot; Talairach coordinates as defined, e.g., in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The steps you have to take (once for each data set):'''&lt;br /&gt;
&lt;br /&gt;
* From the BESA Research ''Coregistration Dialog'', write a coregistration file. Switch to BESA MRI (or BrainVoyagerQX).&lt;br /&gt;
* If BESA MRI is used follow the steps in the coregistration quickguide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* If BrainVoyager is used follow the steps in Section “''How to set up coregistration between BESA and BrainVoyager”.''&lt;br /&gt;
* Back in BESA Research, reload the altered '''coregistration file'''. When using BESA MRI the file names of the generated surface and volume data files will be automatically filled in. When using BrainVoyager file names are only filled in automatically when the files are named according to the file naming conventions. Otherwise, file names have to be set manually.&lt;br /&gt;
* The coregistration file is now associated with the data file in the BESA Research database and will be used automatically the next time the file is opened in BESA Research. If the database entry is cleared, and the data are reloaded, you must make sure the coregistration file is also loaded (either using the ''Coregistration Dialog'' or the ''Channel and digitized head surface point information Dialog'').&lt;br /&gt;
&lt;br /&gt;
==  Alignment of BESA and MRICoordinate Systems  ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration Dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog is opened either from the ''Channel and digitized head surface point information'' (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) ''dialog ''by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit/Coreg'''&amp;lt;/span&amp;gt; button, or from the main menu (&amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File/MRI&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Coregistration...'''&amp;lt;/span&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the coregistration dialog is invoked from an EEG data set in which no digitized electrode coordinates are available (i.e. standard electrode positions located on a sphere are assumed), BESA Research presents a warning message, saying that for MRI coregistration realistic electrode coordinates produce better results. BESA Research has a list of such realistic standard coordinates (i.e. located on a pre-defined standard head surface) for various electrodes available in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;, which is located in the Standard Electrode folder. If all electrodes in the dataset are listed in this file, a dialog window suggests to apply this file to the current data set, i.e. to switch from standard sphere coordinates to the standard realistic electrode coordinates in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;. If the suggestion is accepted, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; is assigned to the dataset (see Channel and digitized head surface point information (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) dialog).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Dialog:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (1).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Select MRI prog'''&amp;lt;/span&amp;gt; button to select your preferred MRI program. The current choice is between ''BESA MRI.exe'' and ''BrainVoyagerQX.exe''. The path to the MRI program is saved (in ''System\BESA.set'') and will be remembered by BESA Research. The top right hand button (now showing '''BESA MRI''') shows the current selection.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BESA MRI'''&amp;lt;/span&amp;gt; button to start the process of aligning the BESA Research and MRI coordinate systems. If no coregistration (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) file is defined in the dialog (empty ''Surface coregistration file edit box''), BESA Research will first prompt for a file name. We recommend saving this file to the folder where the MRIs are kept. The MRI program will then be started. When you return to the ''Coregistration Dialog'', BESA Research checks if the ''Coregistration File'' has changed. If so, the dialog is updated with the new information.&lt;br /&gt;
* Press the top &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse... '''&amp;lt;/span&amp;gt;button to select a preexisting ''Coregistration File''.&lt;br /&gt;
* The entries in the edit boxes below show the files that will be used in the BESA Research Source Analysis module when the individual MRI is loaded. When using BESA MRI the file names will be automatically filled in. If you are using BrainVoagerQX and you are following our (and the BrainVoyagerQX) recommended naming conventions for files, and the files exist, then the names will be filled in automatically after you have completed the alignment procedure in BrainVoyagerQX. Otherwise you may have to browse for the files.&lt;br /&gt;
* Below the edit boxes the FEM field states whether all necessary information for the individual FEM head model were found in the coregistration file. If the field says ''Individual FEM for EEG'' ''defined!'' then all necessary data was found and the individual FEM EEG head model can be used in the BESA Research Source Analysis module. A similar message indicates whether the FEM MEG head model is available.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note that the MRI and the surfaces are Talairach-transformed! Alignment between BESA Research and the individual MRI is done with the MRI transformed to the AC-PC coordinate system, but the BESA Research Source Analysis module uses the Talairach-transformed image data and surfaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Coregistration Using BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
It is assumed that you know how to load an MRI as a 3D data set into BrainVoyagerQX, and how to clean the image so that regions outside the head are black. We also assume knowledge of how to create AC-PC-aligned and Talairach-transformed MRIs.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* BESA Research. Start the ''Coregistration Dialog''. Export the Coregistration File (head surface points) from your data by pressing the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; '''BrainVoyagerQX'''&amp;lt;/span&amp;gt; button in the dialog. Save the file to the directory where your MRI is located. BrainVoyagerQX is started.&lt;br /&gt;
* BrainVoyagerQX. Load the MRI corresponding to the EEG/MEG data. For optimal performance, the MRI should be cleaned so that regions outside the head are black. Prepare an AC-PC-transformed MRI and a Talairach MRI. For each, generate a surface mesh. Save these files following our recommended naming conventions (see chapter [[Integration_with_MRI_and_fMRI#MRI_file_Name_Conventions|MRI File Name Conventions]]). Save the Talairach coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If these steps have already been performed, load the ACPC MRI and load the ACPC mesh. If you want to generate a brain surface mesh, see chapter [[Integration_with_MRI_and_fMRI#How_to_Generate_a_Brain_Surface_Mesh|How to Generate a Brain Surface Mesh]].&lt;br /&gt;
* BrainVoyagerQX. Load the Coregistration File (''EEG-MEG BESA/Load Surface Points''). The points will be displayed, but they are not aligned to the head:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (2).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Define fiducial points on the head surface. Right click on the 3D head display and select the ''Fiducials Dialog'' in the drop-down menu:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (3).gif ‎]]  [[Image:MRI Integration (4).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Rotate the head (by holding the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Shift '''&amp;lt;/span&amp;gt;button down and clicking and dragging with the mouse) so that the Nasion is clearly visible. Move the mouse to the Nasion, and press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl+Left Click'''&amp;lt;/span&amp;gt;. The coordinates of the Nasion are inserted into the dialog. Repeat for the left preauricular point, and then for the right preauricular point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (5).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: if you have defined your fiducials differently in your BESA Research data (e.g. ear holes), click on the corresponding points in the MRI. If you have additional head surface points (step 8), accuracy in pinpointing the fiducials is not critical.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. In the Fiducials Dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Fit fiducials'''&amp;lt;/span&amp;gt; button. The head surface points are now more or less aligned to the head.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (6).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Now select '''''EEG-MEG BESA/Fit Surface Points...'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (7).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not see the right half of the dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Advanced &amp;gt;&amp;gt;'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Specify the distances of the digitization points from the skin. In the illustration above, the digitization points for electrodes are estimated to be 8 mm from the surface of the head. For the purpose of accurate alignment, the distance of digitization points from skin section of the dialog needs to be filled in correctly. We recommend that &amp;quot;Restrain solution around fiducials&amp;quot; is checked, and a reasonable limit (here 3 mm) of the restraint is defined. Then press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (8).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BrainVoyager fits the points to the head, stretching x, y, and z coordinates to obtain a better fit than before.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: The fit performed during this step accounts for scaling inequalities between the x, y, and z axes in the MRI. Coregistration gains in accuracy over the use of fiducials alone a) because more head surface points are used, and b) because the scaling inequalities are accounted for.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alignment is now completed. If you only want to display the structural MRI in the BESA Source Module, you can return to the BESA Coregistration Dialog.&lt;br /&gt;
* BESA Research. When you switch back to the Coregistration Dialog, BESA Research will try to fill in the names of the Talairach MRI and surface meshes. If the names are not filled in, use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse...'''&amp;lt;/span&amp;gt; buttons to select the MRI and surface meshes. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to save the Coregistration File. Alignment is completed!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The alignment steps need only be performed once for a given MRI and EEG/MEG data set. Otherwise, after starting BrainVoyager, just load the MRI, the surface mesh, and the surface points (see “[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done |How to Set Up Coregistration with BrainVoyager after Alignment has been Done]]”). Now the following actions are possible: see chapters&lt;br /&gt;
&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-Locate Sources and MRI in the BESA Research Source Module]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]&lt;br /&gt;
&lt;br /&gt;
=== MRI file Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
If you follow the naming conventions for file names as described here, BESA Research detects the file names it requires, and the ''Coregistration Dialog'' is filled in automatically.&lt;br /&gt;
&lt;br /&gt;
Please note that BESA MRI automatically uses these naming conventions for the generated files.&lt;br /&gt;
&lt;br /&gt;
* '''The AC-PC MRI file name''' should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.srf'''&amp;lt;/span&amp;gt;&amp;quot;. After alignment, BrainVoyagerQX writes these names to the Coregistration File.&lt;br /&gt;
* '''The Talairach MRI file name '''should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If defined, the brain surface mesh should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot; ('''WM''' = '''w'''hite '''m'''atter).&lt;br /&gt;
* '''How BESA Research finds the Talairach files.''' When BESA Research rereads the Coregistration File after alignment of the coordinate systems, it finds the ACPC file names and defines the corresponding TAL file names. If these files exist, the names are entered into the Coregistration Dialog. For instance, if the Coregistration File contains the name &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for the files &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;, and &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If these files exist, they are entered into the dialog.&lt;br /&gt;
* '''Older BrainVoyager version.''' If you use BrainVoyager.exe to align coordinate systems, the file names are not saved with the Coregistration File. In this case, browse for the Talairach or the ACPC MRI from the Coregistration Dialog. BESA Research will use the rules as described above to insert the correct file names into the dialog.&lt;br /&gt;
* '''Missing Talairach coordinates.''' If, after aligning coordinate systems, the Talairach coordinates are missing from the Coregistration File (you forgot to load the Talairach coordinates in BrainVoyagerQX, or you used BrainVoyager.exe), BESA Research will look for a file ending with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot;, and read the coordinates from this file. You can also browse for a &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file in the Coregistration Dialog. For instance, if the MRI file is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MR_'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot; to find the Talairach coordinates.&lt;br /&gt;
* '''File names in the Coregistration File are saved relative to the Coregistration File location, if they are in the same folder.''' If the MRIs are in the same folder as the Coregistration File they will be recorded as &amp;quot;.\filename&amp;quot; (e.g. &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.\MRI PB_tal.vmr'''&amp;lt;/span&amp;gt;&amp;quot;). This means that you can copy the Coregistration File together with the MRIs and meshes to a different folder, and BESA Research will be able to locate the files when the Coregistration File is opened. If the MRIs are saved in a different folder from the Coregistration File, the absolute paths are saved in the file. If the files are moved to new locations, you will have to restart the Coregistration Dialog and redefine the file locations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to Generate a Brain Surface Mesh ===&lt;br /&gt;
&lt;br /&gt;
BESA Research is able to compute surface images, such as (Cortical LORETA, Cortical CLARA, Minimum Norm) using an individual cortex surface as the source space. A suitable cortex surface for this purpose can be effortlessly created using BESA MRI. Alternatively, BrainVoyager can be used for the creation of the brain surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA MRI'''&lt;br /&gt;
* The brain surface generation is performed as one work step of the BESA MRI segmentation workflow.&lt;br /&gt;
* The cortex surface reconstruction is done using a robust and accurate automatic segmentation procedure.&lt;br /&gt;
* Details on how to generate the brain surface mesh in BESA MRI can be found in the coregistration quickguide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BrainVoyager'''&lt;br /&gt;
* BrainVoyagerQX provides a semiautomatic procedure to generate meshes for the brain surface of the Talairach MRI. Please refer to the BrainVoyager Help to find out how to do this.&lt;br /&gt;
* The result of the BrainVoyager procedure is two meshes, one for the left and one for the right hemisphere.&lt;br /&gt;
* BESA Research requires a single mesh. Therefore, load first one mesh (''Meshes/Load Mesh..''.), and append the other mesh (''Meshes/Add Mesh...''). Merge these two meshes (''Meshes/Merge'' ''meshes in surface window'') and then save the result (''Meshes/Save Mesh...''). If possible, use the recommended name conventions for the resulting file (file name ends in &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf&amp;quot;). '''&amp;lt;/span&amp;gt;For instance, if the Talairach MRI is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, name the brain surface mesh &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;.&lt;br /&gt;
* See also the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website (http://brainvoyager.com/Downloads.html).&lt;br /&gt;
&lt;br /&gt;
==  Co-locating Dipoles and MRI Locations ==&lt;br /&gt;
&lt;br /&gt;
=== Co-locating Sources and MRI in the BESA Research Source Module ===&lt;br /&gt;
&lt;br /&gt;
If the alignment procedure using BESA MRI (or BrainVoyager) has been completed then you can load the individual structural MRI in the Source Module by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''A''''&amp;lt;/span&amp;gt; or using a mouse right click and selecting '''''Display MRI'''''.&lt;br /&gt;
&lt;br /&gt;
Sources in the current model are then overlayed onto the individual MRI.&lt;br /&gt;
&lt;br /&gt;
A double-click at any location in the MRI will define a new source at the corresponding location in the BESA Research head model.&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (9).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
=== Coregistration with BrainVoyager after Alignment has been Done ===&lt;br /&gt;
&lt;br /&gt;
Alignment between BESA Research and BrainVoyager is only required once for a given BESA Research data set and the corresponding MRI. At a later time, if you want to Co-locate sources between BESA Research and BrainVoyager, perform the following steps in BrainVoyager:&lt;br /&gt;
* Load the MRI.&lt;br /&gt;
* Load the head surface mesh (''Meshes/Load Mesh..''.).&lt;br /&gt;
* Load the Coregistration File (''EEG-MEG BESA/Load Surface Points..''.).&lt;br /&gt;
&lt;br /&gt;
BrainVoyager is now ready for Co-location.&lt;br /&gt;
&lt;br /&gt;
=== Send a Dipole from BESA Research to BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
First, start BrainVoyager(QX). This can be done from the BESA Research Source Module by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager '''&amp;lt;/span&amp;gt;button. Note that in the Source Module, the ''Options / Preferences / BrainVoyager'' tab allows to define the path to BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
In BrainVoyager, [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|set up coregistration]].&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, highlight the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
Program control will automatically switch to BrainVoyager. The head will be cut at the section corresponding to the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (10).gif‎|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that all dipoles in the current model are sent to BrainVoyager. The highlighted dipole (here, the red dipole) determines the plane at which the head will be cut.&lt;br /&gt;
&lt;br /&gt;
Note that the dipoles are visible in both the surface module and in the 2D view:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (11).gif|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Define a Dipole in BESA Research at a Location Defined in the MRI ===&lt;br /&gt;
&lt;br /&gt;
First set up coregistration (see chapter ''“[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|Coregistration with BrainVoyager after Alignment has been Done]]”'').&lt;br /&gt;
&lt;br /&gt;
In the BrainVoyager 2D MRI view, place the mouse over the point at which you would like to define a dipole. Right click at this point. If this point lies within an fRMI cluster, BrainVoyager will automatically determine its center and use it as a seeding point instead. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send Seed Point To BESA....'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (12).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
The following Dialog is opened:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (13).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send to BESA'''&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BESA Source Analysis window appears. The new dipole or regional source (depending on the setting in the ‘Options’ dialog in the Source Analysis window is now displayed at the corresponding location. If a dipole is seeded, BESA automatically fits its orientation. For further adjustment of the model, you may need to refit the orientation, e.g. at a certain time range, or in the presence of other sources.&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([http://brainvoyager.com/Downloads.html http://brainvoyager.com/Downloads.html]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration File (*.sfh) ===&lt;br /&gt;
&lt;br /&gt;
This file is used to mediate between BESA Research and BESA MRI (or BrainVoyager(QX)). When it is first written by BESA Research, it contains a list of the digitized head surface points (fiducials, electrodes, other digitized points), e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
NrOfPoints: 68&lt;br /&gt;
 Fid_Nz                    0.00000     103.10000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T9                  -78.40000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T10                  73.00000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Ele_E1                  -28.70000      23.90000     122.30000   3 255    0    0&lt;br /&gt;
 Ele_E2                  -80.40000      19.80000      75.90000   3 255    0    0&lt;br /&gt;
 Ele_E3                  -84.00000      37.90000       9.00000   3 255    0    0&lt;br /&gt;
 Ele_E4                  -17.60000      92.90000      89.10000   3 255    0    0&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
 Ele_E63                  -6.80000    -104.00000      54.40000   3 255    0    0&lt;br /&gt;
 Ele_E64                 -42.80000     -46.90000     115.60000   3 255    0    0&lt;br /&gt;
 Ele_Cz'                  -2.10000       2.20000     131.10000   3 255    0    0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line contains a label, the coordinates in the Head Coordinate system, and parameters specifying the size and color of the sensor or head surface point as displayed in BESA MRI (or BrainVoyager).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After aligning the coordinate systems, BESA MRI (or BrainVoyagerQX) appends lines defining the transformation between the BESA Research and the MRI coordinate systems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Trans-data(in BV-coords): 3 translation, 3 rotation (in grad), 3 scale&lt;br /&gt;
37.435 15.811 2.820 0.025 1.938 8.779  1.009 0.973 0.977&lt;br /&gt;
Fiducials:&lt;br /&gt;
41.7873  148.0180  128.0844&lt;br /&gt;
154.7772  169.4783  204.1080&lt;br /&gt;
147.0154  168.9746  54.1266&lt;br /&gt;
Midpoint (in BV-coords):&lt;br /&gt;
128.0000  128.0000  128.0000&lt;br /&gt;
Volume:  C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.vmr&lt;br /&gt;
Surface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.srf&lt;br /&gt;
AC: 128 128 128&lt;br /&gt;
PC: 154 128 128&lt;br /&gt;
AP: 58 128 128&lt;br /&gt;
PP: 241 129 130&lt;br /&gt;
SP: 154 50 128&lt;br /&gt;
IP: 128 172 128&lt;br /&gt;
RP: 128 128 60&lt;br /&gt;
LP: 165 128 198&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Older versions of BrainVoyager.exe do not append the lines starting with &amp;quot;Volume&amp;quot;. In addition, the Talairach coordinates (starting at &amp;quot;AC: ...&amp;quot;) are not appended if they were not loaded in BrainVoyagerQX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, when the Coregistration Dialog in BESA Research has found the Talairach MRI and surface meshes, and you press the OK button, BESA Research appends the additional file names:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TalVolume: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.vmr&lt;br /&gt;
TalSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.srf&lt;br /&gt;
TalBrainSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal_wm.srf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA MRI already inserts the correct file names into the coregistration file when doing the coregistration. When also an EEG or MEG  FEM head model is generated then additional lines are appended to the coregistration file containing the file names of the generated FEM data files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MRI Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend a high quality T1-weighted anatomical image with 1 mm³ voxels (e.g. 256 x 256 saggital scan with 1 mm spacing).&lt;br /&gt;
&lt;br /&gt;
In order to define the surface mesh, a clear contrast between the head surface and the outside of the head (T1-weighting) is required. Noise and measurement artifacts can influence the representation of the scalp surface. When doing the coregistration in BrainVoyager improvements in noisy images often can be achieved by cleaning up the image after first reading it using the tools provided by BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
For coregistration with head surface points, it is useful to include the whole head in the image, including nose and ears. If surface points on the nose are included with the EEG/MEG data set, these points help to stabilize the fit of head surface points to the surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EEG/MEG Data Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend several (30 or more) digitized head surface points in addition to the fiducials, including points on the nose (nose tip and sides). These points may include electrodes. In the case of electrodes, it is important to measure the distance from the scalp to the digitization point, i.e. the electrode thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI</id>
		<title>Integration with MRI and fMRI</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI"/>
				<updated>2021-05-06T06:54:41Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* How Coregistration is done */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA MRI&lt;br /&gt;
|version = BESA Research 6.1 or higher&amp;lt;br/&amp;gt;BESA MRI 2.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- = BESA Research Integration with MRI and fMRI = --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Both for developing and evaluating dipole source models of EEG or MEG activity, it is useful to have access to structural MRI or fMRI data.&lt;br /&gt;
&lt;br /&gt;
The BESA MRI software allows to preprocess structural MRI data so that the individual anatomical information contained in the MRI can be utilized in BESA Research. BESA MRI makes it possible ...&lt;br /&gt;
* ... to align the EEG and MEG sensors with the structural MRI data.&lt;br /&gt;
* ... to read and display the aligned, individual Talairach structural MRIs directly in the BESA Research Source Analysis module. In this way, source analysis results can be presented on top of the aligned MRIs, which allows us to evaluate the anatomical regions to which the reconstructed sources may correspond.&lt;br /&gt;
* ... to use an individual, realistically shaped FEM head model for source analysis in BESA Research. FEM head models take into account the individual volume conduction properties of the subject's head derived from the structural MRI data. This allows for more accurate source analysis (Yvert 1997, Lanfer 2012).&lt;br /&gt;
&lt;br /&gt;
To offer an easy integration with fMRI data we have, in collaboration with Rainer Goebel, optimized the interface between BESA Research and BrainVoyagerQX. &lt;br /&gt;
&lt;br /&gt;
With these tools, we can ...&lt;br /&gt;
* ... use fMRI BOLD regions or MRI structures to initialize dipole models.&lt;br /&gt;
* ... visualize dipoles from BESA Research models together with the structural MRI in BrainVoyager in order to evaluate the regions to which the dipoles may correspond.&lt;br /&gt;
* ... combine the localization advantages of (f)MRI with the high temporal resolution of EEG and MEG, for instance by using (f)MRI to place the sources, and the source waveforms of BESA Research to provide feedback about the time course of the source activity.&lt;br /&gt;
* ... overlay source analysis results obtained in BESA Research with fMRI data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' For simpler coregistration, we recommend to use BrainVoyagerQX rather than the older BrainVoyager, but BESA Research will work with both program versions.&lt;br /&gt;
&lt;br /&gt;
The chapters below describe the steps necessary to integrate the MRI and fMRI data with BESA Research. Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([https://www.brainvoyager.com/downloads/downloads.html BrainVoyager - Downloads]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Aligning Coordinate Systems'''&lt;br /&gt;
&lt;br /&gt;
* For a given BESA data set, the electrode and other head surface points need to be aligned to the MRI coordinates.&lt;br /&gt;
* The basic steps necessary to align the EEG electrode locations, the MEG sensors and the MRI are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How Coregistration is done]].&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BESA MRI can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BrainVoyager are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How To set up Coregistration between BESA and BrainVoyager]].&lt;br /&gt;
* In BESA Research, all necessary settings with regard to the alignment are made in the [[Integration_with_MRI_and_fMRI#The_Coregistration_Dialog|Coregistration Dialog]].&lt;br /&gt;
* Requirements with respect to the MRI data for a good coregistration can be found in Section [[#MRI_Requirements_for_Good_Coregistration|MRI Requirements for Good Coregistration]].&lt;br /&gt;
* Requirements with respect to EEG and MEG data for a good coregistration can be found in Section [[#EEG/MEG Data Requirements for Good Coregistration|EEG/MEG Data Requirements for Good Coregistration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Generating an individual, realistically shaped FEM head model'''&lt;br /&gt;
&lt;br /&gt;
* The generation of a FEM head model that can be used in BESA Research is done in BESA MRI as an additional step following the EEG / MEG to MRI coregistration.&lt;br /&gt;
* Detailed instructions on how to generate the FEM head model can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Co-locating dipoles and MRI locations'''&lt;br /&gt;
&lt;br /&gt;
* After aligning the EEG / MEG and the MRI data it is possible to co-locate dipoles and MRI locations. This means, it is possible to visualize the dipoles and to specify the dipole parameters in the MRI coordinate system.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-locate sources and MRI in the BESA Research Source Module]] describes how in the BESA Research Source Analysis module dipoles can directly be visualized in the space of the individual MRI.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]] describes how to send a source model from BESA Research to BrainVoyager for further inspection.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]] describes how to insert a dipole at a location defined in the MRI in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
Lanfer, B., I. Paul-Jordanov, M. Scherg, and C. H. Wolters. “Influence of Interior Cerebrospinal Fluid Compartments on EEG Source Analysis.” In Proceedings BMT 2012, Vol. 57. Jena: De Gruyter, 2012. doi:10.1515/bmt-2012-4020.&lt;br /&gt;
&lt;br /&gt;
Yvert, B., O. Bertrand, M. Thévenet, J. F. Echallier, and J. Pernier. “A Systematic Evaluation of the Spherical Model Accuracy in EEG Dipole Localization.” Electroencephalography and Clinical Neurophysiology 102, no. 5 (May 1997): 452–59. doi:16/S0921-884X(97)96611-X.&lt;br /&gt;
&lt;br /&gt;
== How Coregistration is done ==&lt;br /&gt;
&lt;br /&gt;
This section outlines the basic steps to coregister the EEG / MEG data to an individual MRI. These steps are necessary to load an individual MRI into BESA Research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What happens:'''&lt;br /&gt;
&lt;br /&gt;
* EEG / MEG sensor locations and the MRI data are defined in different coordinate systems. Setting up coregistration is the process of aligning the two coordinate systems.&lt;br /&gt;
* BESA Research uses the ''Coregistration Dialog'' to coordinate the alignment procedure.&lt;br /&gt;
* Alignment is done with the ''AC-PC-transformed MRI''.&lt;br /&gt;
* BESA Research displays the ''Talairach-transformed MRI'' in the source analysis module.&lt;br /&gt;
* A coregistration file (with the extension &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.sfh'''&amp;lt;/span&amp;gt;&amp;quot;) is used to mediate between BESA Research and BESA MRI (or BrainVoyagerQX):&lt;br /&gt;
* BESA Research writes the coregistration file which contains the coordinates of head surface points (fiducials, electrodes, other digitized surface points).&lt;br /&gt;
* The coordinates are read into BESA MRI (or BrainVoyager), and aligned with the AC-PC-transformed MRI. The alignment information is then appended to the ''coregistration file''. The names of the AC-PC MRI (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.vmr&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the surface mesh (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.srf&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), and, if available, the Talairach transformation, are also appended.&lt;br /&gt;
* BESA Research reads the coregistration file and appends the name of the Talairach-transformed MRI and head surface. If a brain surface has been created, this is also appended.&lt;br /&gt;
* Subsequently, BESA Research reads the coregistration file automatically when loading the data file.&lt;br /&gt;
* In the BESA Research source module, the individual MRI is displayed instead of the standard MRI. Talairach coordinates of dipoles are the &amp;quot;real&amp;quot; Talairach coordinates as defined, e.g., in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The steps you have to take (once for each data set):'''&lt;br /&gt;
&lt;br /&gt;
* From the BESA Research ''Coregistration Dialog'', write a coregistration file. Switch to BESA MRI (or BrainVoyagerQX).&lt;br /&gt;
* If BESA MRI is used follow the steps in the coregistration quickguide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* If BrainVoyager is used follow the steps in Section “''How to set up coregistration between BESA and BrainVoyager”.''&lt;br /&gt;
* Back in BESA Research, reload the altered '''coregistration file'''. When using BESA MRI the file names of the generated surface and volume data files will be automatically filled in. When using BrainVoyager file names are only filled in automatically when the files are named according to the file naming conventions. Otherwise, file names have to be set manually.&lt;br /&gt;
* The coregistration file is now associated with the data file in the BESA Research database and will be used automatically the next time the file is opened in BESA Research. If the database entry is cleared, and the data are reloaded, you must make sure the coregistration file is also loaded (either using the ''Coregistration Dialog'' or the ''Channel and digitized head surface point information Dialog'').&lt;br /&gt;
&lt;br /&gt;
==  Alignment of BESA and MRICoordinate Systems  ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration Dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog is opened either from the ''Channel and digitized head surface point information'' (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) ''dialog ''by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit/Coreg'''&amp;lt;/span&amp;gt; button, or from the main menu (&amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File/MRI&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Coregistration...'''&amp;lt;/span&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the coregistration dialog is invoked from an EEG data set in which no digitized electrode coordinates are available (i.e. standard electrode positions located on a sphere are assumed), BESA Research presents a warning message, saying that for MRI coregistration realistic electrode coordinates produce better results. BESA Research has a list of such realistic standard coordinates (i.e. located on a pre-defined standard head surface) for various electrodes available in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;, which is located in the Standard Electrode folder. If all electrodes in the dataset are listed in this file, a dialog window suggests to apply this file to the current data set, i.e. to switch from standard sphere coordinates to the standard realistic electrode coordinates in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;. If the suggestion is accepted, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; is assigned to the dataset (see Channel and digitized head surface point information (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) dialog).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Dialog:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (1).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Select MRI prog'''&amp;lt;/span&amp;gt; button to select your preferred MRI program. The current choice is between ''BESA MRI.exe'' and ''BrainVoyagerQX.exe''. The path to the MRI program is saved (in ''System\BESA.set'') and will be remembered by BESA Research. The top right hand button (now showing '''BESA MRI''') shows the current selection.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BESA MRI'''&amp;lt;/span&amp;gt; button to start the process of aligning the BESA Research and MRI coordinate systems. If no coregistration (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) file is defined in the dialog (empty ''Surface coregistration file edit box''), BESA Research will first prompt for a file name. We recommend saving this file to the folder where the MRIs are kept. The MRI program will then be started. When you return to the ''Coregistration Dialog'', BESA Research checks if the ''Coregistration File'' has changed. If so, the dialog is updated with the new information.&lt;br /&gt;
* Press the top &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse... '''&amp;lt;/span&amp;gt;button to select a preexisting ''Coregistration File''.&lt;br /&gt;
* The entries in the edit boxes below show the files that will be used in the BESA Research Source Analysis module when the individual MRI is loaded. When using BESA MRI the file names will be automatically filled in. If you are using BrainVoagerQX and you are following our (and the BrainVoyagerQX) recommended naming conventions for files, and the files exist, then the names will be filled in automatically after you have completed the alignment procedure in BrainVoyagerQX. Otherwise you may have to browse for the files.&lt;br /&gt;
* Below the edit boxes the FEM field states whether all necessary information for the individual FEM head model were found in the coregistration file. If the field says ''Individual FEM for EEG'' ''defined!'' then all necessary data was found and the individual FEM EEG head model can be used in the BESA Research Source Analysis module. A similar message indicates whether the FEM MEG head model is available.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note that the MRI and the surfaces are Talairach-transformed! Alignment between BESA Research and the individual MRI is done with the MRI transformed to the AC-PC coordinate system, but the BESA Research Source Analysis module uses the Talairach-transformed image data and surfaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Coregistration Using BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
It is assumed that you know how to load an MRI as a 3D data set into BrainVoyagerQX, and how to clean the image so that regions outside the head are black. We also assume knowledge of how to create AC-PC-aligned and Talairach-transformed MRIs.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* BESA Research. Start the ''Coregistration Dialog''. Export the Coregistration File (head surface points) from your data by pressing the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; '''BrainVoyagerQX'''&amp;lt;/span&amp;gt; button in the dialog. Save the file to the directory where your MRI is located. BrainVoyagerQX is started.&lt;br /&gt;
* BrainVoyagerQX. Load the MRI corresponding to the EEG/MEG data. For optimal performance, the MRI should be cleaned so that regions outside the head are black. Prepare an AC-PC-transformed MRI and a Talairach MRI. For each, generate a surface mesh. Save these files following our recommended naming conventions (see chapter “[[Integration_with_MRI_and_fMRI#MRI_file_Name_Conventions|MRI File Name Conventions]]”). Save the Talairach coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If these steps have already been performed, load the ACPC MRI and load the ACPC mesh. If you want to generate a brain surface mesh, see chapter “[[Integration_with_MRI_and_fMRI#How_to_Generate_a_Brain_Surface_Mesh|How to Generate a Brain Surface Mesh]]”.&lt;br /&gt;
* BrainVoyagerQX. Load the Coregistration File (''EEG-MEG BESA/Load Surface Points''). The points will be displayed, but they are not aligned to the head:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (2).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Define fiducial points on the head surface. Right click on the 3D head display and select the ''Fiducials Dialog'' in the drop-down menu:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (3).gif ‎]]  [[Image:MRI Integration (4).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Rotate the head (by holding the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Shift '''&amp;lt;/span&amp;gt;button down and clicking and dragging with the mouse) so that the Nasion is clearly visible. Move the mouse to the Nasion, and press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl+Left Click'''&amp;lt;/span&amp;gt;. The coordinates of the Nasion are inserted into the dialog. Repeat for the left preauricular point, and then for the right preauricular point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (5).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: if you have defined your fiducials differently in your BESA Research data (e.g. ear holes), click on the corresponding points in the MRI. If you have additional head surface points (step 8), accuracy in pinpointing the fiducials is not critical.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. In the Fiducials Dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Fit fiducials'''&amp;lt;/span&amp;gt; button. The head surface points are now more or less aligned to the head.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (6).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Now select '''''EEG-MEG BESA/Fit Surface Points...'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (7).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not see the right half of the dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Advanced &amp;gt;&amp;gt;'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Specify the distances of the digitization points from the skin. In the illustration above, the digitization points for electrodes are estimated to be 8 mm from the surface of the head. For the purpose of accurate alignment, the distance of digitization points from skin section of the dialog needs to be filled in correctly. We recommend that &amp;quot;Restrain solution around fiducials&amp;quot; is checked, and a reasonable limit (here 3 mm) of the restraint is defined. Then press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (8).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BrainVoyager fits the points to the head, stretching x, y, and z coordinates to obtain a better fit than before.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: The fit performed during this step accounts for scaling inequalities between the x, y, and z axes in the MRI. Coregistration gains in accuracy over the use of fiducials alone a) because more head surface points are used, and b) because the scaling inequalities are accounted for.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alignment is now completed. If you only want to display the structural MRI in the BESA Source Module, you can return to the BESA Coregistration Dialog.&lt;br /&gt;
* BESA Research. When you switch back to the Coregistration Dialog, BESA Research will try to fill in the names of the Talairach MRI and surface meshes. If the names are not filled in, use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse...'''&amp;lt;/span&amp;gt; buttons to select the MRI and surface meshes. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to save the Coregistration File. Alignment is completed!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The alignment steps need only be performed once for a given MRI and EEG/MEG data set. Otherwise, after starting BrainVoyager, just load the MRI, the surface mesh, and the surface points (see “[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done |How to Set Up Coregistration with BrainVoyager after Alignment has been Done]]”). Now the following actions are possible: see chapters&lt;br /&gt;
&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-Locate Sources and MRI in the BESA Research Source Module]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]&lt;br /&gt;
&lt;br /&gt;
=== MRI file Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
If you follow the naming conventions for file names as described here, BESA Research detects the file names it requires, and the ''Coregistration Dialog'' is filled in automatically.&lt;br /&gt;
&lt;br /&gt;
Please note that BESA MRI automatically uses these naming conventions for the generated files.&lt;br /&gt;
&lt;br /&gt;
* '''The AC-PC MRI file name''' should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.srf'''&amp;lt;/span&amp;gt;&amp;quot;. After alignment, BrainVoyagerQX writes these names to the Coregistration File.&lt;br /&gt;
* '''The Talairach MRI file name '''should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If defined, the brain surface mesh should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot; ('''WM''' = '''w'''hite '''m'''atter).&lt;br /&gt;
* '''How BESA Research finds the Talairach files.''' When BESA Research rereads the Coregistration File after alignment of the coordinate systems, it finds the ACPC file names and defines the corresponding TAL file names. If these files exist, the names are entered into the Coregistration Dialog. For instance, if the Coregistration File contains the name &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for the files &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;, and &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If these files exist, they are entered into the dialog.&lt;br /&gt;
* '''Older BrainVoyager version.''' If you use BrainVoyager.exe to align coordinate systems, the file names are not saved with the Coregistration File. In this case, browse for the Talairach or the ACPC MRI from the Coregistration Dialog. BESA Research will use the rules as described above to insert the correct file names into the dialog.&lt;br /&gt;
* '''Missing Talairach coordinates.''' If, after aligning coordinate systems, the Talairach coordinates are missing from the Coregistration File (you forgot to load the Talairach coordinates in BrainVoyagerQX, or you used BrainVoyager.exe), BESA Research will look for a file ending with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot;, and read the coordinates from this file. You can also browse for a &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file in the Coregistration Dialog. For instance, if the MRI file is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MR_'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot; to find the Talairach coordinates.&lt;br /&gt;
* '''File names in the Coregistration File are saved relative to the Coregistration File location, if they are in the same folder.''' If the MRIs are in the same folder as the Coregistration File they will be recorded as &amp;quot;.\filename&amp;quot; (e.g. &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.\MRI PB_tal.vmr'''&amp;lt;/span&amp;gt;&amp;quot;). This means that you can copy the Coregistration File together with the MRIs and meshes to a different folder, and BESA Research will be able to locate the files when the Coregistration File is opened. If the MRIs are saved in a different folder from the Coregistration File, the absolute paths are saved in the file. If the files are moved to new locations, you will have to restart the Coregistration Dialog and redefine the file locations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to Generate a Brain Surface Mesh ===&lt;br /&gt;
&lt;br /&gt;
BESA Research is able to compute surface images, such as (Cortical LORETA, Cortical CLARA, Minimum Norm) using an individual cortex surface as the source space. A suitable cortex surface for this purpose can be effortlessly created using BESA MRI. Alternatively, BrainVoyager can be used for the creation of the brain surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA MRI'''&lt;br /&gt;
* The brain surface generation is performed as one work step of the BESA MRI segmentation workflow.&lt;br /&gt;
* The cortex surface reconstruction is done using a robust and accurate automatic segmentation procedure.&lt;br /&gt;
* Details on how to generate the brain surface mesh in BESA MRI can be found in the coregistration quickguide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BrainVoyager'''&lt;br /&gt;
* BrainVoyagerQX provides a semiautomatic procedure to generate meshes for the brain surface of the Talairach MRI. Please refer to the BrainVoyager Help to find out how to do this.&lt;br /&gt;
* The result of the BrainVoyager procedure is two meshes, one for the left and one for the right hemisphere.&lt;br /&gt;
* BESA Research requires a single mesh. Therefore, load first one mesh (''Meshes/Load Mesh..''.), and append the other mesh (''Meshes/Add Mesh...''). Merge these two meshes (''Meshes/Merge'' ''meshes in surface window'') and then save the result (''Meshes/Save Mesh...''). If possible, use the recommended name conventions for the resulting file (file name ends in &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf&amp;quot;). '''&amp;lt;/span&amp;gt;For instance, if the Talairach MRI is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, name the brain surface mesh &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;.&lt;br /&gt;
* See also the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website (http://brainvoyager.com/Downloads.html).&lt;br /&gt;
&lt;br /&gt;
==  Co-locating Dipoles and MRI Locations ==&lt;br /&gt;
&lt;br /&gt;
=== Co-locating Sources and MRI in the BESA Research Source Module ===&lt;br /&gt;
&lt;br /&gt;
If the alignment procedure using BESA MRI (or BrainVoyager) has been completed then you can load the individual structural MRI in the Source Module by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''A''''&amp;lt;/span&amp;gt; or using a mouse right click and selecting '''''Display MRI'''''.&lt;br /&gt;
&lt;br /&gt;
Sources in the current model are then overlayed onto the individual MRI.&lt;br /&gt;
&lt;br /&gt;
A double-click at any location in the MRI will define a new source at the corresponding location in the BESA Research head model.&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (9).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
=== Coregistration with BrainVoyager after Alignment has been Done ===&lt;br /&gt;
&lt;br /&gt;
Alignment between BESA Research and BrainVoyager is only required once for a given BESA Research data set and the corresponding MRI. At a later time, if you want to Co-locate sources between BESA Research and BrainVoyager, perform the following steps in BrainVoyager:&lt;br /&gt;
* Load the MRI.&lt;br /&gt;
* Load the head surface mesh (''Meshes/Load Mesh..''.).&lt;br /&gt;
* Load the Coregistration File (''EEG-MEG BESA/Load Surface Points..''.).&lt;br /&gt;
&lt;br /&gt;
BrainVoyager is now ready for Co-location.&lt;br /&gt;
&lt;br /&gt;
=== Send a Dipole from BESA Research to BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
First, start BrainVoyager(QX). This can be done from the BESA Research Source Module by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager '''&amp;lt;/span&amp;gt;button. Note that in the Source Module, the ''Options / Preferences / BrainVoyager'' tab allows to define the path to BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
In BrainVoyager, [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|set up coregistration]].&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, highlight the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
Program control will automatically switch to BrainVoyager. The head will be cut at the section corresponding to the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (10).gif‎|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that all dipoles in the current model are sent to BrainVoyager. The highlighted dipole (here, the red dipole) determines the plane at which the head will be cut.&lt;br /&gt;
&lt;br /&gt;
Note that the dipoles are visible in both the surface module and in the 2D view:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (11).gif|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Define a Dipole in BESA Research at a Location Defined in the MRI ===&lt;br /&gt;
&lt;br /&gt;
First set up coregistration (see chapter ''“[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|Coregistration with BrainVoyager after Alignment has been Done]]”'').&lt;br /&gt;
&lt;br /&gt;
In the BrainVoyager 2D MRI view, place the mouse over the point at which you would like to define a dipole. Right click at this point. If this point lies within an fRMI cluster, BrainVoyager will automatically determine its center and use it as a seeding point instead. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send Seed Point To BESA....'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (12).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
The following Dialog is opened:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (13).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send to BESA'''&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BESA Source Analysis window appears. The new dipole or regional source (depending on the setting in the ‘Options’ dialog in the Source Analysis window is now displayed at the corresponding location. If a dipole is seeded, BESA automatically fits its orientation. For further adjustment of the model, you may need to refit the orientation, e.g. at a certain time range, or in the presence of other sources.&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([http://brainvoyager.com/Downloads.html http://brainvoyager.com/Downloads.html]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration File (*.sfh) ===&lt;br /&gt;
&lt;br /&gt;
This file is used to mediate between BESA Research and BESA MRI (or BrainVoyager(QX)). When it is first written by BESA Research, it contains a list of the digitized head surface points (fiducials, electrodes, other digitized points), e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
NrOfPoints: 68&lt;br /&gt;
 Fid_Nz                    0.00000     103.10000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T9                  -78.40000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T10                  73.00000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Ele_E1                  -28.70000      23.90000     122.30000   3 255    0    0&lt;br /&gt;
 Ele_E2                  -80.40000      19.80000      75.90000   3 255    0    0&lt;br /&gt;
 Ele_E3                  -84.00000      37.90000       9.00000   3 255    0    0&lt;br /&gt;
 Ele_E4                  -17.60000      92.90000      89.10000   3 255    0    0&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
 Ele_E63                  -6.80000    -104.00000      54.40000   3 255    0    0&lt;br /&gt;
 Ele_E64                 -42.80000     -46.90000     115.60000   3 255    0    0&lt;br /&gt;
 Ele_Cz'                  -2.10000       2.20000     131.10000   3 255    0    0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line contains a label, the coordinates in the Head Coordinate system, and parameters specifying the size and color of the sensor or head surface point as displayed in BESA MRI (or BrainVoyager).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After aligning the coordinate systems, BESA MRI (or BrainVoyagerQX) appends lines defining the transformation between the BESA Research and the MRI coordinate systems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Trans-data(in BV-coords): 3 translation, 3 rotation (in grad), 3 scale&lt;br /&gt;
37.435 15.811 2.820 0.025 1.938 8.779  1.009 0.973 0.977&lt;br /&gt;
Fiducials:&lt;br /&gt;
41.7873  148.0180  128.0844&lt;br /&gt;
154.7772  169.4783  204.1080&lt;br /&gt;
147.0154  168.9746  54.1266&lt;br /&gt;
Midpoint (in BV-coords):&lt;br /&gt;
128.0000  128.0000  128.0000&lt;br /&gt;
Volume:  C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.vmr&lt;br /&gt;
Surface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.srf&lt;br /&gt;
AC: 128 128 128&lt;br /&gt;
PC: 154 128 128&lt;br /&gt;
AP: 58 128 128&lt;br /&gt;
PP: 241 129 130&lt;br /&gt;
SP: 154 50 128&lt;br /&gt;
IP: 128 172 128&lt;br /&gt;
RP: 128 128 60&lt;br /&gt;
LP: 165 128 198&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Older versions of BrainVoyager.exe do not append the lines starting with &amp;quot;Volume&amp;quot;. In addition, the Talairach coordinates (starting at &amp;quot;AC: ...&amp;quot;) are not appended if they were not loaded in BrainVoyagerQX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, when the Coregistration Dialog in BESA Research has found the Talairach MRI and surface meshes, and you press the OK button, BESA Research appends the additional file names:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TalVolume: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.vmr&lt;br /&gt;
TalSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.srf&lt;br /&gt;
TalBrainSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal_wm.srf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA MRI already inserts the correct file names into the coregistration file when doing the coregistration. When also an EEG or MEG  FEM head model is generated then additional lines are appended to the coregistration file containing the file names of the generated FEM data files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MRI Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend a high quality T1-weighted anatomical image with 1 mm³ voxels (e.g. 256 x 256 saggital scan with 1 mm spacing).&lt;br /&gt;
&lt;br /&gt;
In order to define the surface mesh, a clear contrast between the head surface and the outside of the head (T1-weighting) is required. Noise and measurement artifacts can influence the representation of the scalp surface. When doing the coregistration in BrainVoyager improvements in noisy images often can be achieved by cleaning up the image after first reading it using the tools provided by BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
For coregistration with head surface points, it is useful to include the whole head in the image, including nose and ears. If surface points on the nose are included with the EEG/MEG data set, these points help to stabilize the fit of head surface points to the surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EEG/MEG Data Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend several (30 or more) digitized head surface points in addition to the fiducials, including points on the nose (nose tip and sides). These points may include electrodes. In the case of electrodes, it is important to measure the distance from the scalp to the digitization point, i.e. the electrode thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI</id>
		<title>Integration with MRI and fMRI</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI"/>
				<updated>2021-05-06T06:49:39Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA MRI&lt;br /&gt;
|version = BESA Research 6.1 or higher&amp;lt;br/&amp;gt;BESA MRI 2.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- = BESA Research Integration with MRI and fMRI = --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Both for developing and evaluating dipole source models of EEG or MEG activity, it is useful to have access to structural MRI or fMRI data.&lt;br /&gt;
&lt;br /&gt;
The BESA MRI software allows to preprocess structural MRI data so that the individual anatomical information contained in the MRI can be utilized in BESA Research. BESA MRI makes it possible ...&lt;br /&gt;
* ... to align the EEG and MEG sensors with the structural MRI data.&lt;br /&gt;
* ... to read and display the aligned, individual Talairach structural MRIs directly in the BESA Research Source Analysis module. In this way, source analysis results can be presented on top of the aligned MRIs, which allows us to evaluate the anatomical regions to which the reconstructed sources may correspond.&lt;br /&gt;
* ... to use an individual, realistically shaped FEM head model for source analysis in BESA Research. FEM head models take into account the individual volume conduction properties of the subject's head derived from the structural MRI data. This allows for more accurate source analysis (Yvert 1997, Lanfer 2012).&lt;br /&gt;
&lt;br /&gt;
To offer an easy integration with fMRI data we have, in collaboration with Rainer Goebel, optimized the interface between BESA Research and BrainVoyagerQX. &lt;br /&gt;
&lt;br /&gt;
With these tools, we can ...&lt;br /&gt;
* ... use fMRI BOLD regions or MRI structures to initialize dipole models.&lt;br /&gt;
* ... visualize dipoles from BESA Research models together with the structural MRI in BrainVoyager in order to evaluate the regions to which the dipoles may correspond.&lt;br /&gt;
* ... combine the localization advantages of (f)MRI with the high temporal resolution of EEG and MEG, for instance by using (f)MRI to place the sources, and the source waveforms of BESA Research to provide feedback about the time course of the source activity.&lt;br /&gt;
* ... overlay source analysis results obtained in BESA Research with fMRI data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' For simpler coregistration, we recommend to use BrainVoyagerQX rather than the older BrainVoyager, but BESA Research will work with both program versions.&lt;br /&gt;
&lt;br /&gt;
The chapters below describe the steps necessary to integrate the MRI and fMRI data with BESA Research. Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([https://www.brainvoyager.com/downloads/downloads.html BrainVoyager - Downloads]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Aligning Coordinate Systems'''&lt;br /&gt;
&lt;br /&gt;
* For a given BESA data set, the electrode and other head surface points need to be aligned to the MRI coordinates.&lt;br /&gt;
* The basic steps necessary to align the EEG electrode locations, the MEG sensors and the MRI are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How Coregistration is done]].&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BESA MRI can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BrainVoyager are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How To set up Coregistration between BESA and BrainVoyager]].&lt;br /&gt;
* In BESA Research, all necessary settings with regard to the alignment are made in the [[Integration_with_MRI_and_fMRI#The_Coregistration_Dialog|Coregistration Dialog]].&lt;br /&gt;
* Requirements with respect to the MRI data for a good coregistration can be found in Section [[#MRI_Requirements_for_Good_Coregistration|MRI Requirements for Good Coregistration]].&lt;br /&gt;
* Requirements with respect to EEG and MEG data for a good coregistration can be found in Section [[#EEG/MEG Data Requirements for Good Coregistration|EEG/MEG Data Requirements for Good Coregistration]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Generating an individual, realistically shaped FEM head model'''&lt;br /&gt;
&lt;br /&gt;
* The generation of a FEM head model that can be used in BESA Research is done in BESA MRI as an additional step following the EEG / MEG to MRI coregistration.&lt;br /&gt;
* Detailed instructions on how to generate the FEM head model can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Co-locating dipoles and MRI locations'''&lt;br /&gt;
&lt;br /&gt;
* After aligning the EEG / MEG and the MRI data it is possible to co-locate dipoles and MRI locations. This means, it is possible to visualize the dipoles and to specify the dipole parameters in the MRI coordinate system.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-locate sources and MRI in the BESA Research Source Module]] describes how in the BESA Research Source Analysis module dipoles can directly be visualized in the space of the individual MRI.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]] describes how to send a source model from BESA Research to BrainVoyager for further inspection.&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]] describes how to insert a dipole at a location defined in the MRI in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
Lanfer, B., I. Paul-Jordanov, M. Scherg, and C. H. Wolters. “Influence of Interior Cerebrospinal Fluid Compartments on EEG Source Analysis.” In Proceedings BMT 2012, Vol. 57. Jena: De Gruyter, 2012. doi:10.1515/bmt-2012-4020.&lt;br /&gt;
&lt;br /&gt;
Yvert, B., O. Bertrand, M. Thévenet, J. F. Echallier, and J. Pernier. “A Systematic Evaluation of the Spherical Model Accuracy in EEG Dipole Localization.” Electroencephalography and Clinical Neurophysiology 102, no. 5 (May 1997): 452–59. doi:16/S0921-884X(97)96611-X.&lt;br /&gt;
&lt;br /&gt;
== How Coregistration is done ==&lt;br /&gt;
&lt;br /&gt;
This section outlines the basic steps to coregister the EEG / MEG data to an individual MRI. These steps are necessary to load an individual MRI into BESA Research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What happens:'''&lt;br /&gt;
&lt;br /&gt;
* EEG / MEG sensor locations and the MRI data are defined in different coordinate systems. Setting up coregistration is the process of aligning the two coordinate systems.&lt;br /&gt;
* BESA Research uses the ''Coregistration Dialog'' to coordinate the alignment procedure.&lt;br /&gt;
* Alignment is done with the ''AC-PC-transformed MRI''.&lt;br /&gt;
* BESA Research displays the ''Talairach-transformed MRI'' in the source analysis module.&lt;br /&gt;
* A coregistration file (with the extension &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.sfh'''&amp;lt;/span&amp;gt;&amp;quot;) is used to mediate between BESA Research and BESA MRI (or BrainVoyagerQX):&lt;br /&gt;
* BESA Research writes the coregistration file which contains the coordinates of head surface points (fiducials, electrodes, other digitized surface points).&lt;br /&gt;
* The coordinates are read into BESA MRI (or BrainVoyager), and aligned with the AC-PC-transformed MRI. The alignment information is then appended to the ''coregistration file''. The names of the AC-PC MRI (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.vmr&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the surface mesh (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.srf&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), and, if available, the Talairach transformation, are also appended.&lt;br /&gt;
* BESA Research reads the coregistration file and appends the name of the Talairach-transformed MRI and head surface. If a brain surface has been created, this is also appended.&lt;br /&gt;
* Subsequently, BESA Research reads the coregistration file automatically when loading the data file.&lt;br /&gt;
* In the BESA Research source module, the individual MRI is displayed instead of the standard MRI. Talairach coordinates of dipoles are the &amp;quot;real&amp;quot; Talairach coordinates as defined, e.g., in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The steps you have to take (once for each data set):'''&lt;br /&gt;
&lt;br /&gt;
* From the BESA Research ''Coregistration Dialog'', write a coregistration file. Switch to BESA MRI (or BrainVoyagerQX).&lt;br /&gt;
* If BESA MRI is used follow the steps in the coregistration quickguide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
* If BrainVoyager is used follow the steps in Section “''How to set up coregistration between BESA and BrainVoyager”.''&lt;br /&gt;
* Back in BESA Research, reload the altered '''coregistration file'''. When using BESA MRI the file names of the generated surface and volume data files will be automatically filled in. When using BrainVoyager file names are only filled in automatically when the files are named according to the file naming conventions. Otherwise, file names have to be set manually.&lt;br /&gt;
* The coregistration file is now associated with the data file in the BESA Research database and will be used automatically the next time the file is opened in BESA Research. If the database entry is cleared, and the data are reloaded, you must make sure the coregistration file is also loaded (either using the ''Coregistration Dialog'' or the ''Channel and digitized head surface point information Dialog'').&lt;br /&gt;
&lt;br /&gt;
==  Alignment of BESA and MRICoordinate Systems  ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration Dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog is opened either from the ''Channel and digitized head surface point information'' (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) ''dialog ''by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit/Coreg'''&amp;lt;/span&amp;gt; button, or from the main menu (&amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File/MRI&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Coregistration...'''&amp;lt;/span&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the coregistration dialog is invoked from an EEG data set in which no digitized electrode coordinates are available (i.e. standard electrode positions located on a sphere are assumed), BESA Research presents a warning message, saying that for MRI coregistration realistic electrode coordinates produce better results. BESA Research has a list of such realistic standard coordinates (i.e. located on a pre-defined standard head surface) for various electrodes available in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;, which is located in the Standard Electrode folder. If all electrodes in the dataset are listed in this file, a dialog window suggests to apply this file to the current data set, i.e. to switch from standard sphere coordinates to the standard realistic electrode coordinates in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;. If the suggestion is accepted, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; is assigned to the dataset (see Channel and digitized head surface point information (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) dialog).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Dialog:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (1).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Select MRI prog'''&amp;lt;/span&amp;gt; button to select your preferred MRI program. The current choice is between ''BESA MRI.exe'' and ''BrainVoyagerQX.exe''. The path to the MRI program is saved (in ''System\BESA.set'') and will be remembered by BESA Research. The top right hand button (now showing '''BESA MRI''') shows the current selection.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BESA MRI'''&amp;lt;/span&amp;gt; button to start the process of aligning the BESA Research and MRI coordinate systems. If no coregistration (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) file is defined in the dialog (empty ''Surface coregistration file edit box''), BESA Research will first prompt for a file name. We recommend saving this file to the folder where the MRIs are kept. The MRI program will then be started. When you return to the ''Coregistration Dialog'', BESA Research checks if the ''Coregistration File'' has changed. If so, the dialog is updated with the new information.&lt;br /&gt;
* Press the top &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse... '''&amp;lt;/span&amp;gt;button to select a preexisting ''Coregistration File''.&lt;br /&gt;
* The entries in the edit boxes below show the files that will be used in the BESA Research Source Analysis module when the individual MRI is loaded. When using BESA MRI the file names will be automatically filled in. If you are using BrainVoagerQX and you are following our (and the BrainVoyagerQX) recommended naming conventions for files, and the files exist, then the names will be filled in automatically after you have completed the alignment procedure in BrainVoyagerQX. Otherwise you may have to browse for the files.&lt;br /&gt;
* Below the edit boxes the FEM field states whether all necessary information for the individual FEM head model were found in the coregistration file. If the field says ''Individual FEM for EEG'' ''defined!'' then all necessary data was found and the individual FEM EEG head model can be used in the BESA Research Source Analysis module. A similar message indicates whether the FEM MEG head model is available.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note that the MRI and the surfaces are Talairach-transformed! Alignment between BESA Research and the individual MRI is done with the MRI transformed to the AC-PC coordinate system, but the BESA Research Source Analysis module uses the Talairach-transformed image data and surfaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Coregistration Using BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
It is assumed that you know how to load an MRI as a 3D data set into BrainVoyagerQX, and how to clean the image so that regions outside the head are black. We also assume knowledge of how to create AC-PC-aligned and Talairach-transformed MRIs.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* BESA Research. Start the ''Coregistration Dialog''. Export the Coregistration File (head surface points) from your data by pressing the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; '''BrainVoyagerQX'''&amp;lt;/span&amp;gt; button in the dialog. Save the file to the directory where your MRI is located. BrainVoyagerQX is started.&lt;br /&gt;
* BrainVoyagerQX. Load the MRI corresponding to the EEG/MEG data. For optimal performance, the MRI should be cleaned so that regions outside the head are black. Prepare an AC-PC-transformed MRI and a Talairach MRI. For each, generate a surface mesh. Save these files following our recommended naming conventions (see chapter “[[Integration_with_MRI_and_fMRI#MRI_file_Name_Conventions|MRI File Name Conventions]]”). Save the Talairach coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If these steps have already been performed, load the ACPC MRI and load the ACPC mesh. If you want to generate a brain surface mesh, see chapter “[[Integration_with_MRI_and_fMRI#How_to_Generate_a_Brain_Surface_Mesh|How to Generate a Brain Surface Mesh]]”.&lt;br /&gt;
* BrainVoyagerQX. Load the Coregistration File (''EEG-MEG BESA/Load Surface Points''). The points will be displayed, but they are not aligned to the head:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (2).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Define fiducial points on the head surface. Right click on the 3D head display and select the ''Fiducials Dialog'' in the drop-down menu:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (3).gif ‎]]  [[Image:MRI Integration (4).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Rotate the head (by holding the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Shift '''&amp;lt;/span&amp;gt;button down and clicking and dragging with the mouse) so that the Nasion is clearly visible. Move the mouse to the Nasion, and press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl+Left Click'''&amp;lt;/span&amp;gt;. The coordinates of the Nasion are inserted into the dialog. Repeat for the left preauricular point, and then for the right preauricular point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (5).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: if you have defined your fiducials differently in your BESA Research data (e.g. ear holes), click on the corresponding points in the MRI. If you have additional head surface points (step 8), accuracy in pinpointing the fiducials is not critical.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. In the Fiducials Dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Fit fiducials'''&amp;lt;/span&amp;gt; button. The head surface points are now more or less aligned to the head.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (6).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Now select '''''EEG-MEG BESA/Fit Surface Points...'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (7).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not see the right half of the dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Advanced &amp;gt;&amp;gt;'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Specify the distances of the digitization points from the skin. In the illustration above, the digitization points for electrodes are estimated to be 8 mm from the surface of the head. For the purpose of accurate alignment, the distance of digitization points from skin section of the dialog needs to be filled in correctly. We recommend that &amp;quot;Restrain solution around fiducials&amp;quot; is checked, and a reasonable limit (here 3 mm) of the restraint is defined. Then press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (8).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BrainVoyager fits the points to the head, stretching x, y, and z coordinates to obtain a better fit than before.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: The fit performed during this step accounts for scaling inequalities between the x, y, and z axes in the MRI. Coregistration gains in accuracy over the use of fiducials alone a) because more head surface points are used, and b) because the scaling inequalities are accounted for.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alignment is now completed. If you only want to display the structural MRI in the BESA Source Module, you can return to the BESA Coregistration Dialog.&lt;br /&gt;
* BESA Research. When you switch back to the Coregistration Dialog, BESA Research will try to fill in the names of the Talairach MRI and surface meshes. If the names are not filled in, use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse...'''&amp;lt;/span&amp;gt; buttons to select the MRI and surface meshes. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to save the Coregistration File. Alignment is completed!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The alignment steps need only be performed once for a given MRI and EEG/MEG data set. Otherwise, after starting BrainVoyager, just load the MRI, the surface mesh, and the surface points (see “[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done |How to Set Up Coregistration with BrainVoyager after Alignment has been Done]]”). Now the following actions are possible: see chapters&lt;br /&gt;
&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-Locate Sources and MRI in the BESA Research Source Module]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]&lt;br /&gt;
&lt;br /&gt;
=== MRI file Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
If you follow the naming conventions for file names as described here, BESA Research detects the file names it requires, and the ''Coregistration Dialog'' is filled in automatically.&lt;br /&gt;
&lt;br /&gt;
Please note that BESA MRI automatically uses these naming conventions for the generated files.&lt;br /&gt;
&lt;br /&gt;
* '''The AC-PC MRI file name''' should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.srf'''&amp;lt;/span&amp;gt;&amp;quot;. After alignment, BrainVoyagerQX writes these names to the Coregistration File.&lt;br /&gt;
* '''The Talairach MRI file name '''should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If defined, the brain surface mesh should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot; ('''WM''' = '''w'''hite '''m'''atter).&lt;br /&gt;
* '''How BESA Research finds the Talairach files.''' When BESA Research rereads the Coregistration File after alignment of the coordinate systems, it finds the ACPC file names and defines the corresponding TAL file names. If these files exist, the names are entered into the Coregistration Dialog. For instance, if the Coregistration File contains the name &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for the files &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;, and &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If these files exist, they are entered into the dialog.&lt;br /&gt;
* '''Older BrainVoyager version.''' If you use BrainVoyager.exe to align coordinate systems, the file names are not saved with the Coregistration File. In this case, browse for the Talairach or the ACPC MRI from the Coregistration Dialog. BESA Research will use the rules as described above to insert the correct file names into the dialog.&lt;br /&gt;
* '''Missing Talairach coordinates.''' If, after aligning coordinate systems, the Talairach coordinates are missing from the Coregistration File (you forgot to load the Talairach coordinates in BrainVoyagerQX, or you used BrainVoyager.exe), BESA Research will look for a file ending with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot;, and read the coordinates from this file. You can also browse for a &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file in the Coregistration Dialog. For instance, if the MRI file is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MR_'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot; to find the Talairach coordinates.&lt;br /&gt;
* '''File names in the Coregistration File are saved relative to the Coregistration File location, if they are in the same folder.''' If the MRIs are in the same folder as the Coregistration File they will be recorded as &amp;quot;.\filename&amp;quot; (e.g. &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.\MRI PB_tal.vmr'''&amp;lt;/span&amp;gt;&amp;quot;). This means that you can copy the Coregistration File together with the MRIs and meshes to a different folder, and BESA Research will be able to locate the files when the Coregistration File is opened. If the MRIs are saved in a different folder from the Coregistration File, the absolute paths are saved in the file. If the files are moved to new locations, you will have to restart the Coregistration Dialog and redefine the file locations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to Generate a Brain Surface Mesh ===&lt;br /&gt;
&lt;br /&gt;
BESA Research is able to compute surface images, such as (Cortical LORETA, Cortical CLARA, Minimum Norm) using an individual cortex surface as the source space. A suitable cortex surface for this purpose can be effortlessly created using BESA MRI. Alternatively, BrainVoyager can be used for the creation of the brain surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA MRI'''&lt;br /&gt;
* The brain surface generation is performed as one work step of the BESA MRI segmentation workflow.&lt;br /&gt;
* The cortex surface reconstruction is done using a robust and accurate automatic segmentation procedure.&lt;br /&gt;
* Details on how to generate the brain surface mesh in BESA MRI can be found in the coregistration quickguide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BrainVoyager'''&lt;br /&gt;
* BrainVoyagerQX provides a semiautomatic procedure to generate meshes for the brain surface of the Talairach MRI. Please refer to the BrainVoyager Help to find out how to do this.&lt;br /&gt;
* The result of the BrainVoyager procedure is two meshes, one for the left and one for the right hemisphere.&lt;br /&gt;
* BESA Research requires a single mesh. Therefore, load first one mesh (''Meshes/Load Mesh..''.), and append the other mesh (''Meshes/Add Mesh...''). Merge these two meshes (''Meshes/Merge'' ''meshes in surface window'') and then save the result (''Meshes/Save Mesh...''). If possible, use the recommended name conventions for the resulting file (file name ends in &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf&amp;quot;). '''&amp;lt;/span&amp;gt;For instance, if the Talairach MRI is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, name the brain surface mesh &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;.&lt;br /&gt;
* See also the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website (http://brainvoyager.com/Downloads.html).&lt;br /&gt;
&lt;br /&gt;
==  Co-locating Dipoles and MRI Locations ==&lt;br /&gt;
&lt;br /&gt;
=== Co-locating Sources and MRI in the BESA Research Source Module ===&lt;br /&gt;
&lt;br /&gt;
If the alignment procedure using BESA MRI (or BrainVoyager) has been completed then you can load the individual structural MRI in the Source Module by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''A''''&amp;lt;/span&amp;gt; or using a mouse right click and selecting '''''Display MRI'''''.&lt;br /&gt;
&lt;br /&gt;
Sources in the current model are then overlayed onto the individual MRI.&lt;br /&gt;
&lt;br /&gt;
A double-click at any location in the MRI will define a new source at the corresponding location in the BESA Research head model.&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (9).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
=== Coregistration with BrainVoyager after Alignment has been Done ===&lt;br /&gt;
&lt;br /&gt;
Alignment between BESA Research and BrainVoyager is only required once for a given BESA Research data set and the corresponding MRI. At a later time, if you want to Co-locate sources between BESA Research and BrainVoyager, perform the following steps in BrainVoyager:&lt;br /&gt;
* Load the MRI.&lt;br /&gt;
* Load the head surface mesh (''Meshes/Load Mesh..''.).&lt;br /&gt;
* Load the Coregistration File (''EEG-MEG BESA/Load Surface Points..''.).&lt;br /&gt;
&lt;br /&gt;
BrainVoyager is now ready for Co-location.&lt;br /&gt;
&lt;br /&gt;
=== Send a Dipole from BESA Research to BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
First, start BrainVoyager(QX). This can be done from the BESA Research Source Module by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager '''&amp;lt;/span&amp;gt;button. Note that in the Source Module, the ''Options / Preferences / BrainVoyager'' tab allows to define the path to BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
In BrainVoyager, [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|set up coregistration]].&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, highlight the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
Program control will automatically switch to BrainVoyager. The head will be cut at the section corresponding to the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (10).gif‎|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that all dipoles in the current model are sent to BrainVoyager. The highlighted dipole (here, the red dipole) determines the plane at which the head will be cut.&lt;br /&gt;
&lt;br /&gt;
Note that the dipoles are visible in both the surface module and in the 2D view:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (11).gif|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Define a Dipole in BESA Research at a Location Defined in the MRI ===&lt;br /&gt;
&lt;br /&gt;
First set up coregistration (see chapter ''“[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|Coregistration with BrainVoyager after Alignment has been Done]]”'').&lt;br /&gt;
&lt;br /&gt;
In the BrainVoyager 2D MRI view, place the mouse over the point at which you would like to define a dipole. Right click at this point. If this point lies within an fRMI cluster, BrainVoyager will automatically determine its center and use it as a seeding point instead. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send Seed Point To BESA....'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (12).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
The following Dialog is opened:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (13).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send to BESA'''&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BESA Source Analysis window appears. The new dipole or regional source (depending on the setting in the ‘Options’ dialog in the Source Analysis window is now displayed at the corresponding location. If a dipole is seeded, BESA automatically fits its orientation. For further adjustment of the model, you may need to refit the orientation, e.g. at a certain time range, or in the presence of other sources.&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([http://brainvoyager.com/Downloads.html http://brainvoyager.com/Downloads.html]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration File (*.sfh) ===&lt;br /&gt;
&lt;br /&gt;
This file is used to mediate between BESA Research and BESA MRI (or BrainVoyager(QX)). When it is first written by BESA Research, it contains a list of the digitized head surface points (fiducials, electrodes, other digitized points), e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
NrOfPoints: 68&lt;br /&gt;
 Fid_Nz                    0.00000     103.10000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T9                  -78.40000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T10                  73.00000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Ele_E1                  -28.70000      23.90000     122.30000   3 255    0    0&lt;br /&gt;
 Ele_E2                  -80.40000      19.80000      75.90000   3 255    0    0&lt;br /&gt;
 Ele_E3                  -84.00000      37.90000       9.00000   3 255    0    0&lt;br /&gt;
 Ele_E4                  -17.60000      92.90000      89.10000   3 255    0    0&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
 Ele_E63                  -6.80000    -104.00000      54.40000   3 255    0    0&lt;br /&gt;
 Ele_E64                 -42.80000     -46.90000     115.60000   3 255    0    0&lt;br /&gt;
 Ele_Cz'                  -2.10000       2.20000     131.10000   3 255    0    0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line contains a label, the coordinates in the Head Coordinate system, and parameters specifying the size and color of the sensor or head surface point as displayed in BESA MRI (or BrainVoyager).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After aligning the coordinate systems, BESA MRI (or BrainVoyagerQX) appends lines defining the transformation between the BESA Research and the MRI coordinate systems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Trans-data(in BV-coords): 3 translation, 3 rotation (in grad), 3 scale&lt;br /&gt;
37.435 15.811 2.820 0.025 1.938 8.779  1.009 0.973 0.977&lt;br /&gt;
Fiducials:&lt;br /&gt;
41.7873  148.0180  128.0844&lt;br /&gt;
154.7772  169.4783  204.1080&lt;br /&gt;
147.0154  168.9746  54.1266&lt;br /&gt;
Midpoint (in BV-coords):&lt;br /&gt;
128.0000  128.0000  128.0000&lt;br /&gt;
Volume:  C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.vmr&lt;br /&gt;
Surface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.srf&lt;br /&gt;
AC: 128 128 128&lt;br /&gt;
PC: 154 128 128&lt;br /&gt;
AP: 58 128 128&lt;br /&gt;
PP: 241 129 130&lt;br /&gt;
SP: 154 50 128&lt;br /&gt;
IP: 128 172 128&lt;br /&gt;
RP: 128 128 60&lt;br /&gt;
LP: 165 128 198&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Older versions of BrainVoyager.exe do not append the lines starting with &amp;quot;Volume&amp;quot;. In addition, the Talairach coordinates (starting at &amp;quot;AC: ...&amp;quot;) are not appended if they were not loaded in BrainVoyagerQX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, when the Coregistration Dialog in BESA Research has found the Talairach MRI and surface meshes, and you press the OK button, BESA Research appends the additional file names:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TalVolume: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.vmr&lt;br /&gt;
TalSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.srf&lt;br /&gt;
TalBrainSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal_wm.srf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA MRI already inserts the correct file names into the coregistration file when doing the coregistration. When also an EEG or MEG  FEM head model is generated then additional lines are appended to the coregistration file containing the file names of the generated FEM data files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MRI Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend a high quality T1-weighted anatomical image with 1 mm³ voxels (e.g. 256 x 256 saggital scan with 1 mm spacing).&lt;br /&gt;
&lt;br /&gt;
In order to define the surface mesh, a clear contrast between the head surface and the outside of the head (T1-weighting) is required. Noise and measurement artifacts can influence the representation of the scalp surface. When doing the coregistration in BrainVoyager improvements in noisy images often can be achieved by cleaning up the image after first reading it using the tools provided by BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
For coregistration with head surface points, it is useful to include the whole head in the image, including nose and ears. If surface points on the nose are included with the EEG/MEG data set, these points help to stabilize the fit of head surface points to the surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EEG/MEG Data Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend several (30 or more) digitized head surface points in addition to the fiducials, including points on the nose (nose tip and sides). These points may include electrodes. In the case of electrodes, it is important to measure the distance from the scalp to the digitization point, i.e. the electrode thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI</id>
		<title>Integration with MRI and fMRI</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI"/>
				<updated>2021-05-06T06:45:09Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA MRI&lt;br /&gt;
|version = BESA Research 6.1 or higher&amp;lt;br/&amp;gt;BESA MRI 2.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- = BESA Research Integration with MRI and fMRI = --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Both for developing and evaluating dipole source models of EEG or MEG activity, it is useful to have access to structural MRI or fMRI data.&lt;br /&gt;
&lt;br /&gt;
The BESA MRI software allows to preprocess structural MRI data so that the individual anatomical information contained in the MRI can be utilized in BESA Research. BESA MRI makes it possible ...&lt;br /&gt;
* ... to align the EEG and MEG sensors with the structural MRI data.&lt;br /&gt;
* ... to read and display the aligned, individual Talairach structural MRIs directly in the BESA Research Source Analysis module. In this way, source analysis results can be presented on top of the aligned MRIs, which allows us to evaluate the anatomical regions to which the reconstructed sources may correspond.&lt;br /&gt;
* ... to use an individual, realistically shaped FEM head model for source analysis in BESA Research. FEM head models take into account the individual volume conduction properties of the subject's head derived from the structural MRI data. This allows for more accurate source analysis (Yvert 1997, Lanfer 2012).&lt;br /&gt;
&lt;br /&gt;
To offer an easy integration with fMRI data we have, in collaboration with Rainer Goebel, optimized the interface between BESA Research and BrainVoyagerQX. &lt;br /&gt;
&lt;br /&gt;
With these tools, we can ...&lt;br /&gt;
* ... use fMRI BOLD regions or MRI structures to initialize dipole models.&lt;br /&gt;
* ... visualize dipoles from BESA Research models together with the structural MRI in BrainVoyager in order to evaluate the regions to which the dipoles may correspond.&lt;br /&gt;
* ... combine the localization advantages of (f)MRI with the high temporal resolution of EEG and MEG, for instance by using (f)MRI to place the sources, and the source waveforms of BESA Research to provide feedback about the time course of the source activity.&lt;br /&gt;
* ... overlay source analysis results obtained in BESA Research with fMRI data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' For simpler coregistration, we recommend to use BrainVoyagerQX rather than the older BrainVoyager, but BESA Research will work with both program versions.&lt;br /&gt;
&lt;br /&gt;
The chapters below describe the steps necessary to integrate the MRI and fMRI data with BESA Research. Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([https://www.brainvoyager.com/downloads/downloads.html BrainVoyager - Downloads]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Aligning Coordinate Systems'''&lt;br /&gt;
&lt;br /&gt;
* For a given BESA data set, the electrode and other head surface points need to be aligned to the MRI coordinates.&lt;br /&gt;
* The basic steps necessary to align the EEG electrode locations, the MEG sensors and the MRI are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How Coregistration is done]].&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BESA MRI can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BrainVoyager are described in Section [[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How To set up Coregistration between BESA and BrainVoyager]].&lt;br /&gt;
* In BESA Research, all necessary settings with regard to the alignment are made in the [[Integration_with_MRI_and_fMRI#The_Coregistration_Dialog|Coregistration Dialog]].&lt;br /&gt;
* Requirements with respect to the MRI data for a good coregistration can be found in Section “''MRI Requirements for Good Coregistration”.''&lt;br /&gt;
* Requirements with respect to EEG and MEG data for a good coregistration can be found in Section “''EEG/MEG Data Requirements for Good Coregistration”.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Generating an individual, realistically shaped FEM head model'''&lt;br /&gt;
&lt;br /&gt;
* The generation of a FEM head model that can be used in BESA Research is done in BESA MRI as an additional step following the EEG / MEG to MRI coregistration.&lt;br /&gt;
* Detailed instructions on how to generate the FEM head model can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Co-locating dipoles and MRI locations'''&lt;br /&gt;
&lt;br /&gt;
* After aligning the EEG / MEG and the MRI data it is possible to co-locate dipoles and MRI locations. This means, it is possible to visualize the dipoles and to specify the dipole parameters in the MRI coordinate system.&lt;br /&gt;
* “[[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-locate sources and MRI in the BESA Research Source Module]]&amp;quot; describes how in the BESA Research Source Analysis module dipoles can directly be visualized in the space of the individual MRI.&lt;br /&gt;
* “[[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]” describes how to send a source model from BESA Research to BrainVoyager for further inspection.&lt;br /&gt;
* “[[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]” describes how to insert a dipole at a location defined in the MRI in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
Lanfer, B., I. Paul-Jordanov, M. Scherg, and C. H. Wolters. “Influence of Interior Cerebrospinal Fluid Compartments on EEG Source Analysis.” In Proceedings BMT 2012, Vol. 57. Jena: De Gruyter, 2012. doi:10.1515/bmt-2012-4020.&lt;br /&gt;
&lt;br /&gt;
Yvert, B., O. Bertrand, M. Thévenet, J. F. Echallier, and J. Pernier. “A Systematic Evaluation of the Spherical Model Accuracy in EEG Dipole Localization.” Electroencephalography and Clinical Neurophysiology 102, no. 5 (May 1997): 452–59. doi:16/S0921-884X(97)96611-X.&lt;br /&gt;
&lt;br /&gt;
== How Coregistration is done ==&lt;br /&gt;
&lt;br /&gt;
This section outlines the basic steps to coregister the EEG / MEG data to an individual MRI. These steps are necessary to load an individual MRI into BESA Research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What happens:'''&lt;br /&gt;
&lt;br /&gt;
* EEG / MEG sensor locations and the MRI data are defined in different coordinate systems. Setting up coregistration is the process of aligning the two coordinate systems.&lt;br /&gt;
* BESA Research uses the ''Coregistration Dialog'' to coordinate the alignment procedure.&lt;br /&gt;
* Alignment is done with the ''AC-PC-transformed MRI''.&lt;br /&gt;
* BESA Research displays the ''Talairach-transformed MRI'' in the source analysis module.&lt;br /&gt;
* A coregistration file (with the extension &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.sfh'''&amp;lt;/span&amp;gt;&amp;quot;) is used to mediate between BESA Research and BESA MRI (or BrainVoyagerQX):&lt;br /&gt;
* BESA Research writes the coregistration file which contains the coordinates of head surface points (fiducials, electrodes, other digitized surface points).&lt;br /&gt;
* The coordinates are read into BESA MRI (or BrainVoyager), and aligned with the AC-PC-transformed MRI. The alignment information is then appended to the ''coregistration file''. The names of the AC-PC MRI (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.vmr&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the surface mesh (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.srf&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), and, if available, the Talairach transformation, are also appended.&lt;br /&gt;
* BESA Research reads the coregistration file and appends the name of the Talairach-transformed MRI and head surface. If a brain surface has been created, this is also appended.&lt;br /&gt;
* Subsequently, BESA Research reads the coregistration file automatically when loading the data file.&lt;br /&gt;
* In the BESA Research source module, the individual MRI is displayed instead of the standard MRI. Talairach coordinates of dipoles are the &amp;quot;real&amp;quot; Talairach coordinates as defined, e.g., in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The steps you have to take (once for each data set):'''&lt;br /&gt;
&lt;br /&gt;
* From the BESA Research ''Coregistration Dialog'', write a coregistration file. Switch to BESA MRI (or BrainVoyagerQX).&lt;br /&gt;
* If BESA MRI is used follow the steps in the coregistration quickguide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
* If BrainVoyager is used follow the steps in Section “''How to set up coregistration between BESA and BrainVoyager”.''&lt;br /&gt;
* Back in BESA Research, reload the altered '''coregistration file'''. When using BESA MRI the file names of the generated surface and volume data files will be automatically filled in. When using BrainVoyager file names are only filled in automatically when the files are named according to the file naming conventions. Otherwise, file names have to be set manually.&lt;br /&gt;
* The coregistration file is now associated with the data file in the BESA Research database and will be used automatically the next time the file is opened in BESA Research. If the database entry is cleared, and the data are reloaded, you must make sure the coregistration file is also loaded (either using the ''Coregistration Dialog'' or the ''Channel and digitized head surface point information Dialog'').&lt;br /&gt;
&lt;br /&gt;
==  Alignment of BESA and MRICoordinate Systems  ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration Dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog is opened either from the ''Channel and digitized head surface point information'' (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) ''dialog ''by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit/Coreg'''&amp;lt;/span&amp;gt; button, or from the main menu (&amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File/MRI&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Coregistration...'''&amp;lt;/span&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the coregistration dialog is invoked from an EEG data set in which no digitized electrode coordinates are available (i.e. standard electrode positions located on a sphere are assumed), BESA Research presents a warning message, saying that for MRI coregistration realistic electrode coordinates produce better results. BESA Research has a list of such realistic standard coordinates (i.e. located on a pre-defined standard head surface) for various electrodes available in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;, which is located in the Standard Electrode folder. If all electrodes in the dataset are listed in this file, a dialog window suggests to apply this file to the current data set, i.e. to switch from standard sphere coordinates to the standard realistic electrode coordinates in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;. If the suggestion is accepted, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; is assigned to the dataset (see Channel and digitized head surface point information (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) dialog).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Dialog:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (1).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Select MRI prog'''&amp;lt;/span&amp;gt; button to select your preferred MRI program. The current choice is between ''BESA MRI.exe'' and ''BrainVoyagerQX.exe''. The path to the MRI program is saved (in ''System\BESA.set'') and will be remembered by BESA Research. The top right hand button (now showing '''BESA MRI''') shows the current selection.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BESA MRI'''&amp;lt;/span&amp;gt; button to start the process of aligning the BESA Research and MRI coordinate systems. If no coregistration (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) file is defined in the dialog (empty ''Surface coregistration file edit box''), BESA Research will first prompt for a file name. We recommend saving this file to the folder where the MRIs are kept. The MRI program will then be started. When you return to the ''Coregistration Dialog'', BESA Research checks if the ''Coregistration File'' has changed. If so, the dialog is updated with the new information.&lt;br /&gt;
* Press the top &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse... '''&amp;lt;/span&amp;gt;button to select a preexisting ''Coregistration File''.&lt;br /&gt;
* The entries in the edit boxes below show the files that will be used in the BESA Research Source Analysis module when the individual MRI is loaded. When using BESA MRI the file names will be automatically filled in. If you are using BrainVoagerQX and you are following our (and the BrainVoyagerQX) recommended naming conventions for files, and the files exist, then the names will be filled in automatically after you have completed the alignment procedure in BrainVoyagerQX. Otherwise you may have to browse for the files.&lt;br /&gt;
* Below the edit boxes the FEM field states whether all necessary information for the individual FEM head model were found in the coregistration file. If the field says ''Individual FEM for EEG'' ''defined!'' then all necessary data was found and the individual FEM EEG head model can be used in the BESA Research Source Analysis module. A similar message indicates whether the FEM MEG head model is available.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note that the MRI and the surfaces are Talairach-transformed! Alignment between BESA Research and the individual MRI is done with the MRI transformed to the AC-PC coordinate system, but the BESA Research Source Analysis module uses the Talairach-transformed image data and surfaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Coregistration Using BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
It is assumed that you know how to load an MRI as a 3D data set into BrainVoyagerQX, and how to clean the image so that regions outside the head are black. We also assume knowledge of how to create AC-PC-aligned and Talairach-transformed MRIs.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* BESA Research. Start the ''Coregistration Dialog''. Export the Coregistration File (head surface points) from your data by pressing the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; '''BrainVoyagerQX'''&amp;lt;/span&amp;gt; button in the dialog. Save the file to the directory where your MRI is located. BrainVoyagerQX is started.&lt;br /&gt;
* BrainVoyagerQX. Load the MRI corresponding to the EEG/MEG data. For optimal performance, the MRI should be cleaned so that regions outside the head are black. Prepare an AC-PC-transformed MRI and a Talairach MRI. For each, generate a surface mesh. Save these files following our recommended naming conventions (see chapter “[[Integration_with_MRI_and_fMRI#MRI_file_Name_Conventions|MRI File Name Conventions]]”). Save the Talairach coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If these steps have already been performed, load the ACPC MRI and load the ACPC mesh. If you want to generate a brain surface mesh, see chapter “[[Integration_with_MRI_and_fMRI#How_to_Generate_a_Brain_Surface_Mesh|How to Generate a Brain Surface Mesh]]”.&lt;br /&gt;
* BrainVoyagerQX. Load the Coregistration File (''EEG-MEG BESA/Load Surface Points''). The points will be displayed, but they are not aligned to the head:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (2).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Define fiducial points on the head surface. Right click on the 3D head display and select the ''Fiducials Dialog'' in the drop-down menu:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (3).gif ‎]]  [[Image:MRI Integration (4).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Rotate the head (by holding the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Shift '''&amp;lt;/span&amp;gt;button down and clicking and dragging with the mouse) so that the Nasion is clearly visible. Move the mouse to the Nasion, and press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl+Left Click'''&amp;lt;/span&amp;gt;. The coordinates of the Nasion are inserted into the dialog. Repeat for the left preauricular point, and then for the right preauricular point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (5).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: if you have defined your fiducials differently in your BESA Research data (e.g. ear holes), click on the corresponding points in the MRI. If you have additional head surface points (step 8), accuracy in pinpointing the fiducials is not critical.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. In the Fiducials Dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Fit fiducials'''&amp;lt;/span&amp;gt; button. The head surface points are now more or less aligned to the head.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (6).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Now select '''''EEG-MEG BESA/Fit Surface Points...'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (7).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not see the right half of the dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Advanced &amp;gt;&amp;gt;'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Specify the distances of the digitization points from the skin. In the illustration above, the digitization points for electrodes are estimated to be 8 mm from the surface of the head. For the purpose of accurate alignment, the distance of digitization points from skin section of the dialog needs to be filled in correctly. We recommend that &amp;quot;Restrain solution around fiducials&amp;quot; is checked, and a reasonable limit (here 3 mm) of the restraint is defined. Then press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (8).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BrainVoyager fits the points to the head, stretching x, y, and z coordinates to obtain a better fit than before.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: The fit performed during this step accounts for scaling inequalities between the x, y, and z axes in the MRI. Coregistration gains in accuracy over the use of fiducials alone a) because more head surface points are used, and b) because the scaling inequalities are accounted for.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alignment is now completed. If you only want to display the structural MRI in the BESA Source Module, you can return to the BESA Coregistration Dialog.&lt;br /&gt;
* BESA Research. When you switch back to the Coregistration Dialog, BESA Research will try to fill in the names of the Talairach MRI and surface meshes. If the names are not filled in, use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse...'''&amp;lt;/span&amp;gt; buttons to select the MRI and surface meshes. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to save the Coregistration File. Alignment is completed!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The alignment steps need only be performed once for a given MRI and EEG/MEG data set. Otherwise, after starting BrainVoyager, just load the MRI, the surface mesh, and the surface points (see “[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done |How to Set Up Coregistration with BrainVoyager after Alignment has been Done]]”). Now the following actions are possible: see chapters&lt;br /&gt;
&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-Locate Sources and MRI in the BESA Research Source Module]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]&lt;br /&gt;
&lt;br /&gt;
=== MRI file Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
If you follow the naming conventions for file names as described here, BESA Research detects the file names it requires, and the ''Coregistration Dialog'' is filled in automatically.&lt;br /&gt;
&lt;br /&gt;
Please note that BESA MRI automatically uses these naming conventions for the generated files.&lt;br /&gt;
&lt;br /&gt;
* '''The AC-PC MRI file name''' should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.srf'''&amp;lt;/span&amp;gt;&amp;quot;. After alignment, BrainVoyagerQX writes these names to the Coregistration File.&lt;br /&gt;
* '''The Talairach MRI file name '''should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If defined, the brain surface mesh should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot; ('''WM''' = '''w'''hite '''m'''atter).&lt;br /&gt;
* '''How BESA Research finds the Talairach files.''' When BESA Research rereads the Coregistration File after alignment of the coordinate systems, it finds the ACPC file names and defines the corresponding TAL file names. If these files exist, the names are entered into the Coregistration Dialog. For instance, if the Coregistration File contains the name &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for the files &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;, and &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If these files exist, they are entered into the dialog.&lt;br /&gt;
* '''Older BrainVoyager version.''' If you use BrainVoyager.exe to align coordinate systems, the file names are not saved with the Coregistration File. In this case, browse for the Talairach or the ACPC MRI from the Coregistration Dialog. BESA Research will use the rules as described above to insert the correct file names into the dialog.&lt;br /&gt;
* '''Missing Talairach coordinates.''' If, after aligning coordinate systems, the Talairach coordinates are missing from the Coregistration File (you forgot to load the Talairach coordinates in BrainVoyagerQX, or you used BrainVoyager.exe), BESA Research will look for a file ending with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot;, and read the coordinates from this file. You can also browse for a &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file in the Coregistration Dialog. For instance, if the MRI file is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MR_'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot; to find the Talairach coordinates.&lt;br /&gt;
* '''File names in the Coregistration File are saved relative to the Coregistration File location, if they are in the same folder.''' If the MRIs are in the same folder as the Coregistration File they will be recorded as &amp;quot;.\filename&amp;quot; (e.g. &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.\MRI PB_tal.vmr'''&amp;lt;/span&amp;gt;&amp;quot;). This means that you can copy the Coregistration File together with the MRIs and meshes to a different folder, and BESA Research will be able to locate the files when the Coregistration File is opened. If the MRIs are saved in a different folder from the Coregistration File, the absolute paths are saved in the file. If the files are moved to new locations, you will have to restart the Coregistration Dialog and redefine the file locations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to Generate a Brain Surface Mesh ===&lt;br /&gt;
&lt;br /&gt;
BESA Research is able to compute surface images, such as (Cortical LORETA, Cortical CLARA, Minimum Norm) using an individual cortex surface as the source space. A suitable cortex surface for this purpose can be effortlessly created using BESA MRI. Alternatively, BrainVoyager can be used for the creation of the brain surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA MRI'''&lt;br /&gt;
* The brain surface generation is performed as one work step of the BESA MRI segmentation workflow.&lt;br /&gt;
* The cortex surface reconstruction is done using a robust and accurate automatic segmentation procedure.&lt;br /&gt;
* Details on how to generate the brain surface mesh in BESA MRI can be found in the coregistration quickguide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BrainVoyager'''&lt;br /&gt;
* BrainVoyagerQX provides a semiautomatic procedure to generate meshes for the brain surface of the Talairach MRI. Please refer to the BrainVoyager Help to find out how to do this.&lt;br /&gt;
* The result of the BrainVoyager procedure is two meshes, one for the left and one for the right hemisphere.&lt;br /&gt;
* BESA Research requires a single mesh. Therefore, load first one mesh (''Meshes/Load Mesh..''.), and append the other mesh (''Meshes/Add Mesh...''). Merge these two meshes (''Meshes/Merge'' ''meshes in surface window'') and then save the result (''Meshes/Save Mesh...''). If possible, use the recommended name conventions for the resulting file (file name ends in &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf&amp;quot;). '''&amp;lt;/span&amp;gt;For instance, if the Talairach MRI is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, name the brain surface mesh &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;.&lt;br /&gt;
* See also the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website (http://brainvoyager.com/Downloads.html).&lt;br /&gt;
&lt;br /&gt;
==  Co-locating Dipoles and MRI Locations ==&lt;br /&gt;
&lt;br /&gt;
=== Co-locating Sources and MRI in the BESA Research Source Module ===&lt;br /&gt;
&lt;br /&gt;
If the alignment procedure using BESA MRI (or BrainVoyager) has been completed then you can load the individual structural MRI in the Source Module by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''A''''&amp;lt;/span&amp;gt; or using a mouse right click and selecting '''''Display MRI'''''.&lt;br /&gt;
&lt;br /&gt;
Sources in the current model are then overlayed onto the individual MRI.&lt;br /&gt;
&lt;br /&gt;
A double-click at any location in the MRI will define a new source at the corresponding location in the BESA Research head model.&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (9).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
=== Coregistration with BrainVoyager after Alignment has been Done ===&lt;br /&gt;
&lt;br /&gt;
Alignment between BESA Research and BrainVoyager is only required once for a given BESA Research data set and the corresponding MRI. At a later time, if you want to Co-locate sources between BESA Research and BrainVoyager, perform the following steps in BrainVoyager:&lt;br /&gt;
* Load the MRI.&lt;br /&gt;
* Load the head surface mesh (''Meshes/Load Mesh..''.).&lt;br /&gt;
* Load the Coregistration File (''EEG-MEG BESA/Load Surface Points..''.).&lt;br /&gt;
&lt;br /&gt;
BrainVoyager is now ready for Co-location.&lt;br /&gt;
&lt;br /&gt;
=== Send a Dipole from BESA Research to BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
First, start BrainVoyager(QX). This can be done from the BESA Research Source Module by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager '''&amp;lt;/span&amp;gt;button. Note that in the Source Module, the ''Options / Preferences / BrainVoyager'' tab allows to define the path to BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
In BrainVoyager, [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|set up coregistration]].&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, highlight the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
Program control will automatically switch to BrainVoyager. The head will be cut at the section corresponding to the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (10).gif‎|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that all dipoles in the current model are sent to BrainVoyager. The highlighted dipole (here, the red dipole) determines the plane at which the head will be cut.&lt;br /&gt;
&lt;br /&gt;
Note that the dipoles are visible in both the surface module and in the 2D view:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (11).gif|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Define a Dipole in BESA Research at a Location Defined in the MRI ===&lt;br /&gt;
&lt;br /&gt;
First set up coregistration (see chapter ''“[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|Coregistration with BrainVoyager after Alignment has been Done]]”'').&lt;br /&gt;
&lt;br /&gt;
In the BrainVoyager 2D MRI view, place the mouse over the point at which you would like to define a dipole. Right click at this point. If this point lies within an fRMI cluster, BrainVoyager will automatically determine its center and use it as a seeding point instead. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send Seed Point To BESA....'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (12).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
The following Dialog is opened:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (13).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send to BESA'''&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BESA Source Analysis window appears. The new dipole or regional source (depending on the setting in the ‘Options’ dialog in the Source Analysis window is now displayed at the corresponding location. If a dipole is seeded, BESA automatically fits its orientation. For further adjustment of the model, you may need to refit the orientation, e.g. at a certain time range, or in the presence of other sources.&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([http://brainvoyager.com/Downloads.html http://brainvoyager.com/Downloads.html]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration File (*.sfh) ===&lt;br /&gt;
&lt;br /&gt;
This file is used to mediate between BESA Research and BESA MRI (or BrainVoyager(QX)). When it is first written by BESA Research, it contains a list of the digitized head surface points (fiducials, electrodes, other digitized points), e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
NrOfPoints: 68&lt;br /&gt;
 Fid_Nz                    0.00000     103.10000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T9                  -78.40000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T10                  73.00000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Ele_E1                  -28.70000      23.90000     122.30000   3 255    0    0&lt;br /&gt;
 Ele_E2                  -80.40000      19.80000      75.90000   3 255    0    0&lt;br /&gt;
 Ele_E3                  -84.00000      37.90000       9.00000   3 255    0    0&lt;br /&gt;
 Ele_E4                  -17.60000      92.90000      89.10000   3 255    0    0&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
 Ele_E63                  -6.80000    -104.00000      54.40000   3 255    0    0&lt;br /&gt;
 Ele_E64                 -42.80000     -46.90000     115.60000   3 255    0    0&lt;br /&gt;
 Ele_Cz'                  -2.10000       2.20000     131.10000   3 255    0    0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line contains a label, the coordinates in the Head Coordinate system, and parameters specifying the size and color of the sensor or head surface point as displayed in BESA MRI (or BrainVoyager).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After aligning the coordinate systems, BESA MRI (or BrainVoyagerQX) appends lines defining the transformation between the BESA Research and the MRI coordinate systems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Trans-data(in BV-coords): 3 translation, 3 rotation (in grad), 3 scale&lt;br /&gt;
37.435 15.811 2.820 0.025 1.938 8.779  1.009 0.973 0.977&lt;br /&gt;
Fiducials:&lt;br /&gt;
41.7873  148.0180  128.0844&lt;br /&gt;
154.7772  169.4783  204.1080&lt;br /&gt;
147.0154  168.9746  54.1266&lt;br /&gt;
Midpoint (in BV-coords):&lt;br /&gt;
128.0000  128.0000  128.0000&lt;br /&gt;
Volume:  C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.vmr&lt;br /&gt;
Surface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.srf&lt;br /&gt;
AC: 128 128 128&lt;br /&gt;
PC: 154 128 128&lt;br /&gt;
AP: 58 128 128&lt;br /&gt;
PP: 241 129 130&lt;br /&gt;
SP: 154 50 128&lt;br /&gt;
IP: 128 172 128&lt;br /&gt;
RP: 128 128 60&lt;br /&gt;
LP: 165 128 198&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Older versions of BrainVoyager.exe do not append the lines starting with &amp;quot;Volume&amp;quot;. In addition, the Talairach coordinates (starting at &amp;quot;AC: ...&amp;quot;) are not appended if they were not loaded in BrainVoyagerQX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, when the Coregistration Dialog in BESA Research has found the Talairach MRI and surface meshes, and you press the OK button, BESA Research appends the additional file names:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TalVolume: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.vmr&lt;br /&gt;
TalSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.srf&lt;br /&gt;
TalBrainSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal_wm.srf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA MRI already inserts the correct file names into the coregistration file when doing the coregistration. When also an EEG or MEG  FEM head model is generated then additional lines are appended to the coregistration file containing the file names of the generated FEM data files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MRI Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend a high quality T1-weighted anatomical image with 1 mm³ voxels (e.g. 256 x 256 saggital scan with 1 mm spacing).&lt;br /&gt;
&lt;br /&gt;
In order to define the surface mesh, a clear contrast between the head surface and the outside of the head (T1-weighting) is required. Noise and measurement artifacts can influence the representation of the scalp surface. When doing the coregistration in BrainVoyager improvements in noisy images often can be achieved by cleaning up the image after first reading it using the tools provided by BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
For coregistration with head surface points, it is useful to include the whole head in the image, including nose and ears. If surface points on the nose are included with the EEG/MEG data set, these points help to stabilize the fit of head surface points to the surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EEG/MEG Data Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend several (30 or more) digitized head surface points in addition to the fiducials, including points on the nose (nose tip and sides). These points may include electrodes. In the case of electrodes, it is important to measure the distance from the scalp to the digitization point, i.e. the electrode thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI</id>
		<title>Integration with MRI and fMRI</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI"/>
				<updated>2021-05-06T06:42:46Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA MRI&lt;br /&gt;
|version = BESA Research 6.1 or higher&amp;lt;br/&amp;gt;BESA MRI 2.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- = BESA Research Integration with MRI and fMRI = --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Both for developing and evaluating dipole source models of EEG or MEG activity, it is useful to have access to structural MRI or fMRI data.&lt;br /&gt;
&lt;br /&gt;
The BESA MRI software allows to preprocess structural MRI data so that the individual anatomical information contained in the MRI can be utilized in BESA Research. BESA MRI makes it possible ...&lt;br /&gt;
* ... to align the EEG and MEG sensors with the structural MRI data.&lt;br /&gt;
* ... to read and display the aligned, individual Talairach structural MRIs directly in the BESA Research Source Analysis module. In this way, source analysis results can be presented on top of the aligned MRIs, which allows us to evaluate the anatomical regions to which the reconstructed sources may correspond.&lt;br /&gt;
* ... to use an individual, realistically shaped FEM head model for source analysis in BESA Research. FEM head models take into account the individual volume conduction properties of the subject's head derived from the structural MRI data. This allows for more accurate source analysis (Yvert 1997, Lanfer 2012).&lt;br /&gt;
&lt;br /&gt;
To offer an easy integration with fMRI data we have, in collaboration with Rainer Goebel, optimized the interface between BESA Research and BrainVoyagerQX. &lt;br /&gt;
&lt;br /&gt;
With these tools, we can ...&lt;br /&gt;
* ... use fMRI BOLD regions or MRI structures to initialize dipole models.&lt;br /&gt;
* ... visualize dipoles from BESA Research models together with the structural MRI in BrainVoyager in order to evaluate the regions to which the dipoles may correspond.&lt;br /&gt;
* ... combine the localization advantages of (f)MRI with the high temporal resolution of EEG and MEG, for instance by using (f)MRI to place the sources, and the source waveforms of BESA Research to provide feedback about the time course of the source activity.&lt;br /&gt;
* ... overlay source analysis results obtained in BESA Research with fMRI data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' For simpler coregistration, we recommend to use BrainVoyagerQX rather than the older BrainVoyager, but BESA Research will work with both program versions.&lt;br /&gt;
&lt;br /&gt;
The chapters below describe the steps necessary to integrate the MRI and fMRI data with BESA Research. Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([https://www.brainvoyager.com/downloads/downloads.html BrainVoyager - Downloads]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Aligning Coordinate Systems'''&lt;br /&gt;
&lt;br /&gt;
* For a given BESA data set, the electrode and other head surface points need to be aligned to the MRI coordinates.&lt;br /&gt;
* The basic steps necessary to align the EEG electrode locations, the MEG sensors and the MRI are described in Section “[[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How Coregistration is done]]”.&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BESA MRI can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BrainVoyager are described in Section “[[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How To set up Coregistration between BESA and BrainVoyager]]”.&lt;br /&gt;
* In BESA Research, all necessary settings with regard to the alignment are made in the [[Integration_with_MRI_and_fMRI#The_Coregistration_Dialog|Coregistration Dialog]].&lt;br /&gt;
* Requirements with respect to the MRI data for a good coregistration can be found in Section “''MRI Requirements for Good Coregistration”.''&lt;br /&gt;
* Requirements with respect to EEG and MEG data for a good coregistration can be found in Section “''EEG/MEG Data Requirements for Good Coregistration”.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Generating an individual, realistically shaped FEM head model'''&lt;br /&gt;
&lt;br /&gt;
* The generation of a FEM head model that can be used in BESA Research is done in BESA MRI as an additional step following the EEG / MEG to MRI coregistration.&lt;br /&gt;
* Detailed instructions on how to generate the FEM head model can be found in the coregistration quick guide which is available on the BESA homepage ([http://www.besa.de/downloads/quick-guides/ Quick Guides]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Co-locating dipoles and MRI locations'''&lt;br /&gt;
&lt;br /&gt;
* After aligning the EEG / MEG and the MRI data it is possible to co-locate dipoles and MRI locations. This means, it is possible to visualize the dipoles and to specify the dipole parameters in the MRI coordinate system.&lt;br /&gt;
* “[[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-locate sources and MRI in the BESA Research Source Module]]&amp;quot; describes how in the BESA Research Source Analysis module dipoles can directly be visualized in the space of the individual MRI.&lt;br /&gt;
* “[[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]” describes how to send a source model from BESA Research to BrainVoyager for further inspection.&lt;br /&gt;
* “[[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]” describes how to insert a dipole at a location defined in the MRI in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
Lanfer, B., I. Paul-Jordanov, M. Scherg, and C. H. Wolters. “Influence of Interior Cerebrospinal Fluid Compartments on EEG Source Analysis.” In Proceedings BMT 2012, Vol. 57. Jena: De Gruyter, 2012. doi:10.1515/bmt-2012-4020.&lt;br /&gt;
&lt;br /&gt;
Yvert, B., O. Bertrand, M. Thévenet, J. F. Echallier, and J. Pernier. “A Systematic Evaluation of the Spherical Model Accuracy in EEG Dipole Localization.” Electroencephalography and Clinical Neurophysiology 102, no. 5 (May 1997): 452–59. doi:16/S0921-884X(97)96611-X.&lt;br /&gt;
&lt;br /&gt;
== How Coregistration is done ==&lt;br /&gt;
&lt;br /&gt;
This section outlines the basic steps to coregister the EEG / MEG data to an individual MRI. These steps are necessary to load an individual MRI into BESA Research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What happens:'''&lt;br /&gt;
&lt;br /&gt;
* EEG / MEG sensor locations and the MRI data are defined in different coordinate systems. Setting up coregistration is the process of aligning the two coordinate systems.&lt;br /&gt;
* BESA Research uses the ''Coregistration Dialog'' to coordinate the alignment procedure.&lt;br /&gt;
* Alignment is done with the ''AC-PC-transformed MRI''.&lt;br /&gt;
* BESA Research displays the ''Talairach-transformed MRI'' in the source analysis module.&lt;br /&gt;
* A coregistration file (with the extension &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.sfh'''&amp;lt;/span&amp;gt;&amp;quot;) is used to mediate between BESA Research and BESA MRI (or BrainVoyagerQX):&lt;br /&gt;
* BESA Research writes the coregistration file which contains the coordinates of head surface points (fiducials, electrodes, other digitized surface points).&lt;br /&gt;
* The coordinates are read into BESA MRI (or BrainVoyager), and aligned with the AC-PC-transformed MRI. The alignment information is then appended to the ''coregistration file''. The names of the AC-PC MRI (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.vmr&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the surface mesh (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.srf&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), and, if available, the Talairach transformation, are also appended.&lt;br /&gt;
* BESA Research reads the coregistration file and appends the name of the Talairach-transformed MRI and head surface. If a brain surface has been created, this is also appended.&lt;br /&gt;
* Subsequently, BESA Research reads the coregistration file automatically when loading the data file.&lt;br /&gt;
* In the BESA Research source module, the individual MRI is displayed instead of the standard MRI. Talairach coordinates of dipoles are the &amp;quot;real&amp;quot; Talairach coordinates as defined, e.g., in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The steps you have to take (once for each data set):'''&lt;br /&gt;
&lt;br /&gt;
* From the BESA Research ''Coregistration Dialog'', write a coregistration file. Switch to BESA MRI (or BrainVoyagerQX).&lt;br /&gt;
* If BESA MRI is used follow the steps in the coregistration quickguide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
* If BrainVoyager is used follow the steps in Section “''How to set up coregistration between BESA and BrainVoyager”.''&lt;br /&gt;
* Back in BESA Research, reload the altered '''coregistration file'''. When using BESA MRI the file names of the generated surface and volume data files will be automatically filled in. When using BrainVoyager file names are only filled in automatically when the files are named according to the file naming conventions. Otherwise, file names have to be set manually.&lt;br /&gt;
* The coregistration file is now associated with the data file in the BESA Research database and will be used automatically the next time the file is opened in BESA Research. If the database entry is cleared, and the data are reloaded, you must make sure the coregistration file is also loaded (either using the ''Coregistration Dialog'' or the ''Channel and digitized head surface point information Dialog'').&lt;br /&gt;
&lt;br /&gt;
==  Alignment of BESA and MRICoordinate Systems  ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration Dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog is opened either from the ''Channel and digitized head surface point information'' (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) ''dialog ''by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit/Coreg'''&amp;lt;/span&amp;gt; button, or from the main menu (&amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File/MRI&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Coregistration...'''&amp;lt;/span&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the coregistration dialog is invoked from an EEG data set in which no digitized electrode coordinates are available (i.e. standard electrode positions located on a sphere are assumed), BESA Research presents a warning message, saying that for MRI coregistration realistic electrode coordinates produce better results. BESA Research has a list of such realistic standard coordinates (i.e. located on a pre-defined standard head surface) for various electrodes available in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;, which is located in the Standard Electrode folder. If all electrodes in the dataset are listed in this file, a dialog window suggests to apply this file to the current data set, i.e. to switch from standard sphere coordinates to the standard realistic electrode coordinates in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;. If the suggestion is accepted, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; is assigned to the dataset (see Channel and digitized head surface point information (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) dialog).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Dialog:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (1).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Select MRI prog'''&amp;lt;/span&amp;gt; button to select your preferred MRI program. The current choice is between ''BESA MRI.exe'' and ''BrainVoyagerQX.exe''. The path to the MRI program is saved (in ''System\BESA.set'') and will be remembered by BESA Research. The top right hand button (now showing '''BESA MRI''') shows the current selection.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BESA MRI'''&amp;lt;/span&amp;gt; button to start the process of aligning the BESA Research and MRI coordinate systems. If no coregistration (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) file is defined in the dialog (empty ''Surface coregistration file edit box''), BESA Research will first prompt for a file name. We recommend saving this file to the folder where the MRIs are kept. The MRI program will then be started. When you return to the ''Coregistration Dialog'', BESA Research checks if the ''Coregistration File'' has changed. If so, the dialog is updated with the new information.&lt;br /&gt;
* Press the top &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse... '''&amp;lt;/span&amp;gt;button to select a preexisting ''Coregistration File''.&lt;br /&gt;
* The entries in the edit boxes below show the files that will be used in the BESA Research Source Analysis module when the individual MRI is loaded. When using BESA MRI the file names will be automatically filled in. If you are using BrainVoagerQX and you are following our (and the BrainVoyagerQX) recommended naming conventions for files, and the files exist, then the names will be filled in automatically after you have completed the alignment procedure in BrainVoyagerQX. Otherwise you may have to browse for the files.&lt;br /&gt;
* Below the edit boxes the FEM field states whether all necessary information for the individual FEM head model were found in the coregistration file. If the field says ''Individual FEM for EEG'' ''defined!'' then all necessary data was found and the individual FEM EEG head model can be used in the BESA Research Source Analysis module. A similar message indicates whether the FEM MEG head model is available.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note that the MRI and the surfaces are Talairach-transformed! Alignment between BESA Research and the individual MRI is done with the MRI transformed to the AC-PC coordinate system, but the BESA Research Source Analysis module uses the Talairach-transformed image data and surfaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Coregistration Using BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
It is assumed that you know how to load an MRI as a 3D data set into BrainVoyagerQX, and how to clean the image so that regions outside the head are black. We also assume knowledge of how to create AC-PC-aligned and Talairach-transformed MRIs.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* BESA Research. Start the ''Coregistration Dialog''. Export the Coregistration File (head surface points) from your data by pressing the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; '''BrainVoyagerQX'''&amp;lt;/span&amp;gt; button in the dialog. Save the file to the directory where your MRI is located. BrainVoyagerQX is started.&lt;br /&gt;
* BrainVoyagerQX. Load the MRI corresponding to the EEG/MEG data. For optimal performance, the MRI should be cleaned so that regions outside the head are black. Prepare an AC-PC-transformed MRI and a Talairach MRI. For each, generate a surface mesh. Save these files following our recommended naming conventions (see chapter “[[Integration_with_MRI_and_fMRI#MRI_file_Name_Conventions|MRI File Name Conventions]]”). Save the Talairach coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If these steps have already been performed, load the ACPC MRI and load the ACPC mesh. If you want to generate a brain surface mesh, see chapter “[[Integration_with_MRI_and_fMRI#How_to_Generate_a_Brain_Surface_Mesh|How to Generate a Brain Surface Mesh]]”.&lt;br /&gt;
* BrainVoyagerQX. Load the Coregistration File (''EEG-MEG BESA/Load Surface Points''). The points will be displayed, but they are not aligned to the head:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (2).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Define fiducial points on the head surface. Right click on the 3D head display and select the ''Fiducials Dialog'' in the drop-down menu:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (3).gif ‎]]  [[Image:MRI Integration (4).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Rotate the head (by holding the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Shift '''&amp;lt;/span&amp;gt;button down and clicking and dragging with the mouse) so that the Nasion is clearly visible. Move the mouse to the Nasion, and press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl+Left Click'''&amp;lt;/span&amp;gt;. The coordinates of the Nasion are inserted into the dialog. Repeat for the left preauricular point, and then for the right preauricular point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (5).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: if you have defined your fiducials differently in your BESA Research data (e.g. ear holes), click on the corresponding points in the MRI. If you have additional head surface points (step 8), accuracy in pinpointing the fiducials is not critical.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. In the Fiducials Dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Fit fiducials'''&amp;lt;/span&amp;gt; button. The head surface points are now more or less aligned to the head.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (6).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Now select '''''EEG-MEG BESA/Fit Surface Points...'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (7).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not see the right half of the dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Advanced &amp;gt;&amp;gt;'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Specify the distances of the digitization points from the skin. In the illustration above, the digitization points for electrodes are estimated to be 8 mm from the surface of the head. For the purpose of accurate alignment, the distance of digitization points from skin section of the dialog needs to be filled in correctly. We recommend that &amp;quot;Restrain solution around fiducials&amp;quot; is checked, and a reasonable limit (here 3 mm) of the restraint is defined. Then press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (8).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BrainVoyager fits the points to the head, stretching x, y, and z coordinates to obtain a better fit than before.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: The fit performed during this step accounts for scaling inequalities between the x, y, and z axes in the MRI. Coregistration gains in accuracy over the use of fiducials alone a) because more head surface points are used, and b) because the scaling inequalities are accounted for.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alignment is now completed. If you only want to display the structural MRI in the BESA Source Module, you can return to the BESA Coregistration Dialog.&lt;br /&gt;
* BESA Research. When you switch back to the Coregistration Dialog, BESA Research will try to fill in the names of the Talairach MRI and surface meshes. If the names are not filled in, use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse...'''&amp;lt;/span&amp;gt; buttons to select the MRI and surface meshes. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to save the Coregistration File. Alignment is completed!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The alignment steps need only be performed once for a given MRI and EEG/MEG data set. Otherwise, after starting BrainVoyager, just load the MRI, the surface mesh, and the surface points (see “[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done |How to Set Up Coregistration with BrainVoyager after Alignment has been Done]]”). Now the following actions are possible: see chapters&lt;br /&gt;
&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-Locate Sources and MRI in the BESA Research Source Module]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]&lt;br /&gt;
&lt;br /&gt;
=== MRI file Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
If you follow the naming conventions for file names as described here, BESA Research detects the file names it requires, and the ''Coregistration Dialog'' is filled in automatically.&lt;br /&gt;
&lt;br /&gt;
Please note that BESA MRI automatically uses these naming conventions for the generated files.&lt;br /&gt;
&lt;br /&gt;
* '''The AC-PC MRI file name''' should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.srf'''&amp;lt;/span&amp;gt;&amp;quot;. After alignment, BrainVoyagerQX writes these names to the Coregistration File.&lt;br /&gt;
* '''The Talairach MRI file name '''should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If defined, the brain surface mesh should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot; ('''WM''' = '''w'''hite '''m'''atter).&lt;br /&gt;
* '''How BESA Research finds the Talairach files.''' When BESA Research rereads the Coregistration File after alignment of the coordinate systems, it finds the ACPC file names and defines the corresponding TAL file names. If these files exist, the names are entered into the Coregistration Dialog. For instance, if the Coregistration File contains the name &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for the files &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;, and &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If these files exist, they are entered into the dialog.&lt;br /&gt;
* '''Older BrainVoyager version.''' If you use BrainVoyager.exe to align coordinate systems, the file names are not saved with the Coregistration File. In this case, browse for the Talairach or the ACPC MRI from the Coregistration Dialog. BESA Research will use the rules as described above to insert the correct file names into the dialog.&lt;br /&gt;
* '''Missing Talairach coordinates.''' If, after aligning coordinate systems, the Talairach coordinates are missing from the Coregistration File (you forgot to load the Talairach coordinates in BrainVoyagerQX, or you used BrainVoyager.exe), BESA Research will look for a file ending with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot;, and read the coordinates from this file. You can also browse for a &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file in the Coregistration Dialog. For instance, if the MRI file is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MR_'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot; to find the Talairach coordinates.&lt;br /&gt;
* '''File names in the Coregistration File are saved relative to the Coregistration File location, if they are in the same folder.''' If the MRIs are in the same folder as the Coregistration File they will be recorded as &amp;quot;.\filename&amp;quot; (e.g. &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.\MRI PB_tal.vmr'''&amp;lt;/span&amp;gt;&amp;quot;). This means that you can copy the Coregistration File together with the MRIs and meshes to a different folder, and BESA Research will be able to locate the files when the Coregistration File is opened. If the MRIs are saved in a different folder from the Coregistration File, the absolute paths are saved in the file. If the files are moved to new locations, you will have to restart the Coregistration Dialog and redefine the file locations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to Generate a Brain Surface Mesh ===&lt;br /&gt;
&lt;br /&gt;
BESA Research is able to compute surface images, such as (Cortical LORETA, Cortical CLARA, Minimum Norm) using an individual cortex surface as the source space. A suitable cortex surface for this purpose can be effortlessly created using BESA MRI. Alternatively, BrainVoyager can be used for the creation of the brain surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA MRI'''&lt;br /&gt;
* The brain surface generation is performed as one work step of the BESA MRI segmentation workflow.&lt;br /&gt;
* The cortex surface reconstruction is done using a robust and accurate automatic segmentation procedure.&lt;br /&gt;
* Details on how to generate the brain surface mesh in BESA MRI can be found in the coregistration quickguide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BrainVoyager'''&lt;br /&gt;
* BrainVoyagerQX provides a semiautomatic procedure to generate meshes for the brain surface of the Talairach MRI. Please refer to the BrainVoyager Help to find out how to do this.&lt;br /&gt;
* The result of the BrainVoyager procedure is two meshes, one for the left and one for the right hemisphere.&lt;br /&gt;
* BESA Research requires a single mesh. Therefore, load first one mesh (''Meshes/Load Mesh..''.), and append the other mesh (''Meshes/Add Mesh...''). Merge these two meshes (''Meshes/Merge'' ''meshes in surface window'') and then save the result (''Meshes/Save Mesh...''). If possible, use the recommended name conventions for the resulting file (file name ends in &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf&amp;quot;). '''&amp;lt;/span&amp;gt;For instance, if the Talairach MRI is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, name the brain surface mesh &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;.&lt;br /&gt;
* See also the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website (http://brainvoyager.com/Downloads.html).&lt;br /&gt;
&lt;br /&gt;
==  Co-locating Dipoles and MRI Locations ==&lt;br /&gt;
&lt;br /&gt;
=== Co-locating Sources and MRI in the BESA Research Source Module ===&lt;br /&gt;
&lt;br /&gt;
If the alignment procedure using BESA MRI (or BrainVoyager) has been completed then you can load the individual structural MRI in the Source Module by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''A''''&amp;lt;/span&amp;gt; or using a mouse right click and selecting '''''Display MRI'''''.&lt;br /&gt;
&lt;br /&gt;
Sources in the current model are then overlayed onto the individual MRI.&lt;br /&gt;
&lt;br /&gt;
A double-click at any location in the MRI will define a new source at the corresponding location in the BESA Research head model.&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (9).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
=== Coregistration with BrainVoyager after Alignment has been Done ===&lt;br /&gt;
&lt;br /&gt;
Alignment between BESA Research and BrainVoyager is only required once for a given BESA Research data set and the corresponding MRI. At a later time, if you want to Co-locate sources between BESA Research and BrainVoyager, perform the following steps in BrainVoyager:&lt;br /&gt;
* Load the MRI.&lt;br /&gt;
* Load the head surface mesh (''Meshes/Load Mesh..''.).&lt;br /&gt;
* Load the Coregistration File (''EEG-MEG BESA/Load Surface Points..''.).&lt;br /&gt;
&lt;br /&gt;
BrainVoyager is now ready for Co-location.&lt;br /&gt;
&lt;br /&gt;
=== Send a Dipole from BESA Research to BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
First, start BrainVoyager(QX). This can be done from the BESA Research Source Module by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager '''&amp;lt;/span&amp;gt;button. Note that in the Source Module, the ''Options / Preferences / BrainVoyager'' tab allows to define the path to BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
In BrainVoyager, [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|set up coregistration]].&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, highlight the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
Program control will automatically switch to BrainVoyager. The head will be cut at the section corresponding to the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (10).gif‎|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that all dipoles in the current model are sent to BrainVoyager. The highlighted dipole (here, the red dipole) determines the plane at which the head will be cut.&lt;br /&gt;
&lt;br /&gt;
Note that the dipoles are visible in both the surface module and in the 2D view:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (11).gif|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Define a Dipole in BESA Research at a Location Defined in the MRI ===&lt;br /&gt;
&lt;br /&gt;
First set up coregistration (see chapter ''“[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|Coregistration with BrainVoyager after Alignment has been Done]]”'').&lt;br /&gt;
&lt;br /&gt;
In the BrainVoyager 2D MRI view, place the mouse over the point at which you would like to define a dipole. Right click at this point. If this point lies within an fRMI cluster, BrainVoyager will automatically determine its center and use it as a seeding point instead. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send Seed Point To BESA....'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (12).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
The following Dialog is opened:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (13).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send to BESA'''&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BESA Source Analysis window appears. The new dipole or regional source (depending on the setting in the ‘Options’ dialog in the Source Analysis window is now displayed at the corresponding location. If a dipole is seeded, BESA automatically fits its orientation. For further adjustment of the model, you may need to refit the orientation, e.g. at a certain time range, or in the presence of other sources.&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([http://brainvoyager.com/Downloads.html http://brainvoyager.com/Downloads.html]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration File (*.sfh) ===&lt;br /&gt;
&lt;br /&gt;
This file is used to mediate between BESA Research and BESA MRI (or BrainVoyager(QX)). When it is first written by BESA Research, it contains a list of the digitized head surface points (fiducials, electrodes, other digitized points), e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
NrOfPoints: 68&lt;br /&gt;
 Fid_Nz                    0.00000     103.10000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T9                  -78.40000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T10                  73.00000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Ele_E1                  -28.70000      23.90000     122.30000   3 255    0    0&lt;br /&gt;
 Ele_E2                  -80.40000      19.80000      75.90000   3 255    0    0&lt;br /&gt;
 Ele_E3                  -84.00000      37.90000       9.00000   3 255    0    0&lt;br /&gt;
 Ele_E4                  -17.60000      92.90000      89.10000   3 255    0    0&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
 Ele_E63                  -6.80000    -104.00000      54.40000   3 255    0    0&lt;br /&gt;
 Ele_E64                 -42.80000     -46.90000     115.60000   3 255    0    0&lt;br /&gt;
 Ele_Cz'                  -2.10000       2.20000     131.10000   3 255    0    0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line contains a label, the coordinates in the Head Coordinate system, and parameters specifying the size and color of the sensor or head surface point as displayed in BESA MRI (or BrainVoyager).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After aligning the coordinate systems, BESA MRI (or BrainVoyagerQX) appends lines defining the transformation between the BESA Research and the MRI coordinate systems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Trans-data(in BV-coords): 3 translation, 3 rotation (in grad), 3 scale&lt;br /&gt;
37.435 15.811 2.820 0.025 1.938 8.779  1.009 0.973 0.977&lt;br /&gt;
Fiducials:&lt;br /&gt;
41.7873  148.0180  128.0844&lt;br /&gt;
154.7772  169.4783  204.1080&lt;br /&gt;
147.0154  168.9746  54.1266&lt;br /&gt;
Midpoint (in BV-coords):&lt;br /&gt;
128.0000  128.0000  128.0000&lt;br /&gt;
Volume:  C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.vmr&lt;br /&gt;
Surface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.srf&lt;br /&gt;
AC: 128 128 128&lt;br /&gt;
PC: 154 128 128&lt;br /&gt;
AP: 58 128 128&lt;br /&gt;
PP: 241 129 130&lt;br /&gt;
SP: 154 50 128&lt;br /&gt;
IP: 128 172 128&lt;br /&gt;
RP: 128 128 60&lt;br /&gt;
LP: 165 128 198&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Older versions of BrainVoyager.exe do not append the lines starting with &amp;quot;Volume&amp;quot;. In addition, the Talairach coordinates (starting at &amp;quot;AC: ...&amp;quot;) are not appended if they were not loaded in BrainVoyagerQX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, when the Coregistration Dialog in BESA Research has found the Talairach MRI and surface meshes, and you press the OK button, BESA Research appends the additional file names:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TalVolume: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.vmr&lt;br /&gt;
TalSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.srf&lt;br /&gt;
TalBrainSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal_wm.srf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA MRI already inserts the correct file names into the coregistration file when doing the coregistration. When also an EEG or MEG  FEM head model is generated then additional lines are appended to the coregistration file containing the file names of the generated FEM data files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MRI Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend a high quality T1-weighted anatomical image with 1 mm³ voxels (e.g. 256 x 256 saggital scan with 1 mm spacing).&lt;br /&gt;
&lt;br /&gt;
In order to define the surface mesh, a clear contrast between the head surface and the outside of the head (T1-weighting) is required. Noise and measurement artifacts can influence the representation of the scalp surface. When doing the coregistration in BrainVoyager improvements in noisy images often can be achieved by cleaning up the image after first reading it using the tools provided by BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
For coregistration with head surface points, it is useful to include the whole head in the image, including nose and ears. If surface points on the nose are included with the EEG/MEG data set, these points help to stabilize the fit of head surface points to the surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EEG/MEG Data Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend several (30 or more) digitized head surface points in addition to the fiducials, including points on the nose (nose tip and sides). These points may include electrodes. In the case of electrodes, it is important to measure the distance from the scalp to the digitization point, i.e. the electrode thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI</id>
		<title>Integration with MRI and fMRI</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Integration_with_MRI_and_fMRI"/>
				<updated>2021-05-06T06:40:37Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA MRI&lt;br /&gt;
|version = BESA Research 6.1 or higher&amp;lt;br/&amp;gt;BESA MRI 2.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- = BESA Research Integration with MRI and fMRI = --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Both for developing and evaluating dipole source models of EEG or MEG activity, it is useful to have access to structural MRI or fMRI data.&lt;br /&gt;
&lt;br /&gt;
The BESA MRI software allows to preprocess structural MRI data so that the individual anatomical information contained in the MRI can be utilized in BESA Research. BESA MRI makes it possible ...&lt;br /&gt;
* ... to align the EEG and MEG sensors with the structural MRI data.&lt;br /&gt;
* ... to read and display the aligned, individual Talairach structural MRIs directly in the BESA Research Source Analysis module. In this way, source analysis results can be presented on top of the aligned MRIs, which allows us to evaluate the anatomical regions to which the reconstructed sources may correspond.&lt;br /&gt;
* ... to use an individual, realistically shaped FEM head model for source analysis in BESA Research. FEM head models take into account the individual volume conduction properties of the subject's head derived from the structural MRI data. This allows for more accurate source analysis (Yvert 1997, Lanfer 2012).&lt;br /&gt;
&lt;br /&gt;
To offer an easy integration with fMRI data we have, in collaboration with Rainer Goebel, optimized the interface between BESA Research and BrainVoyagerQX. &lt;br /&gt;
&lt;br /&gt;
With these tools, we can ...&lt;br /&gt;
* ... use fMRI BOLD regions or MRI structures to initialize dipole models.&lt;br /&gt;
* ... visualize dipoles from BESA Research models together with the structural MRI in BrainVoyager in order to evaluate the regions to which the dipoles may correspond.&lt;br /&gt;
* ... combine the localization advantages of (f)MRI with the high temporal resolution of EEG and MEG, for instance by using (f)MRI to place the sources, and the source waveforms of BESA Research to provide feedback about the time course of the source activity.&lt;br /&gt;
* ... overlay source analysis results obtained in BESA Research with fMRI data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note:''' For simpler coregistration, we recommend to use BrainVoyagerQX rather than the older BrainVoyager, but BESA Research will work with both program versions.&lt;br /&gt;
&lt;br /&gt;
The chapters below describe the steps necessary to integrate the MRI and fMRI data with BESA Research. Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website (https://www.brainvoyager.com/downloads/downloads.html).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Aligning Coordinate Systems'''&lt;br /&gt;
&lt;br /&gt;
* For a given BESA data set, the electrode and other head surface points need to be aligned to the MRI coordinates.&lt;br /&gt;
* The basic steps necessary to align the EEG electrode locations, the MEG sensors and the MRI are described in Section “[[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How Coregistration is done]]”.&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BESA MRI can be found in the coregistration quick guide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
* Detailed instructions on how to align EEG / MEG and MRI data using BrainVoyager are described in Section “[[Integration_with_MRI_and_fMRI#Setting_Up_Coregistration_Using_BrainVoyager|How To set up Coregistration between BESA and BrainVoyager]]”.&lt;br /&gt;
* In BESA Research, all necessary settings with regard to the alignment are made in the [[Integration_with_MRI_and_fMRI#The_Coregistration_Dialog|Coregistration Dialog]].&lt;br /&gt;
* Requirements with respect to the MRI data for a good coregistration can be found in Section “''MRI Requirements for Good Coregistration”.''&lt;br /&gt;
* Requirements with respect to EEG and MEG data for a good coregistration can be found in Section “''EEG/MEG Data Requirements for Good Coregistration”.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Generating an individual, realistically shaped FEM head model'''&lt;br /&gt;
&lt;br /&gt;
* The generation of a FEM head model that can be used in BESA Research is done in BESA MRI as an additional step following the EEG / MEG to MRI coregistration.&lt;br /&gt;
* Detailed instructions on how to generate the FEM head model can be found in the coregistration quick guide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Co-locating dipoles and MRI locations'''&lt;br /&gt;
&lt;br /&gt;
* After aligning the EEG / MEG and the MRI data it is possible to co-locate dipoles and MRI locations. This means, it is possible to visualize the dipoles and to specify the dipole parameters in the MRI coordinate system.&lt;br /&gt;
* “[[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-locate sources and MRI in the BESA Research Source Module]]&amp;quot; describes how in the BESA Research Source Analysis module dipoles can directly be visualized in the space of the individual MRI.&lt;br /&gt;
* “[[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]” describes how to send a source model from BESA Research to BrainVoyager for further inspection.&lt;br /&gt;
* “[[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]” describes how to insert a dipole at a location defined in the MRI in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
Lanfer, B., I. Paul-Jordanov, M. Scherg, and C. H. Wolters. “Influence of Interior Cerebrospinal Fluid Compartments on EEG Source Analysis.” In Proceedings BMT 2012, Vol. 57. Jena: De Gruyter, 2012. doi:10.1515/bmt-2012-4020.&lt;br /&gt;
&lt;br /&gt;
Yvert, B., O. Bertrand, M. Thévenet, J. F. Echallier, and J. Pernier. “A Systematic Evaluation of the Spherical Model Accuracy in EEG Dipole Localization.” Electroencephalography and Clinical Neurophysiology 102, no. 5 (May 1997): 452–59. doi:16/S0921-884X(97)96611-X.&lt;br /&gt;
&lt;br /&gt;
== How Coregistration is done ==&lt;br /&gt;
&lt;br /&gt;
This section outlines the basic steps to coregister the EEG / MEG data to an individual MRI. These steps are necessary to load an individual MRI into BESA Research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''What happens:'''&lt;br /&gt;
&lt;br /&gt;
* EEG / MEG sensor locations and the MRI data are defined in different coordinate systems. Setting up coregistration is the process of aligning the two coordinate systems.&lt;br /&gt;
* BESA Research uses the ''Coregistration Dialog'' to coordinate the alignment procedure.&lt;br /&gt;
* Alignment is done with the ''AC-PC-transformed MRI''.&lt;br /&gt;
* BESA Research displays the ''Talairach-transformed MRI'' in the source analysis module.&lt;br /&gt;
* A coregistration file (with the extension &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.sfh'''&amp;lt;/span&amp;gt;&amp;quot;) is used to mediate between BESA Research and BESA MRI (or BrainVoyagerQX):&lt;br /&gt;
* BESA Research writes the coregistration file which contains the coordinates of head surface points (fiducials, electrodes, other digitized surface points).&lt;br /&gt;
* The coordinates are read into BESA MRI (or BrainVoyager), and aligned with the AC-PC-transformed MRI. The alignment information is then appended to the ''coregistration file''. The names of the AC-PC MRI (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.vmr&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the surface mesh (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.srf&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), and, if available, the Talairach transformation, are also appended.&lt;br /&gt;
* BESA Research reads the coregistration file and appends the name of the Talairach-transformed MRI and head surface. If a brain surface has been created, this is also appended.&lt;br /&gt;
* Subsequently, BESA Research reads the coregistration file automatically when loading the data file.&lt;br /&gt;
* In the BESA Research source module, the individual MRI is displayed instead of the standard MRI. Talairach coordinates of dipoles are the &amp;quot;real&amp;quot; Talairach coordinates as defined, e.g., in BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The steps you have to take (once for each data set):'''&lt;br /&gt;
&lt;br /&gt;
* From the BESA Research ''Coregistration Dialog'', write a coregistration file. Switch to BESA MRI (or BrainVoyagerQX).&lt;br /&gt;
* If BESA MRI is used follow the steps in the coregistration quickguide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
* If BrainVoyager is used follow the steps in Section “''How to set up coregistration between BESA and BrainVoyager”.''&lt;br /&gt;
* Back in BESA Research, reload the altered '''coregistration file'''. When using BESA MRI the file names of the generated surface and volume data files will be automatically filled in. When using BrainVoyager file names are only filled in automatically when the files are named according to the file naming conventions. Otherwise, file names have to be set manually.&lt;br /&gt;
* The coregistration file is now associated with the data file in the BESA Research database and will be used automatically the next time the file is opened in BESA Research. If the database entry is cleared, and the data are reloaded, you must make sure the coregistration file is also loaded (either using the ''Coregistration Dialog'' or the ''Channel and digitized head surface point information Dialog'').&lt;br /&gt;
&lt;br /&gt;
==  Alignment of BESA and MRICoordinate Systems  ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration Dialog ===&lt;br /&gt;
&lt;br /&gt;
The dialog is opened either from the ''Channel and digitized head surface point information'' (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) ''dialog ''by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit/Coreg'''&amp;lt;/span&amp;gt; button, or from the main menu (&amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File/MRI&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Coregistration...'''&amp;lt;/span&amp;gt;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If the coregistration dialog is invoked from an EEG data set in which no digitized electrode coordinates are available (i.e. standard electrode positions located on a sphere are assumed), BESA Research presents a warning message, saying that for MRI coregistration realistic electrode coordinates produce better results. BESA Research has a list of such realistic standard coordinates (i.e. located on a pre-defined standard head surface) for various electrodes available in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;, which is located in the Standard Electrode folder. If all electrodes in the dataset are listed in this file, a dialog window suggests to apply this file to the current data set, i.e. to switch from standard sphere coordinates to the standard realistic electrode coordinates in file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''Default.sfp'''&amp;lt;/span&amp;gt;. If the suggestion is accepted, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; is assigned to the dataset (see Channel and digitized head surface point information (&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl-L'''&amp;lt;/span&amp;gt;) dialog).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The Dialog:'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (1).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Select MRI prog'''&amp;lt;/span&amp;gt; button to select your preferred MRI program. The current choice is between ''BESA MRI.exe'' and ''BrainVoyagerQX.exe''. The path to the MRI program is saved (in ''System\BESA.set'') and will be remembered by BESA Research. The top right hand button (now showing '''BESA MRI''') shows the current selection.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BESA MRI'''&amp;lt;/span&amp;gt; button to start the process of aligning the BESA Research and MRI coordinate systems. If no coregistration (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) file is defined in the dialog (empty ''Surface coregistration file edit box''), BESA Research will first prompt for a file name. We recommend saving this file to the folder where the MRIs are kept. The MRI program will then be started. When you return to the ''Coregistration Dialog'', BESA Research checks if the ''Coregistration File'' has changed. If so, the dialog is updated with the new information.&lt;br /&gt;
* Press the top &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse... '''&amp;lt;/span&amp;gt;button to select a preexisting ''Coregistration File''.&lt;br /&gt;
* The entries in the edit boxes below show the files that will be used in the BESA Research Source Analysis module when the individual MRI is loaded. When using BESA MRI the file names will be automatically filled in. If you are using BrainVoagerQX and you are following our (and the BrainVoyagerQX) recommended naming conventions for files, and the files exist, then the names will be filled in automatically after you have completed the alignment procedure in BrainVoyagerQX. Otherwise you may have to browse for the files.&lt;br /&gt;
* Below the edit boxes the FEM field states whether all necessary information for the individual FEM head model were found in the coregistration file. If the field says ''Individual FEM for EEG'' ''defined!'' then all necessary data was found and the individual FEM EEG head model can be used in the BESA Research Source Analysis module. A similar message indicates whether the FEM MEG head model is available.&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note that the MRI and the surfaces are Talairach-transformed! Alignment between BESA Research and the individual MRI is done with the MRI transformed to the AC-PC coordinate system, but the BESA Research Source Analysis module uses the Talairach-transformed image data and surfaces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up Coregistration Using BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
It is assumed that you know how to load an MRI as a 3D data set into BrainVoyagerQX, and how to clean the image so that regions outside the head are black. We also assume knowledge of how to create AC-PC-aligned and Talairach-transformed MRIs.&lt;br /&gt;
&lt;br /&gt;
Perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* BESA Research. Start the ''Coregistration Dialog''. Export the Coregistration File (head surface points) from your data by pressing the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt; '''BrainVoyagerQX'''&amp;lt;/span&amp;gt; button in the dialog. Save the file to the directory where your MRI is located. BrainVoyagerQX is started.&lt;br /&gt;
* BrainVoyagerQX. Load the MRI corresponding to the EEG/MEG data. For optimal performance, the MRI should be cleaned so that regions outside the head are black. Prepare an AC-PC-transformed MRI and a Talairach MRI. For each, generate a surface mesh. Save these files following our recommended naming conventions (see chapter “[[Integration_with_MRI_and_fMRI#MRI_file_Name_Conventions|MRI File Name Conventions]]”). Save the Talairach coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If these steps have already been performed, load the ACPC MRI and load the ACPC mesh. If you want to generate a brain surface mesh, see chapter “[[Integration_with_MRI_and_fMRI#How_to_Generate_a_Brain_Surface_Mesh|How to Generate a Brain Surface Mesh]]”.&lt;br /&gt;
* BrainVoyagerQX. Load the Coregistration File (''EEG-MEG BESA/Load Surface Points''). The points will be displayed, but they are not aligned to the head:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (2).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Define fiducial points on the head surface. Right click on the 3D head display and select the ''Fiducials Dialog'' in the drop-down menu:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (3).gif ‎]]  [[Image:MRI Integration (4).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Rotate the head (by holding the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Shift '''&amp;lt;/span&amp;gt;button down and clicking and dragging with the mouse) so that the Nasion is clearly visible. Move the mouse to the Nasion, and press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Ctrl+Left Click'''&amp;lt;/span&amp;gt;. The coordinates of the Nasion are inserted into the dialog. Repeat for the left preauricular point, and then for the right preauricular point.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (5).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: if you have defined your fiducials differently in your BESA Research data (e.g. ear holes), click on the corresponding points in the MRI. If you have additional head surface points (step 8), accuracy in pinpointing the fiducials is not critical.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. In the Fiducials Dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Fit fiducials'''&amp;lt;/span&amp;gt; button. The head surface points are now more or less aligned to the head.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (6).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* BrainVoyagerQX. Now select '''''EEG-MEG BESA/Fit Surface Points...'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (7).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you do not see the right half of the dialog, press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Advanced &amp;gt;&amp;gt;'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Specify the distances of the digitization points from the skin. In the illustration above, the digitization points for electrodes are estimated to be 8 mm from the surface of the head. For the purpose of accurate alignment, the distance of digitization points from skin section of the dialog needs to be filled in correctly. We recommend that &amp;quot;Restrain solution around fiducials&amp;quot; is checked, and a reasonable limit (here 3 mm) of the restraint is defined. Then press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (8).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BrainVoyager fits the points to the head, stretching x, y, and z coordinates to obtain a better fit than before.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt;Note: The fit performed during this step accounts for scaling inequalities between the x, y, and z axes in the MRI. Coregistration gains in accuracy over the use of fiducials alone a) because more head surface points are used, and b) because the scaling inequalities are accounted for.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alignment is now completed. If you only want to display the structural MRI in the BESA Source Module, you can return to the BESA Coregistration Dialog.&lt;br /&gt;
* BESA Research. When you switch back to the Coregistration Dialog, BESA Research will try to fill in the names of the Talairach MRI and surface meshes. If the names are not filled in, use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse...'''&amp;lt;/span&amp;gt; buttons to select the MRI and surface meshes. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to save the Coregistration File. Alignment is completed!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The alignment steps need only be performed once for a given MRI and EEG/MEG data set. Otherwise, after starting BrainVoyager, just load the MRI, the surface mesh, and the surface points (see “[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done |How to Set Up Coregistration with BrainVoyager after Alignment has been Done]]”). Now the following actions are possible: see chapters&lt;br /&gt;
&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Co-locating_Sources_and_MRI_in_the_BESA_Research_Source_Module|How to Co-Locate Sources and MRI in the BESA Research Source Module]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Send_a_Dipole_from_BESA_Research_to_BrainVoyager|How to Send a Dipole from BESA Research to BrainVoyager]]&lt;br /&gt;
* [[Integration_with_MRI_and_fMRI#Define_a_Dipole_in_BESA_Research_at_a_Location_Defined_in_the_MRI|How to Define a Dipole in BESA Research at a Location Defined in the MRI]]&lt;br /&gt;
&lt;br /&gt;
=== MRI file Name Conventions ===&lt;br /&gt;
&lt;br /&gt;
If you follow the naming conventions for file names as described here, BESA Research detects the file names it requires, and the ''Coregistration Dialog'' is filled in automatically.&lt;br /&gt;
&lt;br /&gt;
Please note that BESA MRI automatically uses these naming conventions for the generated files.&lt;br /&gt;
&lt;br /&gt;
* '''The AC-PC MRI file name''' should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.srf'''&amp;lt;/span&amp;gt;&amp;quot;. After alignment, BrainVoyagerQX writes these names to the Coregistration File.&lt;br /&gt;
* '''The Talairach MRI file name '''should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, and the corresponding surface mesh name should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If defined, the brain surface mesh should end with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot; ('''WM''' = '''w'''hite '''m'''atter).&lt;br /&gt;
* '''How BESA Research finds the Talairach files.''' When BESA Research rereads the Coregistration File after alignment of the coordinate systems, it finds the ACPC file names and defines the corresponding TAL file names. If these files exist, the names are entered into the Coregistration Dialog. For instance, if the Coregistration File contains the name &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for the files &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL.srf'''&amp;lt;/span&amp;gt;&amp;quot;, and &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;. If these files exist, they are entered into the dialog.&lt;br /&gt;
* '''Older BrainVoyager version.''' If you use BrainVoyager.exe to align coordinate systems, the file names are not saved with the Coregistration File. In this case, browse for the Talairach or the ACPC MRI from the Coregistration Dialog. BESA Research will use the rules as described above to insert the correct file names into the dialog.&lt;br /&gt;
* '''Missing Talairach coordinates.''' If, after aligning coordinate systems, the Talairach coordinates are missing from the Coregistration File (you forgot to load the Talairach coordinates in BrainVoyagerQX, or you used BrainVoyager.exe), BESA Research will look for a file ending with &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot;, and read the coordinates from this file. You can also browse for a &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.tal&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file in the Coregistration Dialog. For instance, if the MRI file is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.vmr'''&amp;lt;/span&amp;gt;&amp;quot; or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MR_'''&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, BESA Research will look for &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI_PB_ACPC.tal'''&amp;lt;/span&amp;gt;&amp;quot; to find the Talairach coordinates.&lt;br /&gt;
* '''File names in the Coregistration File are saved relative to the Coregistration File location, if they are in the same folder.''' If the MRIs are in the same folder as the Coregistration File they will be recorded as &amp;quot;.\filename&amp;quot; (e.g. &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.\MRI PB_tal.vmr'''&amp;lt;/span&amp;gt;&amp;quot;). This means that you can copy the Coregistration File together with the MRIs and meshes to a different folder, and BESA Research will be able to locate the files when the Coregistration File is opened. If the MRIs are saved in a different folder from the Coregistration File, the absolute paths are saved in the file. If the files are moved to new locations, you will have to restart the Coregistration Dialog and redefine the file locations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== How to Generate a Brain Surface Mesh ===&lt;br /&gt;
&lt;br /&gt;
BESA Research is able to compute surface images, such as (Cortical LORETA, Cortical CLARA, Minimum Norm) using an individual cortex surface as the source space. A suitable cortex surface for this purpose can be effortlessly created using BESA MRI. Alternatively, BrainVoyager can be used for the creation of the brain surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA MRI'''&lt;br /&gt;
* The brain surface generation is performed as one work step of the BESA MRI segmentation workflow.&lt;br /&gt;
* The cortex surface reconstruction is done using a robust and accurate automatic segmentation procedure.&lt;br /&gt;
* Details on how to generate the brain surface mesh in BESA MRI can be found in the coregistration quickguide which is available on the BESA homepage (http://www.besa.de/downloads/quick-guides/).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BrainVoyager'''&lt;br /&gt;
* BrainVoyagerQX provides a semiautomatic procedure to generate meshes for the brain surface of the Talairach MRI. Please refer to the BrainVoyager Help to find out how to do this.&lt;br /&gt;
* The result of the BrainVoyager procedure is two meshes, one for the left and one for the right hemisphere.&lt;br /&gt;
* BESA Research requires a single mesh. Therefore, load first one mesh (''Meshes/Load Mesh..''.), and append the other mesh (''Meshes/Add Mesh...''). Merge these two meshes (''Meshes/Merge'' ''meshes in surface window'') and then save the result (''Meshes/Save Mesh...''). If possible, use the recommended name conventions for the resulting file (file name ends in &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_TAL_WM.srf&amp;quot;). '''&amp;lt;/span&amp;gt;For instance, if the Talairach MRI is named &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL.vmr'''&amp;lt;/span&amp;gt;&amp;quot;, name the brain surface mesh &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MRI PB_TAL_WM.srf'''&amp;lt;/span&amp;gt;&amp;quot;.&lt;br /&gt;
* See also the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website (http://brainvoyager.com/Downloads.html).&lt;br /&gt;
&lt;br /&gt;
==  Co-locating Dipoles and MRI Locations ==&lt;br /&gt;
&lt;br /&gt;
=== Co-locating Sources and MRI in the BESA Research Source Module ===&lt;br /&gt;
&lt;br /&gt;
If the alignment procedure using BESA MRI (or BrainVoyager) has been completed then you can load the individual structural MRI in the Source Module by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''A''''&amp;lt;/span&amp;gt; or using a mouse right click and selecting '''''Display MRI'''''.&lt;br /&gt;
&lt;br /&gt;
Sources in the current model are then overlayed onto the individual MRI.&lt;br /&gt;
&lt;br /&gt;
A double-click at any location in the MRI will define a new source at the corresponding location in the BESA Research head model.&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (9).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
=== Coregistration with BrainVoyager after Alignment has been Done ===&lt;br /&gt;
&lt;br /&gt;
Alignment between BESA Research and BrainVoyager is only required once for a given BESA Research data set and the corresponding MRI. At a later time, if you want to Co-locate sources between BESA Research and BrainVoyager, perform the following steps in BrainVoyager:&lt;br /&gt;
* Load the MRI.&lt;br /&gt;
* Load the head surface mesh (''Meshes/Load Mesh..''.).&lt;br /&gt;
* Load the Coregistration File (''EEG-MEG BESA/Load Surface Points..''.).&lt;br /&gt;
&lt;br /&gt;
BrainVoyager is now ready for Co-location.&lt;br /&gt;
&lt;br /&gt;
=== Send a Dipole from BESA Research to BrainVoyager ===&lt;br /&gt;
&lt;br /&gt;
First, start BrainVoyager(QX). This can be done from the BESA Research Source Module by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager '''&amp;lt;/span&amp;gt;button. Note that in the Source Module, the ''Options / Preferences / BrainVoyager'' tab allows to define the path to BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
In BrainVoyager, [[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|set up coregistration]].&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, highlight the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
In the BESA Research Source Module, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''BrainVoyager'''&amp;lt;/span&amp;gt; button.&lt;br /&gt;
&lt;br /&gt;
Program control will automatically switch to BrainVoyager. The head will be cut at the section corresponding to the dipole of interest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (10).gif‎|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that all dipoles in the current model are sent to BrainVoyager. The highlighted dipole (here, the red dipole) determines the plane at which the head will be cut.&lt;br /&gt;
&lt;br /&gt;
Note that the dipoles are visible in both the surface module and in the 2D view:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (11).gif|400px]]&lt;br /&gt;
&lt;br /&gt;
=== Define a Dipole in BESA Research at a Location Defined in the MRI ===&lt;br /&gt;
&lt;br /&gt;
First set up coregistration (see chapter ''“[[Integration_with_MRI_and_fMRI#Coregistration_with_BrainVoyager_after_Alignment_has_been_Done|Coregistration with BrainVoyager after Alignment has been Done]]”'').&lt;br /&gt;
&lt;br /&gt;
In the BrainVoyager 2D MRI view, place the mouse over the point at which you would like to define a dipole. Right click at this point. If this point lies within an fRMI cluster, BrainVoyager will automatically determine its center and use it as a seeding point instead. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send Seed Point To BESA....'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (12).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
The following Dialog is opened:&lt;br /&gt;
&lt;br /&gt;
[[Image:MRI Integration (13).gif ‎]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Send to BESA'''&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;.&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The BESA Source Analysis window appears. The new dipole or regional source (depending on the setting in the ‘Options’ dialog in the Source Analysis window is now displayed at the corresponding location. If a dipole is seeded, BESA automatically fits its orientation. For further adjustment of the model, you may need to refit the orientation, e.g. at a certain time range, or in the presence of other sources.&lt;br /&gt;
&lt;br /&gt;
Detailed instructions on (f)MRI import and processing in Brain Voyager is provided by the '''BrainVoyager Getting Started Guide''' that can be downloaded from the Brain Innovation website ([http://brainvoyager.com/Downloads.html http://brainvoyager.com/Downloads.html]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== The Coregistration File (*.sfh) ===&lt;br /&gt;
&lt;br /&gt;
This file is used to mediate between BESA Research and BESA MRI (or BrainVoyager(QX)). When it is first written by BESA Research, it contains a list of the digitized head surface points (fiducials, electrodes, other digitized points), e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
NrOfPoints: 68&lt;br /&gt;
 Fid_Nz                    0.00000     103.10000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T9                  -78.40000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Fid_T10                  73.00000       0.00000       0.00000   3 255  128  255&lt;br /&gt;
 Ele_E1                  -28.70000      23.90000     122.30000   3 255    0    0&lt;br /&gt;
 Ele_E2                  -80.40000      19.80000      75.90000   3 255    0    0&lt;br /&gt;
 Ele_E3                  -84.00000      37.90000       9.00000   3 255    0    0&lt;br /&gt;
 Ele_E4                  -17.60000      92.90000      89.10000   3 255    0    0&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
 Ele_E63                  -6.80000    -104.00000      54.40000   3 255    0    0&lt;br /&gt;
 Ele_E64                 -42.80000     -46.90000     115.60000   3 255    0    0&lt;br /&gt;
 Ele_Cz'                  -2.10000       2.20000     131.10000   3 255    0    0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each line contains a label, the coordinates in the Head Coordinate system, and parameters specifying the size and color of the sensor or head surface point as displayed in BESA MRI (or BrainVoyager).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After aligning the coordinate systems, BESA MRI (or BrainVoyagerQX) appends lines defining the transformation between the BESA Research and the MRI coordinate systems:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Trans-data(in BV-coords): 3 translation, 3 rotation (in grad), 3 scale&lt;br /&gt;
37.435 15.811 2.820 0.025 1.938 8.779  1.009 0.973 0.977&lt;br /&gt;
Fiducials:&lt;br /&gt;
41.7873  148.0180  128.0844&lt;br /&gt;
154.7772  169.4783  204.1080&lt;br /&gt;
147.0154  168.9746  54.1266&lt;br /&gt;
Midpoint (in BV-coords):&lt;br /&gt;
128.0000  128.0000  128.0000&lt;br /&gt;
Volume:  C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.vmr&lt;br /&gt;
Surface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_acpc.srf&lt;br /&gt;
AC: 128 128 128&lt;br /&gt;
PC: 154 128 128&lt;br /&gt;
AP: 58 128 128&lt;br /&gt;
PP: 241 129 130&lt;br /&gt;
SP: 154 50 128&lt;br /&gt;
IP: 128 172 128&lt;br /&gt;
RP: 128 128 60&lt;br /&gt;
LP: 165 128 198&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Older versions of BrainVoyager.exe do not append the lines starting with &amp;quot;Volume&amp;quot;. In addition, the Talairach coordinates (starting at &amp;quot;AC: ...&amp;quot;) are not appended if they were not loaded in BrainVoyagerQX.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, when the Coregistration Dialog in BESA Research has found the Talairach MRI and surface meshes, and you press the OK button, BESA Research appends the additional file names:&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TalVolume: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.vmr&lt;br /&gt;
TalSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal.srf&lt;br /&gt;
TalBrainSurface: C:\BESA\Examples\ERP P300-Auditory\MRI_PB_tal_wm.srf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA MRI already inserts the correct file names into the coregistration file when doing the coregistration. When also an EEG or MEG  FEM head model is generated then additional lines are appended to the coregistration file containing the file names of the generated FEM data files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MRI Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend a high quality T1-weighted anatomical image with 1 mm³ voxels (e.g. 256 x 256 saggital scan with 1 mm spacing).&lt;br /&gt;
&lt;br /&gt;
In order to define the surface mesh, a clear contrast between the head surface and the outside of the head (T1-weighting) is required. Noise and measurement artifacts can influence the representation of the scalp surface. When doing the coregistration in BrainVoyager improvements in noisy images often can be achieved by cleaning up the image after first reading it using the tools provided by BrainVoyager.&lt;br /&gt;
&lt;br /&gt;
For coregistration with head surface points, it is useful to include the whole head in the image, including nose and ears. If surface points on the nose are included with the EEG/MEG data set, these points help to stabilize the fit of head surface points to the surface mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EEG/MEG Data Requirements for Good Coregistration ===&lt;br /&gt;
&lt;br /&gt;
We recommend several (30 or more) digitized head surface points in addition to the fiducials, including points on the nose (nose tip and sides). These points may include electrodes. In the case of electrodes, it is important to measure the distance from the scalp to the digitization point, i.e. the electrode thickness.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Paradigm_File_Format_in_BESA</id>
		<title>Paradigm File Format in BESA</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Paradigm_File_Format_in_BESA"/>
				<updated>2021-05-06T06:38:39Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== General remarks ==&lt;br /&gt;
A paradigm description file (“PDG file”) contains the information which is relevant for describing an experimental setup in terms of the stimulation and response events that occurred. To describe the experimental paradigm, three terms are introduced:&lt;br /&gt;
# An '''attribute''' is used to group trigger events into a certain class. For example, in an auditory experiment, triggers could be grouped according to an attribute “modality” to distinguish stimulation and response, and another attribute “side” to distinguish left and right.&lt;br /&gt;
# An '''attribute value''' defines how a trigger event is classified in the class defined by an attribute. For example, the trigger with the code 1 could be a tone stimulus, and the trigger with the code 2 could be the subject’s response. That means that for the “modality” attribute, trigger 1 would receive an attribute value “tone”, whereas trigger 2 would receive an attribute value “response”.&lt;br /&gt;
# A '''condition''' defines which trigger events form the set of events that should be averaged. For example, this could simply be all trigger events with the modality “tone”, or all trigger events which have the modality “response”, and follow a trigger event with the modality “tone”.&lt;br /&gt;
&lt;br /&gt;
The PDG file is written in ASCII format and can thus be viewed and edited in any text editor. It is subdivided into a maximum of 9 sections:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #f9f9f9; border: solid thin lightgrey;&amp;quot;&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;140pt&amp;quot; | [Attributes] || Attributes which are used to group the trigger events. This section is mandatory.&lt;br /&gt;
|-&lt;br /&gt;
| [Values] || A table of attribute values which are defined for the triggers used in the experiment.&lt;br /&gt;
|-&lt;br /&gt;
| [Names] || Names of conditions which are defined in detail in section 8&lt;br /&gt;
|-&lt;br /&gt;
| [Epochs] || For each condition, averaging epochs, baseline epochs, and some other epochs are defined.&lt;br /&gt;
|-&lt;br /&gt;
| [Thresholds] || Threshold settings used for artifact rejection&lt;br /&gt;
|-&lt;br /&gt;
| [Averaging] || Defines which conditions are selected for averaging&lt;br /&gt;
|-&lt;br /&gt;
| [Filter] || Filter settings for averaging&lt;br /&gt;
|-&lt;br /&gt;
| [TimeFrequency] || Settings for time-frequency analysis&lt;br /&gt;
|-&lt;br /&gt;
| [Selections] || Each condition is written here as a statement using Boolean logic.&lt;br /&gt;
|-&lt;br /&gt;
| [ArtifactScan] || The artifact scan results are written here.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most sections can be omitted; their entries are then filled with default values. The default settings are given in the detailed description (see below). The most relevant sections for describing an experiment are '''Attributes''', '''Values''', and '''Selections'''.&lt;br /&gt;
&lt;br /&gt;
Connection to BESA paradigm editing tool:&lt;br /&gt;
Sections 1 and 2 define entries in the “Trigger” tab. &lt;br /&gt;
Sections 3 and 9 define entries in the “Condition” tab. &lt;br /&gt;
Section 4 defines entries in the “Epoch” tab. &lt;br /&gt;
Sections 5 and 10 define entries in the “Artifact” tab.&lt;br /&gt;
Section 6 defines entries in the “Average” tab.&lt;br /&gt;
Section 7 defines entries in the “Filter” tab.&lt;br /&gt;
Section 8 defines entries in the “Coherence” tab (if available).&lt;br /&gt;
&lt;br /&gt;
All values can be edited in the respective tabs of the paradigm editing tool.&lt;br /&gt;
&lt;br /&gt;
== Detailed description of the sections ==&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
This section is mandatory.&lt;br /&gt;
It holds the attributes which are used to group the trigger events. The first attribute is always the trigger code (“code”). Attributes are separated by a tabulator. By default, the ERP module defines a second attribute “name” which can take trigger names as attribute values.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Attributes]&lt;br /&gt;
code	name	modality&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Values ===&lt;br /&gt;
This section holds a table of attribute values which are defined for the triggers used in the experiment. Each row defines one trigger. The first column holds the trigger codes, since the trigger code is the only mandatory attribute. The second column holds the values for the second attribute (default in the ERP module: name), and so on. If no value is defined for an attribute, “NULL” is entered. For trigger codes which are not listed, no values are defined.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Values]&lt;br /&gt;
0	NULL	NULL&lt;br /&gt;
1	tone	auditory&lt;br /&gt;
2	rare	auditory&lt;br /&gt;
3	frequent	auditory&lt;br /&gt;
128	response	motor&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The trigger with code 0 has no values defined, the trigger with code 1 has the name “tone” and the modality “auditory”, and so on.&lt;br /&gt;
&lt;br /&gt;
=== Names ===&lt;br /&gt;
This section holds the names of conditions which are defined in detail in the section “Selections”. It is not necessary to give names to conditions. By default, conditions are simply named “Condition 1” through “Condition 32”. If a name is given, it is followed by the zero-based index of the condition it refers to. This enables mixing of conditions with user-given names and conditions with default names.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Names]&lt;br /&gt;
target	0&lt;br /&gt;
hit	1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first condition obtains the name “target”, the second one obtains the name “hit”.&lt;br /&gt;
&lt;br /&gt;
=== Epochs ===&lt;br /&gt;
This section holds the averaging epochs for each condition. Furthermore, additional epochs can be specified. Each epoch is defined by a floating point value which gives the pre-stimulus interval in milliseconds (ms), and a second floating point value which gives the post-stimulus interval in ms. Epochs are given in the following order:&lt;br /&gt;
&lt;br /&gt;
* '''Averaging epoch''': The epoch used for averaging&lt;br /&gt;
* '''Baseline epoch''': The epoch over which the baseline is calculated&lt;br /&gt;
* '''Epoch used for artifact rejection''': The epoch in which the data are checked for artifacts&lt;br /&gt;
* '''Stimulus artifact epoch''': An epoch where a stimulus artifact occurred. This epoch is interpolated over before artifact rejection takes place&lt;br /&gt;
* '''Stimulus delay''': Only one value. This value gives the delay of the stimulus relative to the trigger event (e.g. when tactile stimulation is performed, where air pressure builds up after the trigger was set).&lt;br /&gt;
&lt;br /&gt;
Not all epochs have to be provided. If the epochs list for a condition is incomplete, default values are used.&lt;br /&gt;
&lt;br /&gt;
By default, the following values are used:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Epoch&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Pre-stimulus value&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Post-stimulus value&lt;br /&gt;
|-&lt;br /&gt;
| Averaging&lt;br /&gt;
| -100&lt;br /&gt;
| 500&lt;br /&gt;
|-&lt;br /&gt;
| Baseline&lt;br /&gt;
| -100&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| Artifact rejection  &lt;br /&gt;
| -100&lt;br /&gt;
| 500&lt;br /&gt;
|-&lt;br /&gt;
| Stimulus artifact  &lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| Stimulus delay  &lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Epochs]&lt;br /&gt;
-500.0	1000.0	-100.0	0.0	-500.0	1000.0	0.0	0.0	0.0&lt;br /&gt;
-800.0	500.0	-800.0	-700.0	-800.0	500.0	0.0	0.0	0.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first condition is averaged from 500 ms before the trigger event to 1000 ms after the trigger event. Baseline is calculated in the pre-stimulus interval between 100 ms before the trigger event and the trigger event. Artifacts are rejected between –500 ms and +1000 ms, i.e. over the entire averaging epoch. No stimulus artifact interval and no stimulus delay is given.&lt;br /&gt;
&lt;br /&gt;
For the second condition, averaging and artifact rejection are set to –800...500 ms, and baseline calculation is performed in the interval from –800 ms to –700 ms. Again, no stimulus artifact interval, and no stimulus delay is given.&lt;br /&gt;
&lt;br /&gt;
=== Thresholds ===&lt;br /&gt;
This section holds values for artifact rejection. It can hold two sets of values. The first set contains settings for the color normalization of the BESA artifact scan tool. These values are not directly used for artifact rejection, but merely for visual control if the BESA artifact scan tool is used for artifact rejection. &lt;br /&gt;
&lt;br /&gt;
The line following the first set of values contains either the string &amp;lt;code&amp;gt;AUTO_REJECT&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;MANUAL_REJECT&amp;lt;/code&amp;gt;.&lt;br /&gt;
The second set contains settings for automatic rejection of artifacts. It is used if the preceding line contains the string &amp;lt;code&amp;gt;AUTO_REJECT&amp;lt;/code&amp;gt;. Otherwise, only artifacts which were manually marked in the data are excluded from the averaging process.&lt;br /&gt;
&lt;br /&gt;
The following table gives the order of the entries in the thresholds section:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Line #&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | First column&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Second column&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Max. amplitude in EEG [µV] (display)&lt;br /&gt;
| Max. amplitude in MEG [fT or fT/cm] (display)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Square root of variance of gradient in EEG (display)&lt;br /&gt;
| Square root of variance of gradient in MEG (display)&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Max. gradient in EEG (display)&lt;br /&gt;
| Max. gradient in MEG (display)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| AUTO_REJECT or MANUAL_REJECT&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Max. amplitude in EEG [µV] (for rejection)&lt;br /&gt;
| Max. amplitude in MEG [fT or fT/cm] (for rejection)&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Square root of variance of gradient in EEG (for rejection)&lt;br /&gt;
| Square root of variance of gradient in MEG (for rejection)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Max. gradient in EEG (for rejection)&lt;br /&gt;
| Max. gradient in MEG (for rejection)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If no values are given , the following values are used by default:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Threshold type&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | EEG&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | MEG&lt;br /&gt;
|-&lt;br /&gt;
| Max. amplitude&lt;br /&gt;
| 100 µV&lt;br /&gt;
| 1000 fT or fT/cm (depending on data)&lt;br /&gt;
|-&lt;br /&gt;
| Variance of gradient&lt;br /&gt;
| 0.001 µV/∂T&lt;br /&gt;
| 64 fT/∂T or 64 fT/(∂T cm) (depending on data)&lt;br /&gt;
|-&lt;br /&gt;
| Max. gradient&lt;br /&gt;
| 75 µV/∂T&lt;br /&gt;
| 800 fT/∂T or fT/(cm ∂T) (depending on data)&lt;br /&gt;
|}&lt;br /&gt;
The unit &amp;amp;part;T stands for the sampling interval.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Thresholds]&lt;br /&gt;
100.0	1000.0&lt;br /&gt;
0.001	64.000&lt;br /&gt;
75.0	800.0&lt;br /&gt;
AUTO_REJECT&lt;br /&gt;
100.0	1000.0&lt;br /&gt;
0.001	64.000&lt;br /&gt;
75.0	800.0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Automatic artifact rejection is active. The rejection thresholds are:&lt;br /&gt;
&lt;br /&gt;
* 100 µV for EEG amplitude, &lt;br /&gt;
* 1000 fT for MEG amplitude, &lt;br /&gt;
* µV/&amp;amp;part;T for the square root of the variance of the gradient of the EEG signal, &lt;br /&gt;
* 64 fT/&amp;amp;part;T for the square root of the variance of the gradient of the MEG signal, &lt;br /&gt;
* 75 µV/&amp;amp;part;T for the gradient of the EEG amplitude, and &lt;br /&gt;
* 800 fT/&amp;amp;part;T for the gradient of the MEG amplitude.&lt;br /&gt;
&lt;br /&gt;
The display thresholds for the BESA artifact scan tool are set to the same values.&lt;br /&gt;
&lt;br /&gt;
Rejection behavior:&lt;br /&gt;
&lt;br /&gt;
A sweep is rejected from averaging if:&lt;br /&gt;
&lt;br /&gt;
* The signal exceeds the max. amplitude threshold at any sampling point in any of the “good” channels.&lt;br /&gt;
* The variance of the gradient of the signal, taken over the whole sweep, does not exceed the variance threshold in any of the “good” channels. This criteria is especially useful for MEG channels, where channels may show a flat signal temporarily during the measurement.&lt;br /&gt;
* The gradient of the signal exceeds the max. gradient threshold at any sampling point in any of the “good” channels.&lt;br /&gt;
&lt;br /&gt;
=== Averaging ===&lt;br /&gt;
This section holds the conditions which are selected for averaging, and further information about whether all sweeps or a sub-set will be averaged.&lt;br /&gt;
&lt;br /&gt;
The first line holds the number of conditions currently selected (N). If N=0 or if the section is not present, all conditions which have at least 1 matching trigger event are automatically selected for averaging.&lt;br /&gt;
&lt;br /&gt;
The next N lines are organized as follows:&lt;br /&gt;
&lt;br /&gt;
Column 1: 1 if the condition is selected and activated, 0 if it is selected, but not activated.&lt;br /&gt;
&lt;br /&gt;
Column 2: Zero-based index of the condition.&lt;br /&gt;
&lt;br /&gt;
Column 3: Information about whether all sweeps or a sub-set will be averaged, encoded bit-wise:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Bit&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | If set:&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Average all matching sweeps&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Average every second matching sweep (even)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Average every second matching sweep (odd)&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Average the first half of matching sweeps&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Average the second half of matching sweeps&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If more than one bit is set, a different averaging buffer will be created for each sub-set.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Averaging]&lt;br /&gt;
1&lt;br /&gt;
1	1	9&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One condition was selected. The second condition (condition index 1) is selected and activated, and two buffers will be averaged: the first buffer for all matching sweeps (bit 0 set), the second buffer for the first half of matching sweeps (bit 3 set).&lt;br /&gt;
&lt;br /&gt;
=== Filter ===&lt;br /&gt;
This section holds filter settings which were chosen for averaging. The following table gives the possible settings.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Line #&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Filter type&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Column 1&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Column 2&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Column 3&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Column 4&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| High pass&lt;br /&gt;
| Frequency [Hz]&lt;br /&gt;
| Slope (see below)&lt;br /&gt;
| Type (see below)&lt;br /&gt;
| 1 if filter is applied,&lt;br /&gt;
0 if not applied&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Low pass&lt;br /&gt;
| Frequency [Hz]&lt;br /&gt;
| Slope (see below)&lt;br /&gt;
| Type (see below)&lt;br /&gt;
| 1 if filter is applied,&lt;br /&gt;
0 if not applied&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Notch&lt;br /&gt;
| Frequency [Hz]&lt;br /&gt;
| Width [Hz]&lt;br /&gt;
| TRUE if on,&lt;br /&gt;
FALSE if off&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Band pass&lt;br /&gt;
| Frequency [Hz]&lt;br /&gt;
| Width [Hz]&lt;br /&gt;
| TRUE if on,&lt;br /&gt;
FALSE if off&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Polygraphic channels&lt;br /&gt;
| TRUE if polygraphic channels unfiltered,&lt;br /&gt;
FALSE if filtered like EEG/MEG channels&lt;br /&gt;
| TRUE if polygraphic channels rectified,&lt;br /&gt;
FALSE if not rectified&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Selected channels&lt;br /&gt;
| TRUE if selected channels differentiated,&lt;br /&gt;
FALSE if not differentiated&lt;br /&gt;
| TRUE if selected channels rectified,&lt;br /&gt;
FALSE if not rectified&lt;br /&gt;
| TRUE if selected channels smoothed,&lt;br /&gt;
FALSE if not smoothed&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| High pass,&lt;br /&gt;
Low pass&lt;br /&gt;
| TRUE if high pass filter applied to artifact scan, &lt;br /&gt;
FALSE if not&lt;br /&gt;
| TRUE if low pass filter applied to artifact scan, &lt;br /&gt;
FALSE if not&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The parameters Slope and Type are set to one of the following values:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Slope value in file&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Corresponding filter slope [dB/Oct]&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 6&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 12&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 24&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 48&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Type value in file&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Corresponding filter type&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Zero phase&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Forward&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Backward&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If any of the required settings are missing, the filters that are currently set in the data file are used for averaging.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Filter]&lt;br /&gt;
0.200000	0	1	1&lt;br /&gt;
75.000000	1	0	0&lt;br /&gt;
0.000000	1.000000	FALSE&lt;br /&gt;
75.000000	7.500000	FALSE&lt;br /&gt;
FALSE	FALSE&lt;br /&gt;
FALSE	FALSE	FALSE&lt;br /&gt;
TRUE		FALSE&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The filters are set as follows:&lt;br /&gt;
&lt;br /&gt;
High pass at 0.2 Hz, 6 db/Oct, forward filtering, activated.&lt;br /&gt;
&lt;br /&gt;
Low pass at 75.0 Hz, 12 db/Oct, zero phase filtering, not activated&lt;br /&gt;
&lt;br /&gt;
Notch filter at 0 Hz, width 1 Hz, not activated&lt;br /&gt;
&lt;br /&gt;
Band pass filter at 75 Hz, width 7.5 Hz, not activated&lt;br /&gt;
&lt;br /&gt;
Polygraphic channels are filtered like the EEG and MEG channels. They are not rectified.&lt;br /&gt;
&lt;br /&gt;
Selected channels are not differentiated, not rectified, and not smoothed.&lt;br /&gt;
&lt;br /&gt;
High pass filter is also activated for the artifact scan, and low pass filter is not activated for the artifact scan.&lt;br /&gt;
&lt;br /&gt;
So, the only filter that will be applied to the data for both averaging and artifact scan is the high pass filter at 0.2 Hz.&lt;br /&gt;
&lt;br /&gt;
The last line holds activation settings for the artifact scan. Thus, it is possible to activate or de-activate filters solely for the artifact scan.&lt;br /&gt;
&lt;br /&gt;
=== TimeFrequency ===&lt;br /&gt;
This section holds the settings of the Time-Frequency dialog. It is only read if the time-frequency module is loaded. The following values are stored:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Line # &lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | First column&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Second column&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | Third column&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| ID for analysis type:&lt;br /&gt;
0: time-frequency&lt;br /&gt;
1: mean coherence&lt;br /&gt;
2: coherence&lt;br /&gt;
| ID for coherence computation type:&lt;br /&gt;
2: fixed reference channel&lt;br /&gt;
6: any reference channel. Currently, &lt;br /&gt;
this value is always used.&lt;br /&gt;
| Channel index in case a fixed &lt;br /&gt;
reference channel was used. Currently, &lt;br /&gt;
this value is meaningless.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Reduced sampling interval (in microseconds) &lt;br /&gt;
after time-frequency transformation&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Index of the condition which&lt;br /&gt;
was chosen as target condition&lt;br /&gt;
| TRUE if a control condition was specified, &lt;br /&gt;
FALSE if not&lt;br /&gt;
| Index of the control condition if a&lt;br /&gt;
control condition was specified, &lt;br /&gt;
or -1 if no condition was specified&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| ID for option of regional source usage:&lt;br /&gt;
0: radial orientation (not available for MEG)&lt;br /&gt;
1: all traces are taken&lt;br /&gt;
2: orientation which maximizes power is taken (not yet available)&lt;br /&gt;
3: first orientation is taken (interesting for oriented sources)&lt;br /&gt;
| TRUE if a Gaussian FIR filter is used &lt;br /&gt;
for complex demodulation (default),&lt;br /&gt;
FALSE if a non-Gaussian FIR filter is used &lt;br /&gt;
for complex demodulation&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Index for the frequency spacing &lt;br /&gt;
that is used (index of the array entry &lt;br /&gt;
in the combo box array of the dialog box)&lt;br /&gt;
| ID for bandwidth of the&lt;br /&gt;
demodulation filter that was chosen.&lt;br /&gt;
2: 2 frequency spacings&lt;br /&gt;
4: 4 frequency spacings (default)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| ID for lower frequency cutoff index &lt;br /&gt;
(index of the array entry in the combo box&lt;br /&gt;
array of the dialog box)&lt;br /&gt;
| Value of lower frequency cutoff in Hz&lt;br /&gt;
| ID for higher frequency cutoff (index &lt;br /&gt;
of the array entry in the combo box array &lt;br /&gt;
of the dialog box)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| ID for the range in which mean coherence is &lt;br /&gt;
computed (currently not used):&lt;br /&gt;
1: whole data set&lt;br /&gt;
2: all epochs&lt;br /&gt;
3: epochs with a specific label&lt;br /&gt;
| ID of the epoch which was chosen for mean &lt;br /&gt;
coherence computation (currently not used)&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[TimeFrequency]&lt;br /&gt;
2	6	0&lt;br /&gt;
25000.000000&lt;br /&gt;
2	FALSE	-1&lt;br /&gt;
0	TRUE&lt;br /&gt;
4	4&lt;br /&gt;
3	4.000000	6&lt;br /&gt;
1	0&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
In this example, the values have the following meaning:&lt;br /&gt;
&lt;br /&gt;
1st line: Coherence analysis with any reference channel possible. &lt;br /&gt;
&lt;br /&gt;
2nd line: The reduced sampling interval after Time-frequency transformation is 25 ms, i.e. 25000 µs.&lt;br /&gt;
&lt;br /&gt;
3rd line: Target condition has condition index 2, no control condition was specified.&lt;br /&gt;
&lt;br /&gt;
4th line: For regional sources, the radial orientation is taken. The Gaussian FIR filter is used.&lt;br /&gt;
&lt;br /&gt;
5th line: Array entry with index 4 was chosen for the frequency spacing. The demodulation filter is calculated for a bandwidth of 4 frequency spacings.&lt;br /&gt;
&lt;br /&gt;
6th line: Array entry with index 3 was chosen for the lower frequency cutoff. The lower cutoff frequency is 4 Hz. Array entry with index 6 was chosen for the higher frequency cutoff.&lt;br /&gt;
&lt;br /&gt;
7th line: (currently not used) For mean coherence analysis, the whole data set is used. The epoch length of each epoch is given by array index 0.&lt;br /&gt;
&lt;br /&gt;
=== Selections ===&lt;br /&gt;
This section holds the definition of conditions in boolean logic. Each line corresponds to either a logic statement, a bracket, or a boolean operator. Conditions are separated by blank lines. There are no default settings for this section.&lt;br /&gt;
&lt;br /&gt;
Tokens are written in uppercase. &lt;br /&gt;
&lt;br /&gt;
A statement consists of &lt;br /&gt;
* a qualifier that can be either CURRENT, PREVIOUS, or NEXT depending on which trigger event is tested&lt;br /&gt;
* an attribute (e.g. code, name, interval, ...)&lt;br /&gt;
* a comparison operator (IS, IS NOT, IS MORE THAN, IS LESS THAN)&lt;br /&gt;
* a value (e.g. “tone”, 300ms, ...)&lt;br /&gt;
Operators can be AND, OR. Bracketing is also possible.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Selections]&lt;br /&gt;
CURRENT.name IS &amp;quot;tone&amp;quot;&lt;br /&gt;
&lt;br /&gt;
CURRENT.name IS &amp;quot;response&amp;quot;&lt;br /&gt;
AND&lt;br /&gt;
PREVIOUS.name IS &amp;quot;tone&amp;quot;&lt;br /&gt;
AND&lt;br /&gt;
PREVIOUS.interval IS LESS THAN 300ms&lt;br /&gt;
&lt;br /&gt;
CURRENT.name IS &amp;quot;response&amp;quot;&lt;br /&gt;
AND&lt;br /&gt;
(&lt;br /&gt;
PREVIOUS.name IS &amp;quot;rare&amp;quot;&lt;br /&gt;
OR&lt;br /&gt;
PREVIOUS.name IS &amp;quot;frequent&amp;quot;&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example contains 3 conditions. &lt;br /&gt;
&lt;br /&gt;
The first one selects all trigger events with the value “tone” for the attribute “name”. &lt;br /&gt;
&lt;br /&gt;
The second one selects all trigger events with the value “response” for the attribute “name” which are preceded by trigger events with the name “tone” with an interval between the two of less than 300ms. &lt;br /&gt;
&lt;br /&gt;
The third one selects all trigger events with the name “response” which are preceded by either a trigger event with the name “rare” or a trigger event with the name “frequent”. The bracket is important; without the bracket, the order of testing is changed, with a possibly different result.&lt;br /&gt;
&lt;br /&gt;
=== Artifact Scan ===&lt;br /&gt;
This section holds the results of an artifact scan. They are plotted in the artifact tab central window. For each epoch which was scanned, all values are written. The format contains 4 header lines, followed by 4 lines for each epoch:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #f9f9f9; border: solid thin lightgrey;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1: &amp;lt;Number of EEG channels&amp;gt; &amp;lt;Number of magnetometer or axial gradiometer channels&amp;gt; &amp;lt;Number of planar gradiometer channels&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 2: &amp;lt;Channel badness flag for channel 1&amp;gt; &amp;lt;Channel badness flag for channel 2&amp;gt; … &amp;lt;Channel badness flag for channel N&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The channel badness flag is set as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | 0&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | not bad or bad due to user interaction&lt;br /&gt;
|-&lt;br /&gt;
| bit 0 set:&lt;br /&gt;
| bad due to minimum signal/variance crit., max.&lt;br /&gt;
|-&lt;br /&gt;
| bit 1 set:&lt;br /&gt;
| bad due to amplitude criterion, integral crit.&lt;br /&gt;
|-&lt;br /&gt;
| bit 2 set:&lt;br /&gt;
| bad due to amplitude criterion, max. crit.&lt;br /&gt;
|-&lt;br /&gt;
| bit 3 set:&lt;br /&gt;
| bad due to gradient criterion, integral crit.&lt;br /&gt;
|-&lt;br /&gt;
| bit 4 set:&lt;br /&gt;
| bad due to gradient criterion, max. crit.&lt;br /&gt;
|-&lt;br /&gt;
| bit 5 set:&lt;br /&gt;
| bad due to minimum signal/variance crit., int.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Line 3: &amp;lt;Number of conditions&amp;gt;&amp;lt;index of first condition in list&amp;gt;&amp;lt;index of 2nd condition in list&amp;gt;…&amp;lt;index of last condition in list&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The list is the artifact scan list of conditions. &lt;br /&gt;
&lt;br /&gt;
Line 4: &amp;lt;Start of scanned range (position in microseconds)&amp;gt;&amp;lt;end of scanned range (position in microseconds&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The remaining lines come in groups of 4. Each group contains the settings for one epoch. For each epoch:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #f9f9f9; border: solid thin lightgrey;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1: &amp;lt;artifact scan list index&amp;gt;&amp;lt;position in microseconds&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The artifact scan list index is not necessarily the same as the condition index. It is possible that no artifact scan list index exists for a condition index, e.g. if no matches were found for a condition. The artifact scan list index runs from 0 to the number of conditions for which a scan was performed. The relation to the real condition index is given by the header line 3.&lt;br /&gt;
&lt;br /&gt;
Line 2: &amp;lt;max_amp_in_channel1&amp;gt;&amp;lt; max_amp_in_channel2&amp;gt;…&amp;lt; max_amp_in_channelN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 3: &amp;lt;variance_in_channel1&amp;gt;&amp;lt;variance_in_channel2&amp;gt;…&amp;lt;variance_in_channelN&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 4: &amp;lt;max_gradient_in_channel1&amp;gt;&amp;lt; max_gradient_in_channel2&amp;gt;…&amp;lt; max_gradient_in_channelN&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
Please note that one color denotes one line in the PDG-file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: #f9f9f9; border: solid thin lightgrey;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[ArtifactScan]&lt;br /&gt;
&lt;br /&gt;
{{font color|blue|65	0	0}}&lt;br /&gt;
&lt;br /&gt;
{{font color|red|0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0}}&lt;br /&gt;
	&lt;br /&gt;
{{font color|red|0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0}}	&lt;br /&gt;
&lt;br /&gt;
{{font color|red|0	0	0	8	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0}}	&lt;br /&gt;
&lt;br /&gt;
{{font color|red|0	0	0	0	0}}&lt;br /&gt;
&lt;br /&gt;
{{font color|deeppink|2	1	2}}&lt;br /&gt;
&lt;br /&gt;
{{font color|green|0.000000	319120000.000000}}&lt;br /&gt;
&lt;br /&gt;
{{font color|blue|0	7700000.00}}&lt;br /&gt;
&lt;br /&gt;
{{font color|red|6.71 18.46 44.48 23.50 48.68 24.34 60.42 13.43 20.14 44.48 21.82 60.42 25.18 62.94 15.11 35.25 18.46 36.93 51.19 32.73 41.96 16.78 35.25}} &lt;br /&gt;
&lt;br /&gt;
{{font color|red|20.14 26.02 4.20 35.25 12.59 35.25 21.82 33.57 21.82 7.55 15.95 34.41 31.89 31.89 16.78 27.69 28.53 36.09 11.75 29.37 46.16 19.30 24.34 10.91}} &lt;br /&gt;
&lt;br /&gt;
{{font color|red|26.86 19.30 31.05 7.55 22.66 36.93 33.57 37.77 27.69 21.82 10.91 28.53 34.41 48.68 27.69 27.69 15.95 0.00}} &lt;br /&gt;
&lt;br /&gt;
{{font color|deeppink|1.04 5.87 14.84 4.36 13.35 4.95 12.75 3.38 5.63 13.72 3.78 17.54 4.54 13.11 2.97 14.77 2.69 16.07 10.95 8.41 8.39 4.74 14.73 1.92 6.49 0.65}} &lt;br /&gt;
&lt;br /&gt;
{{font color|deeppink|7.46 1.51 15.48 3.92 9.27 4.01 0.89 3.29 10.13 9.02 11.43 3.75 6.81 6.77 7.77 1.39 9.51 25.05 4.51 6.36 1.27 5.50 4.19 10.37 0.91 5.93 11.32}} &lt;br /&gt;
&lt;br /&gt;
{{font color|deeppink|8.88 9.77 9.11 6.51 1.79 7.68 10.50 14.24 8.82 8.22 2.95 0.00}} &lt;br /&gt;
&lt;br /&gt;
{{font color|green|2.52 6.71 10.07 5.04 8.39 5.04 10.07 4.20 6.71 11.75 5.04 12.59 5.04 9.23 5.04 10.07 4.20 10.07 8.39 7.55 8.39 5.87 11.75 3.36 5.04 1.68}} &lt;br /&gt;
&lt;br /&gt;
{{font color|green|7.55 2.52 10.91 5.04 6.71 5.04 2.52 5.04 12.59 11.75 14.27 5.87 6.71 6.71 7.55 2.52 13.43 15.11 5.87 8.39 3.36 7.55 8.39 13.43 2.52 8.39}} &lt;br /&gt;
&lt;br /&gt;
{{font color|green|10.07 7.55 8.39 10.91 9.23 4.20 6.71 13.43 11.75 11.75 10.91 6.71 0.00}}&lt;br /&gt;
 &lt;br /&gt;
{{font color|blue|1	8050000.00}}&lt;br /&gt;
&lt;br /&gt;
{{font color|red|8.39 15.95 35.25 21.82 22.66 19.30 26.86 12.59 17.62 31.89 21.82 20.98 17.62 26.86 15.11 23.50 16.78 30.21 29.37 22.66 22.66 16.78 22.66}} &lt;br /&gt;
&lt;br /&gt;
{{font color|red|15.95 23.50 5.87 22.66 13.43 25.18 19.30 26.86 17.62 6.71 11.75 20.14 19.30 23.50 14.27 27.69 21.82 20.98 9.23 20.14 64.62 17.62 23.50 8.39 15.11 15.11 21.82}} &lt;br /&gt;
&lt;br /&gt;
{{font color|red|6.71 20.98 29.37 24.34 20.98 16.78 17.62 11.75 25.18 26.86 24.34 20.98 21.82 15.11 0.00}}&lt;br /&gt;
&lt;br /&gt;
{{font color|deeppink|1.37 6.08 14.32 7.01 11.00 7.54 11.19 3.85 7.11 13.96 6.67 12.18 7.18 10.64 5.47 16.83 3.79 21.73 9.60 12.82 9.11 5.45 12.86 3.74 8.62}} &lt;br /&gt;
&lt;br /&gt;
{{font color|deeppink|0.83 9.30 2.92 14.68 5.85 13.81 5.18 1.28 3.44 8.30 7.25 12.03 4.16 8.80 9.74 7.23 1.76 8.49 56.16 5.41 7.29 1.70 4.96 4.45 9.66 1.35}} &lt;br /&gt;
&lt;br /&gt;
{{font color|deeppink|7.16 12.32 10.99 8.29 6.38 6.61 2.07 8.25 13.16 8.23 8.70 8.71 4.44 0.00}} &lt;br /&gt;
&lt;br /&gt;
{{font color|green|2.52 6.71 10.91 8.39 9.23 8.39 9.23 6.71 6.71 10.91 8.39 9.23 8.39 9.23 5.87 11.75 5.04 12.59 9.23 10.91 7.55 5.87 11.75 5.87 8.39 2.52}} &lt;br /&gt;
&lt;br /&gt;
{{font color|green|7.55 5.87 9.23 6.71 11.75 6.71 3.36 4.20 7.55 7.55 10.07 5.87 9.23 7.55 7.55 3.36 7.55 28.53 7.55 8.39 3.36 5.87 5.87 9.23 3.36 9.23 9.23}} &lt;br /&gt;
&lt;br /&gt;
{{font color|green|7.55 6.71 7.55 7.55 4.20 9.23 11.75 7.55 8.39 8.39 7.55 0.00}}&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example contains the first 2 epochs from an artifact scan.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{font color|blue|65	0	0}}&lt;br /&gt;
&lt;br /&gt;
This line shows the number of EEG (65), MAG and GRA channels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{font color|red|0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0}}	&lt;br /&gt;
&lt;br /&gt;
{{font color|red|0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0}}	&lt;br /&gt;
&lt;br /&gt;
{{font color|red|0	0	0	0	0	0	0	8	0	0	0	0	0	0	0	0	0	0}}	&lt;br /&gt;
&lt;br /&gt;
{{font color|red|0	0	0	0	0	0	0	0	0	0	0}}&lt;br /&gt;
&lt;br /&gt;
This line shows the badness of the channels. One channel has badness 8, which stands for gradient and integral criterion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{font color|deeppink|2	1	2}}&lt;br /&gt;
&lt;br /&gt;
This line states the number of conditions in the artifact scan list, and their indices: There are 2 conditions; the list element 0 contains condition 1, list element 1 contains condition 2. Condition 0 is not part of the scan.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{font color|green|0.000000	319120000.000000}}&lt;br /&gt;
&lt;br /&gt;
A range from 0 – 319.120 seconds was scanned.&lt;br /&gt;
The next lines give the values for the epochs in groups of 4:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{font color|blue|0	7700000.00}}&lt;br /&gt;
&lt;br /&gt;
This entry has artifact list index 0 (which corresponds to condition index 1, see above), and the position of the epoch is 7.700000 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next 3 lines hold amplitudes, variances, and gradients for each channel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:ERP/ERF]] [[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=How_Do_I_Configure_the_Matlab_Interface%3F</id>
		<title>How Do I Configure the Matlab Interface?</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=How_Do_I_Configure_the_Matlab_Interface%3F"/>
				<updated>2021-05-05T16:06:46Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Additional configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== MATLAB must be installed ==&lt;br /&gt;
&lt;br /&gt;
For the next step (required for MATLAB versions 2009b and over):&lt;br /&gt;
* We need to know whether the '''32-bit''' or '''64-bit''' version of MATLAB is installed.&lt;br /&gt;
* We also need to know the path to the MATLAB installation (e.g. '''C:\Program Files\MATLAB\2009b\''').&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting PATH environment variable ==&lt;br /&gt;
&lt;br /&gt;
For versions 2009b and over, make sure that the path to the Win32 or Win64 folder in the MATLAB installation to the '''PATH''' environment variable is defined:&lt;br /&gt;
&lt;br /&gt;
* The path for MATLAB 2009b:&lt;br /&gt;
** The path for the 64-bit version: '''C:\Program Files\MATLAB\R2009b\bin\win64'''&lt;br /&gt;
** The path for the 32-bit version: '''C:\Program Files\MATLAB\R2009b\bin\win32'''&lt;br /&gt;
&lt;br /&gt;
* Open the &amp;quot;'''System Properties'''&amp;quot; dialog by holding down the ''&amp;quot;Windows&amp;quot;'' key and pressing the ''&amp;quot;Pause&amp;quot;'' key at the same time (Windows logo key + Pause).&lt;br /&gt;
** In Windows XP, the dialog is opened directly.&lt;br /&gt;
** In Windows Vista and Windows 7, the key combination opens the ''&amp;quot;System Display&amp;quot;''. Click on the link ''&amp;quot;Change Settings&amp;quot;''.&lt;br /&gt;
** In Windows 8 and Windows 10, the key combination also opens the ''&amp;quot;System Display&amp;quot;''. Click on the link &amp;quot;'''Advanced system settings'''&amp;quot;.&lt;br /&gt;
*** Skip the step in this description, as you have already chosen the advanced settings.&lt;br /&gt;
&lt;br /&gt;
* Select the &amp;quot;'''Advanced'''&amp;quot; tab in the ''&amp;quot;System Properties&amp;quot;'' dialog.&lt;br /&gt;
* Press the &amp;quot;'''Environment Variables...'''&amp;quot; button.&lt;br /&gt;
* Under &amp;quot;'''System variables'''&amp;quot; click on the &amp;quot;'''Path'''&amp;quot; variable, and then click the ''&amp;quot;Edit...&amp;quot;'' button.&lt;br /&gt;
** In the resulting dialog, enter a semicolon (;) at the end of the path string, and add the path after the semicolon.&lt;br /&gt;
** In Windows 10, click the ''&amp;quot;New&amp;quot;'' button in the resulting dialog and then add the path&lt;br /&gt;
* Click ''&amp;quot;OK&amp;quot;'' to close and save the path variable. Click ''&amp;quot;OK&amp;quot;'' to close the ''&amp;quot;System Properties&amp;quot;'' dialog. When using Windows Vista/7/8/10, you will also need to close the ''&amp;quot;Control Panel&amp;quot;'' window afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:SystemProperties.png|thumb|340px|Figure 1. Advanced system settings]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:EnvironmentVariables.png|thumb|300px|Figure 2. Environment variables]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:EditSystemVariable.png|thumb|250px|Figure 3. Edit system variable]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Additional configuration ==&lt;br /&gt;
&lt;br /&gt;
=== ConfigureBesaMatlabInterface.exe ===&lt;br /&gt;
&lt;br /&gt;
[[File:ConfigureBesaMatlabInterface_01.png|250px]]&lt;br /&gt;
&lt;br /&gt;
(Only required after a change of your MATLAB configuration after installation of BESA Research)&lt;br /&gt;
&lt;br /&gt;
During the installation process of BESA Research, the program &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;ConfigureBesaMatlabInterface.exe&amp;lt;/span&amp;gt; (or SetupBesaMatlabInterface.exe) in the BESA Research root folder (e.g.: '''C:\Program Files (x86)\BESA\Research_7_0''') was executed.&lt;br /&gt;
&lt;br /&gt;
Run this program '''as administrator''' again when your MATLAB configuration has changed, e.g. after updating your MATLAB version. In the dropdown list, select the MATLAB version that you are using.&lt;br /&gt;
&lt;br /&gt;
This program performs two operations:&lt;br /&gt;
* It copies the appropriate interface dll file to the BESA Research root folder and renames it to &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab.dll&amp;lt;/span&amp;gt;&amp;quot; (32-bit version) or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab64.dll&amp;lt;/span&amp;gt;&amp;quot; (64-bit version), and&lt;br /&gt;
* If you are using a 64-bit version, it creates an entry in [[The Initialization File: BESA.ini|BESA.ini]] (e.g.: '''C:\Users\Public\Documents\BESA\Research_7_0''') as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Matlab] &lt;br /&gt;
Platform=64&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== BesaMatlab64Interface.exe ===&lt;br /&gt;
&lt;br /&gt;
[[File:BesaMatlab64Interfaces_01.png|200px]]&lt;br /&gt;
&lt;br /&gt;
'''Note: This step is not needed from BESA Research 7.1 March 2021.'''&lt;br /&gt;
&lt;br /&gt;
If the installed MATLAB is 64-bit version, please run the program &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab64Interface.exe&amp;lt;/span&amp;gt; in the BESA Research root folder (e.g.: '''C:\Program Files (x86)\BESA\Research_7_0'''). If the MATLAB path is set properly, a program window as the screenshot below is shown up without an error message. After that please just close the window.&lt;br /&gt;
&lt;br /&gt;
[[File:BesaMatlab64Interfaces_02.png|400px]]&lt;br /&gt;
&lt;br /&gt;
== Updating the MATLAB Interface after MATLAB Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Sometimes, the BESA to MATLAB interface stops working after installation of new/additional MATLAB version on one computer. The reason is the registry change/corruption caused by the newly installed version. In order to correct this, one has to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Make sure that in the &amp;quot;'''Path'''&amp;quot; environment variable only the path to one MATLAB version exists.&lt;br /&gt;
# Make sure that the correct MATLAB interface dll (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab.dll&amp;lt;/span&amp;gt; (32-bit version) or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab64.dll&amp;lt;/span&amp;gt; (64-bit version)) is installed by starting the tool &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;ConfigureBesaMatlabInterface.exe&amp;lt;/span&amp;gt; (or SetupBesaMatlabInterface.exe) and selecting the corresponding MATLAB version and architecture.&lt;br /&gt;
# Run '''CMD (Command Prompt) as administrator''', and then execute the following command &amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;matlab -regserver&amp;lt;/source&amp;gt; ([https://www.mathworks.com/help/matlab/matlab_external/register-matlab-as-automation-server.html registers MATLAB as a Component Object Model (COM) server]).&lt;br /&gt;
#* Close the CMD window (there should be no error message).&lt;br /&gt;
#* Sometimes if the MATLAB license is connected to a specific user account and the user account does not have administrator rights, it could be problematic to execute that command. In that case, change the corresponding account to an administrator account and then perform the actions again. After that the account could be made to regular user account again.&lt;br /&gt;
# Run '''CMD (Command Prompt) as NOT administrator''', and then execute the following command &amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;matlab -automation&amp;lt;/source&amp;gt; ([https://www.mathworks.com/help/matlab/matlab_external/creating-the-server-manually.html Manually create automation server]: start MATLAB as a Component Object Model (COM) Automation server. MATLAB does not display the splash screen).&lt;br /&gt;
#* Close the CMD and MATLAB Command Window (there should be no error message).&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Start BESA Research and check if '''Send to MATLAB...''' is displayed in the '''File''' menu. If it is, the interface is set up correctly. Note that the item will be grayed if no file is open in BESA Research.&lt;br /&gt;
&lt;br /&gt;
Test the MATLAB interface&lt;br /&gt;
* Open a data file, mark a short (e.g. 1 s) time range, and select '''File / Send to MATLAB...''' to open the Export data dialog (Fig. 4).&lt;br /&gt;
* The MATLAB window should open, and BESA Research will display a progress bar (Fig. 5).&lt;br /&gt;
* After the window closes, open the MATLAB window, and type '''&amp;lt;code&amp;gt;workspace&amp;lt;/code&amp;gt;''' to open the workspace window (Fig. 6), or '''&amp;lt;code&amp;gt;desktop&amp;lt;/code&amp;gt;''' to open the standard MATLAB desktop.&lt;br /&gt;
* Examine the &amp;lt;code&amp;gt;besa_channels&amp;lt;/code&amp;gt; variable, which contains the data for the marked data segment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:SendToMatlab.png|thumb|400px|Figure 4. Send marked segment to MATLAB]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:SendToMatlabProgressbar.png|thumb|200px|Figure 5. Send to MATLAB progress bar]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:ExportedMatlabStructure.png|thumb|300px|Figure 6. Data exported from BESA Research to MATLAB]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting if the interface is not working after the above steps ==&lt;br /&gt;
&lt;br /&gt;
If the '''File / Send to MATLAB...''' menu item is not shown, this means that either the path (the above step for Setting PATH environment variable) is not defined properly, or that the interface Dll (BesaMatlab.dll or BesaMatlab64.dll) is not compatible with the currently installed version of MATLAB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Setup]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=How_Do_I_Configure_the_Matlab_Interface%3F</id>
		<title>How Do I Configure the Matlab Interface?</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=How_Do_I_Configure_the_Matlab_Interface%3F"/>
				<updated>2021-05-05T16:04:55Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== MATLAB must be installed ==&lt;br /&gt;
&lt;br /&gt;
For the next step (required for MATLAB versions 2009b and over):&lt;br /&gt;
* We need to know whether the '''32-bit''' or '''64-bit''' version of MATLAB is installed.&lt;br /&gt;
* We also need to know the path to the MATLAB installation (e.g. '''C:\Program Files\MATLAB\2009b\''').&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting PATH environment variable ==&lt;br /&gt;
&lt;br /&gt;
For versions 2009b and over, make sure that the path to the Win32 or Win64 folder in the MATLAB installation to the '''PATH''' environment variable is defined:&lt;br /&gt;
&lt;br /&gt;
* The path for MATLAB 2009b:&lt;br /&gt;
** The path for the 64-bit version: '''C:\Program Files\MATLAB\R2009b\bin\win64'''&lt;br /&gt;
** The path for the 32-bit version: '''C:\Program Files\MATLAB\R2009b\bin\win32'''&lt;br /&gt;
&lt;br /&gt;
* Open the &amp;quot;'''System Properties'''&amp;quot; dialog by holding down the ''&amp;quot;Windows&amp;quot;'' key and pressing the ''&amp;quot;Pause&amp;quot;'' key at the same time (Windows logo key + Pause).&lt;br /&gt;
** In Windows XP, the dialog is opened directly.&lt;br /&gt;
** In Windows Vista and Windows 7, the key combination opens the ''&amp;quot;System Display&amp;quot;''. Click on the link ''&amp;quot;Change Settings&amp;quot;''.&lt;br /&gt;
** In Windows 8 and Windows 10, the key combination also opens the ''&amp;quot;System Display&amp;quot;''. Click on the link &amp;quot;'''Advanced system settings'''&amp;quot;.&lt;br /&gt;
*** Skip the step in this description, as you have already chosen the advanced settings.&lt;br /&gt;
&lt;br /&gt;
* Select the &amp;quot;'''Advanced'''&amp;quot; tab in the ''&amp;quot;System Properties&amp;quot;'' dialog.&lt;br /&gt;
* Press the &amp;quot;'''Environment Variables...'''&amp;quot; button.&lt;br /&gt;
* Under &amp;quot;'''System variables'''&amp;quot; click on the &amp;quot;'''Path'''&amp;quot; variable, and then click the ''&amp;quot;Edit...&amp;quot;'' button.&lt;br /&gt;
** In the resulting dialog, enter a semicolon (;) at the end of the path string, and add the path after the semicolon.&lt;br /&gt;
** In Windows 10, click the ''&amp;quot;New&amp;quot;'' button in the resulting dialog and then add the path&lt;br /&gt;
* Click ''&amp;quot;OK&amp;quot;'' to close and save the path variable. Click ''&amp;quot;OK&amp;quot;'' to close the ''&amp;quot;System Properties&amp;quot;'' dialog. When using Windows Vista/7/8/10, you will also need to close the ''&amp;quot;Control Panel&amp;quot;'' window afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:SystemProperties.png|thumb|340px|Figure 1. Advanced system settings]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:EnvironmentVariables.png|thumb|300px|Figure 2. Environment variables]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:EditSystemVariable.png|thumb|250px|Figure 3. Edit system variable]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Additional configuration ==&lt;br /&gt;
&lt;br /&gt;
=== ConfigureBesaMatlabInterface.exe ===&lt;br /&gt;
&lt;br /&gt;
[[File:ConfigureBesaMatlabInterface_01.png|250px]]&lt;br /&gt;
&lt;br /&gt;
(Only required after a change of your MATLAB configuration after installation of BESA Research)&lt;br /&gt;
&lt;br /&gt;
During the installation process of BESA Research, the program &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;ConfigureBesaMatlabInterface.exe&amp;lt;/span&amp;gt; (or SetupBesaMatlabInterface.exe) in the BESA Research root folder (e.g.: '''C:\Program Files (x86)\BESA\Research_7_0''') was executed.&lt;br /&gt;
&lt;br /&gt;
Run this program '''as administrator''' again when your MATLAB configuration has changed, e.g. after updating your MATLAB version. In the dropdown list, select the MATLAB version that you are using.&lt;br /&gt;
&lt;br /&gt;
This program performs two operations:&lt;br /&gt;
* It copies the appropriate interface dll file to the BESA Research root folder and renames it to &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab.dll&amp;lt;/span&amp;gt;&amp;quot; (32-bit version) or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab64.dll&amp;lt;/span&amp;gt;&amp;quot; (64-bit version), and&lt;br /&gt;
* If you are using a 64-bit version, it creates an entry in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BESA.ini&amp;lt;/span&amp;gt; (e.g.: '''C:\Users\Public\Documents\BESA\Research_7_0''') as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Matlab] &lt;br /&gt;
Platform=64&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== BesaMatlab64Interface.exe ===&lt;br /&gt;
&lt;br /&gt;
[[File:BesaMatlab64Interfaces_01.png|200px]]&lt;br /&gt;
&lt;br /&gt;
'''Note: This step is not needed from BESA Research 7.1 March 2021.'''&lt;br /&gt;
&lt;br /&gt;
If the installed MATLAB is 64-bit version, please run the program &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab64Interface.exe&amp;lt;/span&amp;gt; in the BESA Research root folder (e.g.: '''C:\Program Files (x86)\BESA\Research_7_0'''). If the MATLAB path is set properly, a program window as the screenshot below is shown up without an error message. After that please just close the window.&lt;br /&gt;
&lt;br /&gt;
[[File:BesaMatlab64Interfaces_02.png|400px]]&lt;br /&gt;
&lt;br /&gt;
== Updating the MATLAB Interface after MATLAB Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Sometimes, the BESA to MATLAB interface stops working after installation of new/additional MATLAB version on one computer. The reason is the registry change/corruption caused by the newly installed version. In order to correct this, one has to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Make sure that in the &amp;quot;'''Path'''&amp;quot; environment variable only the path to one MATLAB version exists.&lt;br /&gt;
# Make sure that the correct MATLAB interface dll (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab.dll&amp;lt;/span&amp;gt; (32-bit version) or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab64.dll&amp;lt;/span&amp;gt; (64-bit version)) is installed by starting the tool &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;ConfigureBesaMatlabInterface.exe&amp;lt;/span&amp;gt; (or SetupBesaMatlabInterface.exe) and selecting the corresponding MATLAB version and architecture.&lt;br /&gt;
# Run '''CMD (Command Prompt) as administrator''', and then execute the following command &amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;matlab -regserver&amp;lt;/source&amp;gt; ([https://www.mathworks.com/help/matlab/matlab_external/register-matlab-as-automation-server.html registers MATLAB as a Component Object Model (COM) server]).&lt;br /&gt;
#* Close the CMD window (there should be no error message).&lt;br /&gt;
#* Sometimes if the MATLAB license is connected to a specific user account and the user account does not have administrator rights, it could be problematic to execute that command. In that case, change the corresponding account to an administrator account and then perform the actions again. After that the account could be made to regular user account again.&lt;br /&gt;
# Run '''CMD (Command Prompt) as NOT administrator''', and then execute the following command &amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;matlab -automation&amp;lt;/source&amp;gt; ([https://www.mathworks.com/help/matlab/matlab_external/creating-the-server-manually.html Manually create automation server]: start MATLAB as a Component Object Model (COM) Automation server. MATLAB does not display the splash screen).&lt;br /&gt;
#* Close the CMD and MATLAB Command Window (there should be no error message).&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Start BESA Research and check if '''Send to MATLAB...''' is displayed in the '''File''' menu. If it is, the interface is set up correctly. Note that the item will be grayed if no file is open in BESA Research.&lt;br /&gt;
&lt;br /&gt;
Test the MATLAB interface&lt;br /&gt;
* Open a data file, mark a short (e.g. 1 s) time range, and select '''File / Send to MATLAB...''' to open the Export data dialog (Fig. 4).&lt;br /&gt;
* The MATLAB window should open, and BESA Research will display a progress bar (Fig. 5).&lt;br /&gt;
* After the window closes, open the MATLAB window, and type '''&amp;lt;code&amp;gt;workspace&amp;lt;/code&amp;gt;''' to open the workspace window (Fig. 6), or '''&amp;lt;code&amp;gt;desktop&amp;lt;/code&amp;gt;''' to open the standard MATLAB desktop.&lt;br /&gt;
* Examine the &amp;lt;code&amp;gt;besa_channels&amp;lt;/code&amp;gt; variable, which contains the data for the marked data segment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:SendToMatlab.png|thumb|400px|Figure 4. Send marked segment to MATLAB]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:SendToMatlabProgressbar.png|thumb|200px|Figure 5. Send to MATLAB progress bar]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:ExportedMatlabStructure.png|thumb|300px|Figure 6. Data exported from BESA Research to MATLAB]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting if the interface is not working after the above steps ==&lt;br /&gt;
&lt;br /&gt;
If the '''File / Send to MATLAB...''' menu item is not shown, this means that either the path (the above step for Setting PATH environment variable) is not defined properly, or that the interface Dll (BesaMatlab.dll or BesaMatlab64.dll) is not compatible with the currently installed version of MATLAB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Setup]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=How_Do_I_Configure_the_Matlab_Interface%3F</id>
		<title>How Do I Configure the Matlab Interface?</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=How_Do_I_Configure_the_Matlab_Interface%3F"/>
				<updated>2021-05-05T16:03:54Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Additional configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== MATLAB must be installed ==&lt;br /&gt;
&lt;br /&gt;
For the next step (required for MATLAB versions 2009b and over):&lt;br /&gt;
* We need to know whether the '''32-bit''' or '''64-bit''' version of MATLAB is installed.&lt;br /&gt;
* We also need to know the path to the MATLAB installation (e.g. '''C:\Program Files\MATLAB\2009b\''').&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting PATH environment variable ==&lt;br /&gt;
&lt;br /&gt;
For versions 2009b and over, make sure that the path to the Win32 or Win64 folder in the MATLAB installation to the '''PATH''' environment variable is defined:&lt;br /&gt;
&lt;br /&gt;
* The path for MATLAB 2009b:&lt;br /&gt;
** The path for the 64-bit version: '''C:\Program Files\MATLAB\R2009b\bin\win64'''&lt;br /&gt;
** The path for the 32-bit version: '''C:\Program Files\MATLAB\R2009b\bin\win32'''&lt;br /&gt;
&lt;br /&gt;
* Open the &amp;quot;'''System Properties'''&amp;quot; dialog by holding down the ''&amp;quot;Windows&amp;quot;'' key and pressing the ''&amp;quot;Pause&amp;quot;'' key at the same time (Windows logo key + Pause).&lt;br /&gt;
** In Windows XP, the dialog is opened directly.&lt;br /&gt;
** In Windows Vista and Windows 7, the key combination opens the ''&amp;quot;System Display&amp;quot;''. Click on the link ''&amp;quot;Change Settings&amp;quot;''.&lt;br /&gt;
** In Windows 8 and Windows 10, the key combination also opens the ''&amp;quot;System Display&amp;quot;''. Click on the link &amp;quot;'''Advanced system settings'''&amp;quot;.&lt;br /&gt;
*** Skip the step in this description, as you have already chosen the advanced settings.&lt;br /&gt;
&lt;br /&gt;
* Select the &amp;quot;'''Advanced'''&amp;quot; tab in the ''&amp;quot;System Properties&amp;quot;'' dialog.&lt;br /&gt;
* Press the &amp;quot;'''Environment Variables...'''&amp;quot; button.&lt;br /&gt;
* Under &amp;quot;'''System variables'''&amp;quot; click on the &amp;quot;'''Path'''&amp;quot; variable, and then click the ''&amp;quot;Edit...&amp;quot;'' button.&lt;br /&gt;
** In the resulting dialog, enter a semicolon (;) at the end of the path string, and add the path after the semicolon.&lt;br /&gt;
** In Windows 10, click the ''&amp;quot;New&amp;quot;'' button in the resulting dialog and then add the path&lt;br /&gt;
* Click ''&amp;quot;OK&amp;quot;'' to close and save the path variable. Click ''&amp;quot;OK&amp;quot;'' to close the ''&amp;quot;System Properties&amp;quot;'' dialog. When using Windows Vista/7/8/10, you will also need to close the ''&amp;quot;Control Panel&amp;quot;'' window afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:SystemProperties.png|thumb|340px|Figure 1. Advanced system settings]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:EnvironmentVariables.png|thumb|300px|Figure 2. Environment variables]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:EditSystemVariable.png|thumb|250px|Figure 3. Edit system variable]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Additional configuration ==&lt;br /&gt;
&lt;br /&gt;
=== ConfigureBesaMatlabInterface.exe ===&lt;br /&gt;
&lt;br /&gt;
[[File:ConfigureBesaMatlabInterface_01.png|250px]]&lt;br /&gt;
&lt;br /&gt;
(Only required after a change of your MATLAB configuration after installation of BESA Research)&lt;br /&gt;
&lt;br /&gt;
During the installation process of BESA Research, the program &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;ConfigureBesaMatlabInterface.exe&amp;lt;/span&amp;gt; (or SetupBesaMatlabInterface.exe) in the BESA Research root folder (e.g.: C:\Program Files (x86)\BESA\Research_7_0\) was executed.&lt;br /&gt;
&lt;br /&gt;
Run this program '''as administrator''' again when your MATLAB configuration has changed, e.g. after updating your MATLAB version. In the dropdown list, select the MATLAB version that you are using.&lt;br /&gt;
&lt;br /&gt;
This program performs two operations:&lt;br /&gt;
* It copies the appropriate interface dll file to the BESA Research root folder and renames it to &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab.dll&amp;lt;/span&amp;gt;&amp;quot; (32-bit version) or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab64.dll&amp;lt;/span&amp;gt;&amp;quot; (64-bit version), and&lt;br /&gt;
* If you are using a 64-bit version, it creates an entry in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BESA.ini&amp;lt;/span&amp;gt; (e.g.: C:\Users\Public\Documents\BESA\Research_7_0) as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Matlab] &lt;br /&gt;
Platform=64&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== BesaMatlab64Interface.exe ===&lt;br /&gt;
&lt;br /&gt;
[[File:BesaMatlab64Interfaces_01.png|200px]]&lt;br /&gt;
&lt;br /&gt;
'''Note: This step is not needed from BESA Research 7.1 March 2021.'''&lt;br /&gt;
&lt;br /&gt;
If the installed MATLAB is 64-bit version, please run the program &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab64Interface.exe&amp;lt;/span&amp;gt; in the BESA Research root folder (e.g.: C:\Program Files (x86)\BESA\Research_7_0). If the MATLAB path is set properly, a program window as the screenshot below is shown up without an error message. After that please just close the window.&lt;br /&gt;
&lt;br /&gt;
[[File:BesaMatlab64Interfaces_02.png|400px]]&lt;br /&gt;
&lt;br /&gt;
== Updating the MATLAB Interface after MATLAB Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Sometimes, the BESA to MATLAB interface stops working after installation of new/additional MATLAB version on one computer. The reason is the registry change/corruption caused by the newly installed version. In order to correct this, one has to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Make sure that in the &amp;quot;'''Path'''&amp;quot; environment variable only the path to one MATLAB version exists.&lt;br /&gt;
# Make sure that the correct MATLAB interface dll (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab.dll&amp;lt;/span&amp;gt; (32-bit version) or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab64.dll&amp;lt;/span&amp;gt; (64-bit version)) is installed by starting the tool &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;ConfigureBesaMatlabInterface.exe&amp;lt;/span&amp;gt; (or SetupBesaMatlabInterface.exe) and selecting the corresponding MATLAB version and architecture.&lt;br /&gt;
# Run '''CMD (Command Prompt) as administrator''', and then execute the following command &amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;matlab -regserver&amp;lt;/source&amp;gt; ([https://www.mathworks.com/help/matlab/matlab_external/register-matlab-as-automation-server.html registers MATLAB as a Component Object Model (COM) server]).&lt;br /&gt;
#* Close the CMD window (there should be no error message).&lt;br /&gt;
#* Sometimes if the MATLAB license is connected to a specific user account and the user account does not have administrator rights, it could be problematic to execute that command. In that case, change the corresponding account to an administrator account and then perform the actions again. After that the account could be made to regular user account again.&lt;br /&gt;
# Run '''CMD (Command Prompt) as NOT administrator''', and then execute the following command &amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;matlab -automation&amp;lt;/source&amp;gt; ([https://www.mathworks.com/help/matlab/matlab_external/creating-the-server-manually.html Manually create automation server]: start MATLAB as a Component Object Model (COM) Automation server. MATLAB does not display the splash screen).&lt;br /&gt;
#* Close the CMD and MATLAB Command Window (there should be no error message).&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Start BESA Research and check if '''Send to MATLAB...''' is displayed in the '''File''' menu. If it is, the interface is set up correctly. Note that the item will be grayed if no file is open in BESA Research.&lt;br /&gt;
&lt;br /&gt;
Test the MATLAB interface&lt;br /&gt;
* Open a data file, mark a short (e.g. 1 s) time range, and select '''File / Send to MATLAB...''' to open the Export data dialog (Fig. 4).&lt;br /&gt;
* The MATLAB window should open, and BESA Research will display a progress bar (Fig. 5).&lt;br /&gt;
* After the window closes, open the MATLAB window, and type '''&amp;lt;code&amp;gt;workspace&amp;lt;/code&amp;gt;''' to open the workspace window (Fig. 6), or '''&amp;lt;code&amp;gt;desktop&amp;lt;/code&amp;gt;''' to open the standard MATLAB desktop.&lt;br /&gt;
* Examine the &amp;lt;code&amp;gt;besa_channels&amp;lt;/code&amp;gt; variable, which contains the data for the marked data segment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:SendToMatlab.png|thumb|400px|Figure 4. Send marked segment to MATLAB]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:SendToMatlabProgressbar.png|thumb|200px|Figure 5. Send to MATLAB progress bar]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:ExportedMatlabStructure.png|thumb|300px|Figure 6. Data exported from BESA Research to MATLAB]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting if the interface is not working after the above steps ==&lt;br /&gt;
&lt;br /&gt;
If the '''File / Send to MATLAB...''' menu item is not shown, this means that either the path (the above step for Setting PATH environment variable) is not defined properly, or that the interface Dll (BesaMatlab.dll or BesaMatlab64.dll) is not compatible with the currently installed version of MATLAB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Setup]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=How_Do_I_Configure_the_Matlab_Interface%3F</id>
		<title>How Do I Configure the Matlab Interface?</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=How_Do_I_Configure_the_Matlab_Interface%3F"/>
				<updated>2021-05-05T16:02:49Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== MATLAB must be installed ==&lt;br /&gt;
&lt;br /&gt;
For the next step (required for MATLAB versions 2009b and over):&lt;br /&gt;
* We need to know whether the '''32-bit''' or '''64-bit''' version of MATLAB is installed.&lt;br /&gt;
* We also need to know the path to the MATLAB installation (e.g. '''C:\Program Files\MATLAB\2009b\''').&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Setting PATH environment variable ==&lt;br /&gt;
&lt;br /&gt;
For versions 2009b and over, make sure that the path to the Win32 or Win64 folder in the MATLAB installation to the '''PATH''' environment variable is defined:&lt;br /&gt;
&lt;br /&gt;
* The path for MATLAB 2009b:&lt;br /&gt;
** The path for the 64-bit version: '''C:\Program Files\MATLAB\R2009b\bin\win64'''&lt;br /&gt;
** The path for the 32-bit version: '''C:\Program Files\MATLAB\R2009b\bin\win32'''&lt;br /&gt;
&lt;br /&gt;
* Open the &amp;quot;'''System Properties'''&amp;quot; dialog by holding down the ''&amp;quot;Windows&amp;quot;'' key and pressing the ''&amp;quot;Pause&amp;quot;'' key at the same time (Windows logo key + Pause).&lt;br /&gt;
** In Windows XP, the dialog is opened directly.&lt;br /&gt;
** In Windows Vista and Windows 7, the key combination opens the ''&amp;quot;System Display&amp;quot;''. Click on the link ''&amp;quot;Change Settings&amp;quot;''.&lt;br /&gt;
** In Windows 8 and Windows 10, the key combination also opens the ''&amp;quot;System Display&amp;quot;''. Click on the link &amp;quot;'''Advanced system settings'''&amp;quot;.&lt;br /&gt;
*** Skip the step in this description, as you have already chosen the advanced settings.&lt;br /&gt;
&lt;br /&gt;
* Select the &amp;quot;'''Advanced'''&amp;quot; tab in the ''&amp;quot;System Properties&amp;quot;'' dialog.&lt;br /&gt;
* Press the &amp;quot;'''Environment Variables...'''&amp;quot; button.&lt;br /&gt;
* Under &amp;quot;'''System variables'''&amp;quot; click on the &amp;quot;'''Path'''&amp;quot; variable, and then click the ''&amp;quot;Edit...&amp;quot;'' button.&lt;br /&gt;
** In the resulting dialog, enter a semicolon (;) at the end of the path string, and add the path after the semicolon.&lt;br /&gt;
** In Windows 10, click the ''&amp;quot;New&amp;quot;'' button in the resulting dialog and then add the path&lt;br /&gt;
* Click ''&amp;quot;OK&amp;quot;'' to close and save the path variable. Click ''&amp;quot;OK&amp;quot;'' to close the ''&amp;quot;System Properties&amp;quot;'' dialog. When using Windows Vista/7/8/10, you will also need to close the ''&amp;quot;Control Panel&amp;quot;'' window afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:SystemProperties.png|thumb|340px|Figure 1. Advanced system settings]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:EnvironmentVariables.png|thumb|300px|Figure 2. Environment variables]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:EditSystemVariable.png|thumb|250px|Figure 3. Edit system variable]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Additional configuration ==&lt;br /&gt;
&lt;br /&gt;
=== ConfigureBesaMatlabInterface.exe ===&lt;br /&gt;
&lt;br /&gt;
[[File:ConfigureBesaMatlabInterface_01.png|250px]]&lt;br /&gt;
&lt;br /&gt;
(Only required after a change of your MATLAB configuration after installation of BESA Research)&lt;br /&gt;
&lt;br /&gt;
During the installation process of BESA Research, the program &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;ConfigureBesaMatlabInterface.exe&amp;lt;/span&amp;gt; (or SetupBesaMatlabInterface.exe) in the BESA Research root folder (C:\Program Files (x86)\BESA\Research_7_0) was executed.&lt;br /&gt;
&lt;br /&gt;
Run this program '''as administrator''' again when your MATLAB configuration has changed, e.g. after updating your MATLAB version. In the dropdown list, select the MATLAB version that you are using.&lt;br /&gt;
&lt;br /&gt;
This program performs two operations:&lt;br /&gt;
* It copies the appropriate interface dll file to the BESA Research root folder and renames it to &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab.dll&amp;lt;/span&amp;gt;&amp;quot; (32-bit version) or &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab64.dll&amp;lt;/span&amp;gt;&amp;quot; (64-bit version), and&lt;br /&gt;
* If you are using a 64-bit version, it creates an entry in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BESA.ini&amp;lt;/span&amp;gt; (C:\Users\Public\Documents\BESA\Research_7_0) as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Matlab] &lt;br /&gt;
Platform=64&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== BesaMatlab64Interface.exe ===&lt;br /&gt;
&lt;br /&gt;
[[File:BesaMatlab64Interfaces_01.png|200px]]&lt;br /&gt;
&lt;br /&gt;
'''Note: This step is not needed from BESA Research 7.1 March 2021.'''&lt;br /&gt;
&lt;br /&gt;
If the installed MATLAB is 64-bit version, please run the program &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab64Interface.exe&amp;lt;/span&amp;gt; in the BESA Research root folder (C:\Program Files (x86)\BESA\Research_7_0). If the MATLAB path is set properly, a program window as the screenshot below is shown up without an error message. After that please just close the window.&lt;br /&gt;
&lt;br /&gt;
[[File:BesaMatlab64Interfaces_02.png|400px]]&lt;br /&gt;
&lt;br /&gt;
== Updating the MATLAB Interface after MATLAB Upgrade ==&lt;br /&gt;
&lt;br /&gt;
Sometimes, the BESA to MATLAB interface stops working after installation of new/additional MATLAB version on one computer. The reason is the registry change/corruption caused by the newly installed version. In order to correct this, one has to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Make sure that in the &amp;quot;'''Path'''&amp;quot; environment variable only the path to one MATLAB version exists.&lt;br /&gt;
# Make sure that the correct MATLAB interface dll (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab.dll&amp;lt;/span&amp;gt; (32-bit version) or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;BesaMatlab64.dll&amp;lt;/span&amp;gt; (64-bit version)) is installed by starting the tool &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;ConfigureBesaMatlabInterface.exe&amp;lt;/span&amp;gt; (or SetupBesaMatlabInterface.exe) and selecting the corresponding MATLAB version and architecture.&lt;br /&gt;
# Run '''CMD (Command Prompt) as administrator''', and then execute the following command &amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;matlab -regserver&amp;lt;/source&amp;gt; ([https://www.mathworks.com/help/matlab/matlab_external/register-matlab-as-automation-server.html registers MATLAB as a Component Object Model (COM) server]).&lt;br /&gt;
#* Close the CMD window (there should be no error message).&lt;br /&gt;
#* Sometimes if the MATLAB license is connected to a specific user account and the user account does not have administrator rights, it could be problematic to execute that command. In that case, change the corresponding account to an administrator account and then perform the actions again. After that the account could be made to regular user account again.&lt;br /&gt;
# Run '''CMD (Command Prompt) as NOT administrator''', and then execute the following command &amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;matlab -automation&amp;lt;/source&amp;gt; ([https://www.mathworks.com/help/matlab/matlab_external/creating-the-server-manually.html Manually create automation server]: start MATLAB as a Component Object Model (COM) Automation server. MATLAB does not display the splash screen).&lt;br /&gt;
#* Close the CMD and MATLAB Command Window (there should be no error message).&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
Start BESA Research and check if '''Send to MATLAB...''' is displayed in the '''File''' menu. If it is, the interface is set up correctly. Note that the item will be grayed if no file is open in BESA Research.&lt;br /&gt;
&lt;br /&gt;
Test the MATLAB interface&lt;br /&gt;
* Open a data file, mark a short (e.g. 1 s) time range, and select '''File / Send to MATLAB...''' to open the Export data dialog (Fig. 4).&lt;br /&gt;
* The MATLAB window should open, and BESA Research will display a progress bar (Fig. 5).&lt;br /&gt;
* After the window closes, open the MATLAB window, and type '''&amp;lt;code&amp;gt;workspace&amp;lt;/code&amp;gt;''' to open the workspace window (Fig. 6), or '''&amp;lt;code&amp;gt;desktop&amp;lt;/code&amp;gt;''' to open the standard MATLAB desktop.&lt;br /&gt;
* Examine the &amp;lt;code&amp;gt;besa_channels&amp;lt;/code&amp;gt; variable, which contains the data for the marked data segment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:SendToMatlab.png|thumb|400px|Figure 4. Send marked segment to MATLAB]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:SendToMatlabProgressbar.png|thumb|200px|Figure 5. Send to MATLAB progress bar]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:ExportedMatlabStructure.png|thumb|300px|Figure 6. Data exported from BESA Research to MATLAB]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting if the interface is not working after the above steps ==&lt;br /&gt;
&lt;br /&gt;
If the '''File / Send to MATLAB...''' menu item is not shown, this means that either the path (the above step for Setting PATH environment variable) is not defined properly, or that the interface Dll (BesaMatlab.dll or BesaMatlab64.dll) is not compatible with the currently installed version of MATLAB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Setup]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Handling_Artifacts_in_BESA</id>
		<title>Handling Artifacts in BESA</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Handling_Artifacts_in_BESA"/>
				<updated>2021-05-05T15:47:21Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Artifact correction always aims at extracting unwanted signals like EOG, EKG or external noise from the data,&lt;br /&gt;
while leaving all brain activity of interest as undisturbed as possible. To achieve this, artifact and brain topographies must be separated. Depending on whether one is dealing with spontaneous or evoked activity, different approaches for artifact correction are appropriate.  However, if the data contain only a few artifacts and a sufficient number of artifact-free trials are retained, using artifact rejection rather than correction is advised as this avoids the distortion resulting from correction.&lt;br /&gt;
&lt;br /&gt;
For more information on (automatic) artifact correction in BESA Research, check the [[BESA Research Artifact Correction]] Wiki page.&lt;br /&gt;
&lt;br /&gt;
== Principles of artifact correction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For artifact correction, artifact and brain activities must be identified and separated. In general, artifact and brain topographies will be spatially correlated. Hence, a simple regression or the projection of the data onto the subspace orthogonal to the artifact topographies will severely distort the data. For a correction without distortion, it is not sufficient to define the artifact topographies (to be removed), but it is equally necessary to create a model or a spatial description of the brain topographies (to be retained).&lt;br /&gt;
&lt;br /&gt;
== Artifact correction Methods ==&lt;br /&gt;
&lt;br /&gt;
=== Adaptive artifact correction &amp;lt;ref&amp;gt;[http://journals.lww.com/clinicalneurophys/Abstract/2002/03000/Artifact_Correction_of_the_Ongoing_EEG_Using.2.aspx Ille, Nicole, Patrick Berg, and Michael Scherg (2002). &amp;quot;Artifact correction of the ongoing EEG using spatial filters based on artifact and brain signal topographies.&amp;quot;]'' Journal of clinical neurophysiology 19.2 (2002): 113-124.''&amp;lt;/ref&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
This method estimates the brain activity from the data currently displayed on the screen. The data is scanned in specified time intervals. Those segments are considered to represent brain activity where 1) the correlation between data and artifact topography does not exceed a certain threshold and 2) the signal amplitudes are below a specified threshold. Of the remaining segments a principal component analysis (PCA) is performed. All PCA components explaining more than the minimum variance specified in the box Adaptive Model: PCA Topography are maintained. They span the brain signal subspace. &lt;br /&gt;
&lt;br /&gt;
In a next step, the recorded data is decomposed using all topographies into a linear combination of brain and artifact activities. Thus, the estimated artifact signals are much less overlapped with brain activity and can be subtracted from the original signals without much distortion. This approach is recommended, in particular, for the review of continuous EEG or MEG data.&lt;br /&gt;
&lt;br /&gt;
=== Surrogate model approach &amp;lt;ref&amp;gt;[http://www.sciencedirect.com/science/article/pii/0013469494900949 Berg, Patrick, and Michael Scherg. (1994) &amp;quot;A multiple source approach to the correction of eye artifacts.&amp;quot;] ''Electroencephalography and clinical neurophysiology 90.3 (1994): 229-241.''&amp;lt;/ref&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Here, brain activity is modeled by a model consisting of multiple equivalent current dipoles. The artifact topographies are added to this model and the combined model is then applied to the recorded data. Again, the estimated inverse signals separate the brain activity associated with the surrogate sources from the artifacts to a high degree. Thus, the artifact signals can be subtracted without considerable distortion of the activities originating in the modeled regions. This approach considers the activity in the modeled brain regions while the on-going EEG is not modeled accurately.&lt;br /&gt;
&lt;br /&gt;
Therefore, the surrogate method is especially recommended for the correction of data to be averaged if the average signal is smaller than the EEG or MEG background. In this case a model cannot be estimated from the on-going data. Therefore, a-priori knowledge of the involved brain regions should be employed to create an appropriate surrogate model. &lt;br /&gt;
&lt;br /&gt;
===Subspace projection (SSP, regression) ===&lt;br /&gt;
&lt;br /&gt;
This approach has been commonly applied in the literature. SSP does not contrast artifacts and brain activity. Rather, the complete subspace spanned by the artifact topographies is projected away from the recorded data. This leads to un-distorted data only in the highly unlikely case when artifact and brain activity have exactly orthogonal topographies. This is generally not the case in real data. In the likely event that evoked brain activity has a topography  correlated with the artifact, this method removes the correlated fraction of the brain activity. As one of the negative consequences, maps of the corrected brain activity will be severely distorted after SSP correction.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
It is important to get good templates for the topographies of the artifact using pattern search and averaging. Then the topographies can be used as spatial components during source analysis to separate brain from artifactual activities (preferred method). &lt;br /&gt;
&lt;br /&gt;
For this load the data segments and the averaged artifacts into the source analysis module and use the PCA on the artifacts to add spatial components to the solution.&lt;br /&gt;
&lt;br /&gt;
The second method is based on subspace projection which regressed the artifact topographies out and distorts the topographies during source analysis. Use the artifact correction of the on-going EEG, average and save the corrected averages. When reopening a corrected average file, artifact correction coefficients will be read and automatically used (only in BESA 5.0) for subspace projection of the data prior to source analysis. In the source analysis module, the forward vectors will be subspace projection and (similarly) distorted.&lt;br /&gt;
&lt;br /&gt;
The advantage of the first, preferred method is that the source waveform of the artifact and brain signals can be compared to see the epochs of critical interference. Maps are not distorted. The artifact correction of the on-going EEG (second method) contrast the artifact against the background EEG rhythms but not against the much smaller evoked response components to be averaged.&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Handling_Artifacts_in_BESA</id>
		<title>Handling Artifacts in BESA</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Handling_Artifacts_in_BESA"/>
				<updated>2021-05-05T15:44:22Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Artifact correction always aims at extracting unwanted signals like EOG, EKG or external noise from the data,&lt;br /&gt;
while leaving all brain activity of interest as undisturbed as possible. To achieve this, artifact and brain topographies must be separated. Depending on whether one is dealing with spontaneous or evoked activity, different approaches for artifact correction are appropriate.  However, if the data contain only a few artifacts and a sufficient number of artifact-free trials are retained, using artifact rejection rather than correction is advised as this avoids the distortion resulting from correction.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Principles of artifact correction ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For artifact correction, artifact and brain activities must be identified and separated. In general, artifact and brain topographies will be spatially correlated. Hence, a simple regression or the projection of the data onto the subspace orthogonal to the artifact topographies will severely distort the data. For a correction without distortion, it is not sufficient to define the artifact topographies (to be removed), but it is equally necessary to create a model or a spatial description of the brain topographies (to be retained).&lt;br /&gt;
&lt;br /&gt;
== Artifact correction Methods ==&lt;br /&gt;
&lt;br /&gt;
=== Adaptive artifact correction &amp;lt;ref&amp;gt;[http://journals.lww.com/clinicalneurophys/Abstract/2002/03000/Artifact_Correction_of_the_Ongoing_EEG_Using.2.aspx Ille, Nicole, Patrick Berg, and Michael Scherg (2002). &amp;quot;Artifact correction of the ongoing EEG using spatial filters based on artifact and brain signal topographies.&amp;quot;]'' Journal of clinical neurophysiology 19.2 (2002): 113-124.''&amp;lt;/ref&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
This method estimates the brain activity from the data currently displayed on the screen. The data is scanned in specified time intervals. Those segments are considered to represent brain activity where 1) the correlation between data and artifact topography does not exceed a certain threshold and 2) the signal amplitudes are below a specified threshold. Of the remaining segments a principal component analysis (PCA) is performed. All PCA components explaining more than the minimum variance specified in the box Adaptive Model: PCA Topography are maintained. They span the brain signal subspace. &lt;br /&gt;
&lt;br /&gt;
In a next step, the recorded data is decomposed using all topographies into a linear combination of brain and artifact activities. Thus, the estimated artifact signals are much less overlapped with brain activity and can be subtracted from the original signals without much distortion. This approach is recommended, in particular, for the review of continuous EEG or MEG data.&lt;br /&gt;
&lt;br /&gt;
=== Surrogate model approach &amp;lt;ref&amp;gt;[http://www.sciencedirect.com/science/article/pii/0013469494900949 Berg, Patrick, and Michael Scherg. (1994) &amp;quot;A multiple source approach to the correction of eye artifacts.&amp;quot;] ''Electroencephalography and clinical neurophysiology 90.3 (1994): 229-241.''&amp;lt;/ref&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Here, brain activity is modeled by a model consisting of multiple equivalent current dipoles. The artifact topographies are added to this model and the combined model is then applied to the recorded data. Again, the estimated inverse signals separate the brain activity associated with the surrogate sources from the artifacts to a high degree. Thus, the artifact signals can be subtracted without considerable distortion of the activities originating in the modeled regions. This approach considers the activity in the modeled brain regions while the on-going EEG is not modeled accurately.&lt;br /&gt;
&lt;br /&gt;
Therefore, the surrogate method is especially recommended for the correction of data to be averaged if the average signal is smaller than the EEG or MEG background. In this case a model cannot be estimated from the on-going data. Therefore, a-priori knowledge of the involved brain regions should be employed to create an appropriate surrogate model. &lt;br /&gt;
&lt;br /&gt;
===Subspace projection (SSP, regression) ===&lt;br /&gt;
&lt;br /&gt;
This approach has been commonly applied in the literature. SSP does not contrast artifacts and brain activity. Rather, the complete subspace spanned by the artifact topographies is projected away from the recorded data. This leads to un-distorted data only in the highly unlikely case when artifact and brain activity have exactly orthogonal topographies. This is generally not the case in real data. In the likely event that evoked brain activity has a topography  correlated with the artifact, this method removes the correlated fraction of the brain activity. As one of the negative consequences, maps of the corrected brain activity will be severely distorted after SSP correction.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&lt;br /&gt;
It is important to get good templates for the topographies of the artifact using pattern search and averaging. Then the topographies can be used as spatial components during source analysis to separate brain from artifactual activities (preferred method). &lt;br /&gt;
&lt;br /&gt;
For this load the data segments and the averaged artifacts into the source analysis module and use the PCA on the artifacts to add spatial components to the solution.&lt;br /&gt;
&lt;br /&gt;
The second method is based on subspace projection which regressed the artifact topographies out and distorts the topographies during source analysis. Use the artifact correction of the on-going EEG, average and save the corrected averages. When reopening a corrected average file, artifact correction coefficients will be read and automatically used (only in BESA 5.0) for subspace projection of the data prior to source analysis. In the source analysis module, the forward vectors will be subspace projection and (similarly) distorted.&lt;br /&gt;
&lt;br /&gt;
The advantage of the first, preferred method is that the source waveform of the artifact and brain signals can be compared to see the epochs of critical interference. Maps are not distorted. The artifact correction of the on-going EEG (second method) contrast the artifact against the background EEG rhythms but not against the much smaller evoked response components to be averaged.&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=MF_Error_211</id>
		<title>MF Error 211</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=MF_Error_211"/>
				<updated>2021-05-05T12:55:03Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA MRI&amp;lt;br/&amp;gt;BESA Statistics&amp;lt;br/&amp;gt;BESA Connectivity&lt;br /&gt;
|version = BESA MRI 1.0 or higher&amp;lt;br/&amp;gt;BESA Statistics 1.0 or higher&amp;lt;br/&amp;gt;BESA Connectivity 1.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The '''error MF_211''' means that something unexpected happened and the program noticed that.&lt;br /&gt;
&lt;br /&gt;
[[File:Error_MF_211.png]]&lt;br /&gt;
&lt;br /&gt;
In this case you can edit a configuration file in order to activate a logging mechanism that will record any inconsistencies during the runtime of the application and write them to a log file. You can attach these log files to your support request when using our support form: [http://besa.de/contact/support/form.php BESA support form]&lt;br /&gt;
&lt;br /&gt;
Please read the following chapters depending on the application you are using.&lt;br /&gt;
&lt;br /&gt;
== BESA MRI ==&lt;br /&gt;
&lt;br /&gt;
Please edit the file '''BESA MRI.cfg''' (see below on where to find this file) and add the following lines to the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Common]&lt;br /&gt;
LogFile=0x0000000000000001&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that BESA MRI generates the log-file '''BESA MRI.log''' during processing.&lt;br /&gt;
&lt;br /&gt;
* For Windows 7, Windows 8 and Windows 10, both '''BESA MRI.cfg''' and '''BESA MRI.log''' files are located in the folder:&lt;br /&gt;
** BESA MRI 2.0: '''C:\Users\&amp;lt;User Name&amp;gt;\AppData\Local\BESA MRI\Settings\'''&lt;br /&gt;
** BESA MRI 3.0: '''C:\Users\&amp;lt;User Name&amp;gt;\Documents\BESA MRI\Settings\'''&lt;br /&gt;
* If you cannot find &amp;quot;C:\Users\&amp;lt;User Name&amp;gt;\AppData\&amp;quot; folder in the File Explorer, please change View setting to see hidden items.&lt;br /&gt;
&lt;br /&gt;
== BESA Statistics ==&lt;br /&gt;
&lt;br /&gt;
Please edit the file '''BESA Statistics.cfg''' (see below on where to find this file) and add the following lines to the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Common]&lt;br /&gt;
LogFile=0x0000000000000001&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that BESA Statistics generates the log-file '''BESA Statistics.log''' during processing.&lt;br /&gt;
&lt;br /&gt;
* For Windows 7, Windows 8 and Windows 10, both '''BESA Statistics.cfg''' and '''BESA Statistics.log''' files are located in the folder:&lt;br /&gt;
** '''C:\Users\&amp;lt;User Name&amp;gt;\AppData\Local\BESA Statistics\Settings\'''&lt;br /&gt;
* If you cannot find &amp;quot;C:\Users\&amp;lt;User Name&amp;gt;\AppData\&amp;quot; folder in the File Explorer, please change View setting to see hidden items.&lt;br /&gt;
&lt;br /&gt;
== BESA Connectivity ==&lt;br /&gt;
&lt;br /&gt;
Please edit the file '''BESA Connectivity.cfg''' (see below on where to find this file) and add the following lines to the end of the file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
[Common]&lt;br /&gt;
LogFile=0x0000000000000001&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that BESA Connectivity generates the log-file '''BESA Connectivity.log''' during processing.&lt;br /&gt;
&lt;br /&gt;
* For Windows 7, Windows 8 and Windows 10, both '''BESA Connectivity.cfg''' and '''BESA Connectivity.log''' files are located in the folder:&lt;br /&gt;
** '''C:\Users\&amp;lt;User Name&amp;gt;\AppData\Local\BESA Connectivity\Settings\'''&lt;br /&gt;
* If you cannot find &amp;quot;C:\Users\&amp;lt;User Name&amp;gt;\AppData\&amp;quot; folder in the File Explorer, please change View setting to see hidden items.&lt;br /&gt;
&lt;br /&gt;
[[Category:Troubleshooting]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Inserting_Triggers_Relative_to_Existing_Events</id>
		<title>Inserting Triggers Relative to Existing Events</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Inserting_Triggers_Relative_to_Existing_Events"/>
				<updated>2021-05-05T12:52:19Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Say you are interested in studying neural activity that precedes an existing trigger. This can be addressed in the following ways:&lt;br /&gt;
&lt;br /&gt;
# You are interested in a certain epoch that precedes the trigger event that is already coded. So, instead of entering a new trigger code, you could just add a new condition that works on the existing trigger code, and merely changes the epoch of interest. Presumably you have defined a condition where you are looking at the activity around the trigger event: some baseline before and then the activity that follows the trigger. Now, you can use the ERP-&amp;gt; Edit Paradigm to insert a new condition (CURRENT.code IS ... ). Then click on the “Epoch” tab and modify the epoch of this new condition – e.g. -1000 ms...-200 ms, also change the baseline epoch accordingly, then highlight the new condition in the list, and assign the epoch to the new condition. This condition will now average over the defined epoch that precedes the trigger.&lt;br /&gt;
#If you really need a new trigger code, you can export the trigger codes as event file, using the menu ERP-&amp;gt;Save Events As...  This will save events as a text file. Then open this “*.evt” file in a text editor or e.g. in Excel. The file lists the elapsed time in microseconds, and the event type. Now, for all event types that you want to replace, subtract 1000000 from the number in the first column. Change the code of the trigger to a new value, e.g. 511. Get rid of the events that you don’t want to change. Save this file under a different name in text format, and open it again in BESA using ERP-&amp;gt;Open Event File... (For example, you can use Excel in the following way: Open the file. Select all columns, and sort by the “Comnt” column. Delete all rows that contain trigger events that you don’t want to change. In cell E2, type the formula “=A2-1000000” and apply to all rows. Then copy this and paste values back into the A column. Delete column E. Change column C values (TriNo). Then save as text file, and re-load in BESA.)&lt;br /&gt;
&lt;br /&gt;
[[Category:ERP/ERF]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Cluster_Alpha_vs._Neighbor_Distance</id>
		<title>Cluster Alpha vs. Neighbor Distance</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Cluster_Alpha_vs._Neighbor_Distance"/>
				<updated>2021-05-05T12:51:20Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Statistics&lt;br /&gt;
|version = BESA Statistics 1.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
It is often assumed that the cluster size should be manipulated by varying the neighborhood distance. While this is possible, it is not 100% correct. Cluster size should be manipulated by using the ''&amp;quot;Cluster Alpha&amp;quot;'' value, i.e. the alpha level that determines, if a sampling point will be included in the cluster or not. A higher ''&amp;quot;Cluster Alpha&amp;quot;'' value (e.g. p = 0.1) will lead to larger clusters, a smaller ''&amp;quot;Cluster Alpha&amp;quot;'' value (e.g. p = 0.001) will lead to smaller clusters, as the entry threshold for a sampling point is thus raised. '''The ''&amp;quot;Cluster Alpha&amp;quot;'' value is not the chosen significance level of the permutation test!''' It merely determines the size of the original clusters entering the permutation.&lt;br /&gt;
&lt;br /&gt;
[[File:Grid_types.png|thumb|right|500px|Figure 1. Grid types: regular grid (left) and irregular grid (right)]]&lt;br /&gt;
&lt;br /&gt;
The idea of the ''&amp;quot;Neighbor Distance&amp;quot;'' is to define neighborhood (neighbor relations) of a given node (in our case a node could be an EEG/MEG channel or a voxel in the volume conductor). In the case of voxels, the grid used within the volume conductor (the head model) is a regular grid (see Figure 1 left) and the direct neighbors of a given node are uniquely defined – all nodes directly accessible from the current node (i.e. there are no nodes between the current node and its neighbors).&lt;br /&gt;
&lt;br /&gt;
In the case of EEG/MEG data, the channels are not in a regular grid but in an irregular one (see Figure 1 right) and the neighbors of node A1 (see Figure 1 right) are not uniquely determined. It could be that only A2 is a neighbor of A1 or it could be that all nodes are defined as neighbors of A1. That is why it is necessary to manually define a radius (neighborhood distance) that includes all neighbors of node A1. One could choose a large radius like 100 cm. This makes no sense, however, because this way a direct connection between all nodes would be established. This could theoretically lead to a cluster of one left ear electrode and one right ear electrode – without any real connection in between.&lt;br /&gt;
&lt;br /&gt;
The idea of the neighbor distance is to connect each node with its direct neighbors. Since the grid in sensor level data is not equidistant, a manually chosen distance will yield a different number of neighbors for different nodes but this is not critical.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How to determine the size of a cluster?'''&lt;br /&gt;
&lt;br /&gt;
The first possibility is to define the cluster size as the number of points (time samples, voxels and channels) belonging to a given cluster. Then if you use a denser grid you are going to get greater clusters (i.e. clusters with more grid points). Such a measure has no statistical significance. There is another possibility for measuring the size of a cluster which could be more&lt;br /&gt;
interesting than the previous one. That is the cluster value – it is a value used as a measure for the statistical relevance of the cluster.  &amp;lt;br/&amp;gt;&lt;br /&gt;
In BESA Statistics this is a sum of all ''t-values'' resulted from the preliminary statistics belonging to points of the current cluster. But this value is also relative and could be useful only in the current comparison and not between different statistical&lt;br /&gt;
comparisons. For example, a cluster value of 500 could be highly significant in the current comparison and in another project could be not significant at all. That is why we don’t report this value but we use it for the construction of the non-parametric probability distribution. The value which is useful in this context is the p-value. This value is comparable between the different&lt;br /&gt;
experiments and comparisons and within a single comparison one could say that small ''p-values'' correspond to large cluster values, i.e. the p-value could be used as a measure for the ''statistical size'' of a cluster.&amp;lt;br/&amp;gt;&lt;br /&gt;
The best way to understand the statistical parameters is to play with them and see what happens. If you use ''Cluster Alpha = 0.05'' and the whole brain is determined as a single cluster then you have to use lower alpha value (e.g. 0.01), or if your neighbor distance is 3 cm and this yields 0 neighbors in average then you have to increase it until the number of neighbors&lt;br /&gt;
becomes e.g. 3 or more (depending on your electrode montage).&lt;br /&gt;
&lt;br /&gt;
[[Category:Statistics]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Event_File_Format</id>
		<title>Event File Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Event_File_Format"/>
				<updated>2021-05-05T12:50:43Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Additional Event Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
Event files (extension *.evt) contain triggers and events and can be loaded as an additional file to provide more information about the whole course of an EEG/MEG recording.&lt;br /&gt;
An event file can be edited by opening it in any text editor, e.g. Notepad. It is also possible to create new event files from scratch which can be imported into the data file later. &lt;br /&gt;
Note the following conventions for event files:&lt;br /&gt;
* Event descriptions are given in the columns of the event file&lt;br /&gt;
* Each file must contain a header line and data lines&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
&lt;br /&gt;
The header is comprised of abbreviated descriptions for each column. Each entry in the data line must be specified in the header line at the correct column position. The order of the data elements and their description in the header line can be chosen arbitrarily and the entries can be separated by commas, tabs and/or spaces. The last n data elements can be omitted, if they are neither Code nor one of ''Tms'', ''Tmu'' or ''Tsec''. The following codes are recognized by the ERP module:&lt;br /&gt;
* ''Code'' - event code (integer, see section [[#Event Codes|Event Codes]])&lt;br /&gt;
* ''Tms'' - event time in milliseconds relative to the start of the data file or ''Tmu'' [in microseconds] or ''Tsec'' [in sec] (floating point value)&lt;br /&gt;
* ''TriNo'' - trigger number (integer) (identifies the trigger in the event bar of the main module)&lt;br /&gt;
* ''RCode'' - reaction code (integer)&lt;br /&gt;
* ''RTms'' - reaction time in milliseconds or ''RTmu'' or ''RTsec'' (floating point value)&lt;br /&gt;
* ''Comnt'' - comment to describe event (string of up to 39 characters), will be truncated if longer than 39 characters. &lt;br /&gt;
You can also define columns which should not be recognized by the ERP module. Simply specify these columns in the header with any unknown code. Therefore you might be able to use previously generated files without major changes. &lt;br /&gt;
&lt;br /&gt;
=== Event Codes ===&lt;br /&gt;
&lt;br /&gt;
The event code Code must be one of the following integers:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | Code&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | Event/Trigger Type&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Trigger&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Comment&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Marker&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Pattern1&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| Pattern2&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| Pattern3&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| Pattern4&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Pattern5&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| Artifact on&lt;br /&gt;
|-&lt;br /&gt;
| 22&lt;br /&gt;
| Artifact off&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| Epoch on&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| Epoch off&lt;br /&gt;
|-&lt;br /&gt;
| 41&lt;br /&gt;
| New segment&lt;br /&gt;
|-&lt;br /&gt;
| 42&lt;br /&gt;
| Average segment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Additional Event Information ===&lt;br /&gt;
&lt;br /&gt;
The event reaction time, event reaction code and event comment are represented by the comment in the main module as &amp;quot;''Comment (Rx,T____)''&amp;quot;, where ''Comment'' is the event comment, ''x'' describes the reaction code and the underscored line will be filled with the reaction time. Reaction time and reaction code are only read if the event code specifies it as a trigger.&lt;br /&gt;
A &amp;quot;New Segment&amp;quot; event can include time information that defines the starting time of the segment. This is defined in the ''TriNo'' column of the event file. The format is YYYY-MM-DDTHH:MM:SS, e.g. 2010-04-26T15:30:20.31 (note: seconds are a decimal number). If no time is defined, use a hyphen ('-'). See [[#Examples|Examples]] below.&lt;br /&gt;
An &amp;quot;Average Segment&amp;quot; includes the prestimulus baseline interval in microseconds. This is defined in the ''TriNo'' column of the event file.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
The file is valid if the header line contains at least the entries Code and one of ''Tms'', ''Tmu'' and ''Tsec''. The header specifications are case insensitive.&lt;br /&gt;
The file is invalid, if&lt;br /&gt;
* there are ambiguities in the header &lt;br /&gt;
* there is a data type mismatch in the data line &lt;br /&gt;
* an event time specifies an event which happened later than the end of the acquisition&lt;br /&gt;
Each omitted data entry is set to 0 or empty string by default.&lt;br /&gt;
A line with an invalid or unknown event code ''Code'' is skipped.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
Here are a couple of typical examples:&lt;br /&gt;
&lt;br /&gt;
'''1) Simple trigger file'''&lt;br /&gt;
{| style=&amp;quot;border-spacing: 2px; border: 0px white;&amp;quot;&lt;br /&gt;
| Tms&lt;br /&gt;
| Code&lt;br /&gt;
| TriNo&lt;br /&gt;
| Comnt&lt;br /&gt;
|-&lt;br /&gt;
| 100.234&lt;br /&gt;
| 1&lt;br /&gt;
| 3&lt;br /&gt;
| Trigger: 3&lt;br /&gt;
|-&lt;br /&gt;
| 2300.456&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| Trigger:1&lt;br /&gt;
|-&lt;br /&gt;
| 4500.21&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| Trigger:1&lt;br /&gt;
|-&lt;br /&gt;
| 9800.47&lt;br /&gt;
| 1&lt;br /&gt;
| 7&lt;br /&gt;
| Trigger:7&lt;br /&gt;
|-&lt;br /&gt;
| 12500.78&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| Trigger:2&lt;br /&gt;
|-&lt;br /&gt;
| 21237&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| Trigger:1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This example event file can be downloaded here: [[Media:EventFileExample1.evt|Example 1]]&lt;br /&gt;
&lt;br /&gt;
'''2) Trigger file with reaction code and reaction time'''&lt;br /&gt;
{| style=&amp;quot;border-spacing: 2px; border: 0px white;&amp;quot;&lt;br /&gt;
| Tms&lt;br /&gt;
| Code&lt;br /&gt;
| TriNo&lt;br /&gt;
| RTsec&lt;br /&gt;
| RCode&lt;br /&gt;
|-&lt;br /&gt;
| 100.234&lt;br /&gt;
| 1&lt;br /&gt;
| 3&lt;br /&gt;
| 0.23&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 2300.456&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1.11&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 4500.21&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 0.15&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 9800.47&lt;br /&gt;
| 1&lt;br /&gt;
| 7&lt;br /&gt;
| 0.87&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 12500.78&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| 2.1&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 21237&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 3&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This example event file can be downloaded here: [[Media:EventFileExample2.evt|Example 2]]&lt;br /&gt;
&lt;br /&gt;
'''3) Event file without triggers'''&lt;br /&gt;
{| style=&amp;quot;border-spacing: 2px; border: 0px white;&amp;quot;&lt;br /&gt;
| Tmu&lt;br /&gt;
| Code&lt;br /&gt;
| Comnt&lt;br /&gt;
|-&lt;br /&gt;
| 10000.234&lt;br /&gt;
| 3&lt;br /&gt;
| Marker&lt;br /&gt;
|-&lt;br /&gt;
| 230000.456&lt;br /&gt;
| 12&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 450000.21&lt;br /&gt;
| 14&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 980000.47&lt;br /&gt;
| 12&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 1250000.78&lt;br /&gt;
| 3&lt;br /&gt;
| Marker&lt;br /&gt;
|-&lt;br /&gt;
| 2123700&lt;br /&gt;
| 2&lt;br /&gt;
| Comment&lt;br /&gt;
|-&lt;br /&gt;
| 2534100.567&lt;br /&gt;
| 15&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This example event file can be downloaded here: [[Media:EventFileExample3.evt|Example 3]]&lt;br /&gt;
&lt;br /&gt;
'''4) File including triggers and events'''&lt;br /&gt;
{| style=&amp;quot;border-spacing: 2px; border: 0px white;&amp;quot;&lt;br /&gt;
| Tms&lt;br /&gt;
| Code&lt;br /&gt;
| TriNo&lt;br /&gt;
| RTsec&lt;br /&gt;
| RCode&lt;br /&gt;
| Comnt&lt;br /&gt;
|-&lt;br /&gt;
| 100.234&lt;br /&gt;
| 2&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| CommentSet&lt;br /&gt;
|-&lt;br /&gt;
| 2300.456&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 4500.21&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 0.15&lt;br /&gt;
| 1&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 9800.47&lt;br /&gt;
| 11&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 12500.78&lt;br /&gt;
| 3&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 21237&lt;br /&gt;
| 2&lt;br /&gt;
| 0&lt;br /&gt;
| 3&lt;br /&gt;
| 1&lt;br /&gt;
| Comment&lt;br /&gt;
|-&lt;br /&gt;
| 25341.567&lt;br /&gt;
| 15&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This example event file can be downloaded here: [[Media:EventFileExample4.evt|Example 4]]&lt;br /&gt;
&lt;br /&gt;
'''5) New Segments'''&lt;br /&gt;
{| style=&amp;quot;border-spacing: 2px; border: 0px white;&amp;quot;&lt;br /&gt;
| Tms&lt;br /&gt;
| Code&lt;br /&gt;
| TriNo&lt;br /&gt;
| Comnt&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 41&lt;br /&gt;
| 2010-04-26T15:30:20.31&lt;br /&gt;
| Start recording&lt;br /&gt;
|-&lt;br /&gt;
| 21000&lt;br /&gt;
| 41&lt;br /&gt;
| 2010-04-27T09:17:00.0&lt;br /&gt;
| Next day&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The new segment at the time 0 overrides the start time in the file.&lt;br /&gt;
A second segment at 21 s starts a new data block one day later at 9:17.&lt;br /&gt;
&lt;br /&gt;
This example event file can be downloaded here: [[Media:EventFileExample5.evt|Example 5]]&lt;br /&gt;
&lt;br /&gt;
'''6) Average Segments'''&lt;br /&gt;
{| style=&amp;quot;border-spacing: 2px; border: 0px white;&amp;quot;&lt;br /&gt;
| Tms&lt;br /&gt;
| Code&lt;br /&gt;
| TriNo&lt;br /&gt;
| Comnt&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 42&lt;br /&gt;
| 100000&lt;br /&gt;
| Cond 1: 25 avs&lt;br /&gt;
|-&lt;br /&gt;
| 1100&lt;br /&gt;
| 42&lt;br /&gt;
| 200000&lt;br /&gt;
| Cond 2: 201 avs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file contains two average segments. The first, with a prestimulus interval of 100 ms, has a duration of 1100 ms. The second, with a prestimulus interval of 200 ms, has a length up to the end of the data file.&lt;br /&gt;
&lt;br /&gt;
This example event file can be downloaded here: [[Media:EventFileExample6.evt|Example 6]]&lt;br /&gt;
&lt;br /&gt;
[[Category:ERP/ERF]] [[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Event_File_Format</id>
		<title>Event File Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Event_File_Format"/>
				<updated>2021-05-05T12:49:23Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
Event files (extension *.evt) contain triggers and events and can be loaded as an additional file to provide more information about the whole course of an EEG/MEG recording.&lt;br /&gt;
An event file can be edited by opening it in any text editor, e.g. Notepad. It is also possible to create new event files from scratch which can be imported into the data file later. &lt;br /&gt;
Note the following conventions for event files:&lt;br /&gt;
* Event descriptions are given in the columns of the event file&lt;br /&gt;
* Each file must contain a header line and data lines&lt;br /&gt;
&lt;br /&gt;
=== File Header ===&lt;br /&gt;
&lt;br /&gt;
The header is comprised of abbreviated descriptions for each column. Each entry in the data line must be specified in the header line at the correct column position. The order of the data elements and their description in the header line can be chosen arbitrarily and the entries can be separated by commas, tabs and/or spaces. The last n data elements can be omitted, if they are neither Code nor one of ''Tms'', ''Tmu'' or ''Tsec''. The following codes are recognized by the ERP module:&lt;br /&gt;
* ''Code'' - event code (integer, see section [[#Event Codes|Event Codes]])&lt;br /&gt;
* ''Tms'' - event time in milliseconds relative to the start of the data file or ''Tmu'' [in microseconds] or ''Tsec'' [in sec] (floating point value)&lt;br /&gt;
* ''TriNo'' - trigger number (integer) (identifies the trigger in the event bar of the main module)&lt;br /&gt;
* ''RCode'' - reaction code (integer)&lt;br /&gt;
* ''RTms'' - reaction time in milliseconds or ''RTmu'' or ''RTsec'' (floating point value)&lt;br /&gt;
* ''Comnt'' - comment to describe event (string of up to 39 characters), will be truncated if longer than 39 characters. &lt;br /&gt;
You can also define columns which should not be recognized by the ERP module. Simply specify these columns in the header with any unknown code. Therefore you might be able to use previously generated files without major changes. &lt;br /&gt;
&lt;br /&gt;
=== Event Codes ===&lt;br /&gt;
&lt;br /&gt;
The event code Code must be one of the following integers:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | Code&lt;br /&gt;
! style=&amp;quot;text-align: center; font-weight: bold;&amp;quot; | Event/Trigger Type&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Trigger&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Comment&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Marker&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Pattern1&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| Pattern2&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| Pattern3&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| Pattern4&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Pattern5&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| Artifact on&lt;br /&gt;
|-&lt;br /&gt;
| 22&lt;br /&gt;
| Artifact off&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| Epoch on&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| Epoch off&lt;br /&gt;
|-&lt;br /&gt;
| 41&lt;br /&gt;
| New segment&lt;br /&gt;
|-&lt;br /&gt;
| 42&lt;br /&gt;
| Average segment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Additional Event Information ===&lt;br /&gt;
&lt;br /&gt;
The event reaction time, event reaction code and event comment are represented by the comment in the main module as &amp;quot;''Comment (Rx,T____)''&amp;quot;, where ''Comment'' is the event comment, ''x'' describes the reaction code and the underscored line will be filled with the reaction time. Reaction time and reaction code are only read if the event code specifies it as a trigger.&lt;br /&gt;
A &amp;quot;New Segment&amp;quot; event can include time information that defines the starting time of the segment. This is defined in the ''TriNo'' column of the event file. The format is YYYY-MM-DDTHH:MM:SS, e.g. 2010-04-26T15:30:20.31 (note: seconds are a decimal number). If no time is defined, use a hyphen ('-'). See [[#Examples|below]]) for an example.&lt;br /&gt;
An &amp;quot;Average Segment&amp;quot; includes the prestimulus baseline interval in microseconds. This is defined in the ''TriNo'' column of the event file.&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
The file is valid if the header line contains at least the entries Code and one of ''Tms'', ''Tmu'' and ''Tsec''. The header specifications are case insensitive.&lt;br /&gt;
The file is invalid, if&lt;br /&gt;
* there are ambiguities in the header &lt;br /&gt;
* there is a data type mismatch in the data line &lt;br /&gt;
* an event time specifies an event which happened later than the end of the acquisition&lt;br /&gt;
Each omitted data entry is set to 0 or empty string by default.&lt;br /&gt;
A line with an invalid or unknown event code ''Code'' is skipped.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
Here are a couple of typical examples:&lt;br /&gt;
&lt;br /&gt;
'''1) Simple trigger file'''&lt;br /&gt;
{| style=&amp;quot;border-spacing: 2px; border: 0px white;&amp;quot;&lt;br /&gt;
| Tms&lt;br /&gt;
| Code&lt;br /&gt;
| TriNo&lt;br /&gt;
| Comnt&lt;br /&gt;
|-&lt;br /&gt;
| 100.234&lt;br /&gt;
| 1&lt;br /&gt;
| 3&lt;br /&gt;
| Trigger: 3&lt;br /&gt;
|-&lt;br /&gt;
| 2300.456&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| Trigger:1&lt;br /&gt;
|-&lt;br /&gt;
| 4500.21&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| Trigger:1&lt;br /&gt;
|-&lt;br /&gt;
| 9800.47&lt;br /&gt;
| 1&lt;br /&gt;
| 7&lt;br /&gt;
| Trigger:7&lt;br /&gt;
|-&lt;br /&gt;
| 12500.78&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| Trigger:2&lt;br /&gt;
|-&lt;br /&gt;
| 21237&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| Trigger:1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This example event file can be downloaded here: [[Media:EventFileExample1.evt|Example 1]]&lt;br /&gt;
&lt;br /&gt;
'''2) Trigger file with reaction code and reaction time'''&lt;br /&gt;
{| style=&amp;quot;border-spacing: 2px; border: 0px white;&amp;quot;&lt;br /&gt;
| Tms&lt;br /&gt;
| Code&lt;br /&gt;
| TriNo&lt;br /&gt;
| RTsec&lt;br /&gt;
| RCode&lt;br /&gt;
|-&lt;br /&gt;
| 100.234&lt;br /&gt;
| 1&lt;br /&gt;
| 3&lt;br /&gt;
| 0.23&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 2300.456&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1.11&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 4500.21&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 0.15&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| 9800.47&lt;br /&gt;
| 1&lt;br /&gt;
| 7&lt;br /&gt;
| 0.87&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| 12500.78&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| 2.1&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| 21237&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 3&lt;br /&gt;
| 1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This example event file can be downloaded here: [[Media:EventFileExample2.evt|Example 2]]&lt;br /&gt;
&lt;br /&gt;
'''3) Event file without triggers'''&lt;br /&gt;
{| style=&amp;quot;border-spacing: 2px; border: 0px white;&amp;quot;&lt;br /&gt;
| Tmu&lt;br /&gt;
| Code&lt;br /&gt;
| Comnt&lt;br /&gt;
|-&lt;br /&gt;
| 10000.234&lt;br /&gt;
| 3&lt;br /&gt;
| Marker&lt;br /&gt;
|-&lt;br /&gt;
| 230000.456&lt;br /&gt;
| 12&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 450000.21&lt;br /&gt;
| 14&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 980000.47&lt;br /&gt;
| 12&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 1250000.78&lt;br /&gt;
| 3&lt;br /&gt;
| Marker&lt;br /&gt;
|-&lt;br /&gt;
| 2123700&lt;br /&gt;
| 2&lt;br /&gt;
| Comment&lt;br /&gt;
|-&lt;br /&gt;
| 2534100.567&lt;br /&gt;
| 15&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This example event file can be downloaded here: [[Media:EventFileExample3.evt|Example 3]]&lt;br /&gt;
&lt;br /&gt;
'''4) File including triggers and events'''&lt;br /&gt;
{| style=&amp;quot;border-spacing: 2px; border: 0px white;&amp;quot;&lt;br /&gt;
| Tms&lt;br /&gt;
| Code&lt;br /&gt;
| TriNo&lt;br /&gt;
| RTsec&lt;br /&gt;
| RCode&lt;br /&gt;
| Comnt&lt;br /&gt;
|-&lt;br /&gt;
| 100.234&lt;br /&gt;
| 2&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| 0&lt;br /&gt;
| CommentSet&lt;br /&gt;
|-&lt;br /&gt;
| 2300.456&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 4500.21&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 0.15&lt;br /&gt;
| 1&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 9800.47&lt;br /&gt;
| 11&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 12500.78&lt;br /&gt;
| 3&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 21237&lt;br /&gt;
| 2&lt;br /&gt;
| 0&lt;br /&gt;
| 3&lt;br /&gt;
| 1&lt;br /&gt;
| Comment&lt;br /&gt;
|-&lt;br /&gt;
| 25341.567&lt;br /&gt;
| 15&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This example event file can be downloaded here: [[Media:EventFileExample4.evt|Example 4]]&lt;br /&gt;
&lt;br /&gt;
'''5) New Segments'''&lt;br /&gt;
{| style=&amp;quot;border-spacing: 2px; border: 0px white;&amp;quot;&lt;br /&gt;
| Tms&lt;br /&gt;
| Code&lt;br /&gt;
| TriNo&lt;br /&gt;
| Comnt&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 41&lt;br /&gt;
| 2010-04-26T15:30:20.31&lt;br /&gt;
| Start recording&lt;br /&gt;
|-&lt;br /&gt;
| 21000&lt;br /&gt;
| 41&lt;br /&gt;
| 2010-04-27T09:17:00.0&lt;br /&gt;
| Next day&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The new segment at the time 0 overrides the start time in the file.&lt;br /&gt;
A second segment at 21 s starts a new data block one day later at 9:17.&lt;br /&gt;
&lt;br /&gt;
This example event file can be downloaded here: [[Media:EventFileExample5.evt|Example 5]]&lt;br /&gt;
&lt;br /&gt;
'''6) Average Segments'''&lt;br /&gt;
{| style=&amp;quot;border-spacing: 2px; border: 0px white;&amp;quot;&lt;br /&gt;
| Tms&lt;br /&gt;
| Code&lt;br /&gt;
| TriNo&lt;br /&gt;
| Comnt&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 42&lt;br /&gt;
| 100000&lt;br /&gt;
| Cond 1: 25 avs&lt;br /&gt;
|-&lt;br /&gt;
| 1100&lt;br /&gt;
| 42&lt;br /&gt;
| 200000&lt;br /&gt;
| Cond 2: 201 avs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The file contains two average segments. The first, with a prestimulus interval of 100 ms, has a duration of 1100 ms. The second, with a prestimulus interval of 200 ms, has a length up to the end of the data file.&lt;br /&gt;
&lt;br /&gt;
This example event file can be downloaded here: [[Media:EventFileExample6.evt|Example 6]]&lt;br /&gt;
&lt;br /&gt;
[[Category:ERP/ERF]] [[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Change_Waveform_Colours</id>
		<title>Change Waveform Colours</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Change_Waveform_Colours"/>
				<updated>2021-05-05T12:48:37Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Colours of channel waveforms and labels may be modified by changing the corresponding entry in the Montage Editor configuration file '''BesaME.cfg''', which is separately stored for each user.&lt;br /&gt;
&lt;br /&gt;
The configuration file is located in the current user's folder, usually '''&amp;lt;Program folder&amp;gt;\System\UserDirs\&amp;lt;User name&amp;gt;\'''.  Here, ''&amp;lt;Program folder&amp;gt;'' specifies the BESA Research installation folder and ''&amp;lt;User name&amp;gt;'' is the user name which was used to log on to Windows.&lt;br /&gt;
&lt;br /&gt;
The colours may be set in the section '''[Colors]'''. If this section is not available, please add the '''[Colors]''' line (no quotes) at the end of the file and write the colour modifications below this line.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;''ColText...''&amp;quot; colours specify the colours of the channel labels. The &amp;quot;''ColPlot...''&amp;quot; colours specify the colours used for display in the Montage Editor. The &amp;quot;''ColWave...''&amp;quot; colours specify the colours of the channel waveforms. It is recommended to use the same or similar colour for the 3 corresponding entries.&lt;br /&gt;
&lt;br /&gt;
The colour values are given in [RED,GREEN,BLUE] triples, each value may range from 0 (weakest intensity) to 255 (maximum intensity). For internal reasons, the &amp;quot;''ColText...''&amp;quot; and &amp;quot;''ColPlot...''&amp;quot; colours must not be deep black (000,000,000). If a black colour should be set, use a colour close to black (see line ColTextPolygraficChannel=000,000,001). The difference will not be visible. &lt;br /&gt;
&lt;br /&gt;
Note that the configuration file is written when the program is closed. So do not change it while BESA Research is open. Otherwise, your changes will be&lt;br /&gt;
lost at program termination.&lt;br /&gt;
&lt;br /&gt;
The following colour settings are available (the colour triples show the default values):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! style=&amp;quot;font-weight: bold;&amp;quot; | [Colors]&lt;br /&gt;
|-&lt;br /&gt;
| ColTextMagnetometer=110,000,110&lt;br /&gt;
|-&lt;br /&gt;
| ColPlotMagnetometer=110,020,110&lt;br /&gt;
|-&lt;br /&gt;
| ColWaveMagnetometer=110,000,110&lt;br /&gt;
|-&lt;br /&gt;
| ColTextGradiometer=110,000,110&lt;br /&gt;
|-&lt;br /&gt;
| ColPlotGradiometer=110,020,110&lt;br /&gt;
|-&lt;br /&gt;
| ColWaveGradiometer=110,000,110&lt;br /&gt;
|-&lt;br /&gt;
| ColTextIntracranialChannel=104,050,000&lt;br /&gt;
|-&lt;br /&gt;
| ColPlotIntracranialChannel=104,050,020&lt;br /&gt;
|-&lt;br /&gt;
| ColWaveIntracranialChannel=104,050,000&lt;br /&gt;
|-&lt;br /&gt;
| ColTextPolygraficChannel=000,000,001&lt;br /&gt;
|-&lt;br /&gt;
| ColPlotPolygraficChannel=000,000,001&lt;br /&gt;
|-&lt;br /&gt;
| ColWavePolygraficChannel=000,000,000&lt;br /&gt;
|-&lt;br /&gt;
| ColTextAddChanMontage=110,000,255&lt;br /&gt;
|-&lt;br /&gt;
| ColWaveAddChanMontage=110,000,255&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Review]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Reading_Neuroscan_Files</id>
		<title>Reading Neuroscan Files</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Reading_Neuroscan_Files"/>
				<updated>2021-05-05T12:47:25Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research&lt;br /&gt;
|version = 5.3 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
BESA provides a file format reader that allows importing Neuroscan data in BESA Research. &lt;br /&gt;
&lt;br /&gt;
Supported file format versions are &lt;br /&gt;
* Neuroscan Version 3.x (extensions: .cnt, .avg)&lt;br /&gt;
* NeuroScan Curry 6 and 7 (extensions: .rs3 .dap .dat .ce*) (''this feature requires BESA Research 7.0 or higher'')&lt;br /&gt;
&lt;br /&gt;
== Installation of file format readers ==&lt;br /&gt;
&lt;br /&gt;
* The data reader for Neuroscan Version 3.x is already installed by default. &lt;br /&gt;
* To install the reader for NeuroScan Curry 6 and 7 data, run the '''InstallReader.exe''' application in the '''Utilities\Additional Readers\Curry7\''' subfolder of your BESA Research installation (''this feature requires BESA Research 7.0 or higher'').&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
=== Reading 16-bit vs. 32-bit Neuroscan data files ===&lt;br /&gt;
&lt;br /&gt;
Neuroscan stores data either in 16-bit or 32-bit representation, but does not say so in the file format. So there is a setting in the ''BESA.ini'' file that can be set or adapted in section &amp;lt;code&amp;gt;[Defaults]&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
NeuroScanDataNumberOfBits=32&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines the format of NeuroScan data files ('16' for 16-bit; '32' for 32-bit). If this variable is not specified, BESA uses a heuristic to (try to) decide which of the two data formats is used. This variable overrides the heuristic. If you want to specify the NeuroScan data format for specific files, create a file, named &amp;quot;16bit&amp;quot; or &amp;quot;32bit&amp;quot;, and place it in the data folder.&lt;br /&gt;
&lt;br /&gt;
Also see the Wiki page on the BESA.ini file for more details: [[The Initialization File: BESA.ini]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Reading_MEF_Files</id>
		<title>Reading MEF Files</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Reading_MEF_Files"/>
				<updated>2021-05-05T12:45:16Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research&lt;br /&gt;
|version = BESA Research 6.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The MEF (Multiscale Electrophysiology File) format is an open-source file format licensed under the Apache License, Version 2.0. It offers the option to encrypt subject identifying information using a 128-bit AES encryption. Please note that the current version of the MEF data reader can import MEF 2.0 files only. To install the MEF file format reader, run the ''InstallReaders.exe'' application located in the ''Utilities\Additional Readers\MEF\'' subfolder of your BESA Research installation directory.&lt;br /&gt;
&lt;br /&gt;
In order to read MEF data in BESA programs open the session/event file (file extension *.xml).&lt;br /&gt;
&lt;br /&gt;
For more info on the MEF format, please visit the following pages:&lt;br /&gt;
&lt;br /&gt;
[https://github.com/benbrinkmann/mef_lib_2_1 MEF 2.1 Github Repo by Ben Brinkmann]&lt;br /&gt;
&lt;br /&gt;
[https://www.mayo.edu/research/labs/bioelectronics-neurophysiology-engineering/data-code-sharing Mayo Clinic - Data and Code Sharing: Multiscale Electrophysiology Format]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/msel-source Mayo Systems Electrophysiology Lab (MSEL) Github Repo]&lt;br /&gt;
&lt;br /&gt;
More info on the Apache 2.0 license can be obtained here:&lt;br /&gt;
&lt;br /&gt;
[http://www.apache.org/licenses/LICENSE-2.0 Apache 2.0 License]&lt;br /&gt;
[[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Reading_MEF_Files</id>
		<title>Reading MEF Files</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Reading_MEF_Files"/>
				<updated>2021-05-05T12:41:14Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research&lt;br /&gt;
|version = BESA Research 6.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The MEF (Multiscale Electrophysiology File) format is an open-source file format licensed under the Apache License, Version 2.0. It offers the option to encrypt subject identifying information using a 128-bit AES encryption. Please note that the current version of the MEF data reader can import MEF 2.0 files only. To install the MEF file format reader, run the ''InstallReaders.exe'' application located in the ''Utilities\Additional Readers\MEF\'' subfolder of your BESA Research installation directory.&lt;br /&gt;
&lt;br /&gt;
In order to read MEF data in BESA programs open the session/event file (file extension *.xml).&lt;br /&gt;
&lt;br /&gt;
For more info on the MEF format, please visit the following pages:&lt;br /&gt;
&lt;br /&gt;
[https://github.com/benbrinkmann/mef_lib_2_1 MEF 2.1 Github Repo by Ben Brinkmann]&lt;br /&gt;
&lt;br /&gt;
[http://www.mayo.edu/research/labs/epilepsy-neurophysiology/mef-example-source-code Mayo Clinic - MEF]&lt;br /&gt;
&lt;br /&gt;
More info on the Apache 2.0 license can be obtained here:&lt;br /&gt;
&lt;br /&gt;
[http://www.apache.org/licenses/LICENSE-2.0 Apache 2.0 License]&lt;br /&gt;
[[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Reading_EGI_RAW_Files</id>
		<title>Reading EGI RAW Files</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Reading_EGI_RAW_Files"/>
				<updated>2021-05-05T12:40:31Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research&lt;br /&gt;
|version = BESA Research 5.3 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Net Station can export data to several data formats that BESA can read in. When sharing Net Station data with BESA, it is best to either share:&lt;br /&gt;
* Data that hasn’t been processed in any way, except segmentation markup, discussed below (ie don’t filter, don’t convert to microvolts [in the future, after a known issue in Net Station is resolved it will be possible to convert to microvolts]), or&lt;br /&gt;
* ERP data, in other words data that has been processed in Net Station all the way through averaging.&lt;br /&gt;
&lt;br /&gt;
In either case, the recommended file format is Epoch Marked Simple Binary File. Also, known as Epoch Marked Raw. Export to this format is only available in Net Station 3.0, through the File Export tool of the Waveform Tools. If you need to share Net Station data with BESA, and you don’t have access to this tool, please contact [support@egi.com EGI Support].&lt;br /&gt;
The details vary, depending on whether you are exporting unprocessed data, or ERP data. Each of these cases is discussed below:&lt;br /&gt;
&lt;br /&gt;
== Exporting Unprocessed Data ==&lt;br /&gt;
&lt;br /&gt;
=== Segmentation Markup ===&lt;br /&gt;
This section assumes you are familiar with Net Station Segmentation, and the structure of a simple standard/target experiment.&lt;br /&gt;
Net Station events contain key lists, in other words, mini databases. Using a simple standard/target experiment as an example, in Net Station all stimulii events might be named ''stim''. The distinction between standards and targets can’t be determined from the name of the event. It can only be determined from the key list in the events. In most programs, including BESA, events only have names. They don’t have key lists.&lt;br /&gt;
To make the jump from key-list events to non-keylist events, you must use Net Station’s segmentation markup. Segmentation markup adds events to the recording that BESA can use. To use segmentation markup, create a segmentation specification, and check the ''Mark Up File'' checkbox in the segmentation specification editor. When you run segmentation using this specification, instead of segmenting the file, new events will be added for BESA.&lt;br /&gt;
For example, if all your standard and target stimulii are named ''stim'', you would create a segmentation specification just as you would for segmenting this file into standard and target categories. Then, if you check the ''Mark Up File'' checkbox, the specification will cause new events to be added to the file instead of segmentation. Then, you can add events called ''stnd'' for standard, and ''targ'' for target.&lt;br /&gt;
'''Note:''' Although Net Station allows you to add markup events with spaces in the names, it might cause unpredictable results in BESA. Also, Net Station generates the event names automatically, but you can modify them. Sometimes the automatically generated ones contain spaces. Simply edit them, for example, replace thespaces with underscore characters.&lt;br /&gt;
The objective is to be able to do segmentation in BESA. So, before exporting to BESA, use segmentation markup to add all the events you might want to use in BESA. Although a simple standard/target experiment was used in this example, you can combine the full power of Net Station’s segmentation with the segmentation markup feature.&lt;br /&gt;
&lt;br /&gt;
=== Export ===&lt;br /&gt;
As mentioned above, you need to export to the Epoch Marked Simple Binary File format using the File Export tool. The following explains the options to use:&lt;br /&gt;
Since this data hasn’t been rereferenced, do not export the reference channel. In other words, leave the ''Export Reference Channel'' checkbox unchecked.&lt;br /&gt;
You have the option of using integer or floating point precision. Each of these options is discussed below.&lt;br /&gt;
The advantage of using integer precision is that export is faster, and results in a file that is about half the size of floating point. The disadvantage is that the individual gains and zeros aren’t applied to the data. If your amplifier is in spec, the loss should be negligible. If you choose this option, leave the ''Calibrate Data'' checkbox unchecked.&lt;br /&gt;
The advantage of using floating point precision is that it is much more precise. The disadvantage is that export is slower, and results in a file that is about twice the size of integer. If you choose this option, make sure that you do check the ''Calibrate Data'' checkbox.&lt;br /&gt;
In either case, set the name of the output file to append the extention ''.raw''.&lt;br /&gt;
&lt;br /&gt;
=== Opening in BESA ===&lt;br /&gt;
After you have generated the .raw file, move it to the BESA PC. You should now be able to read this file with BESA. To do so, in the File Open Dialog Box, set the “Files of type” dropdown list to ''EGI Formats(*.raw)''.&lt;br /&gt;
If you do this, BESA will read all the events in the file, and assign trigger numbers to them (except the following, which are meaningless to BESA: CELL, SESS, bgin and TRSP).&lt;br /&gt;
Optionally, you can control which events are read by BESA by creating a .trig file. A .trig file is a tab delimited file that contains one line for each event type that you want BESA to read. Each line consists of the name of the event, followed by a tab character, followed by a number between 1 and &amp;lt;255? 256? 65535? 65536?&amp;gt;. The following is an example of a .trig file:&lt;br /&gt;
&lt;br /&gt;
stnd 1&lt;br /&gt;
&lt;br /&gt;
targ 2&lt;br /&gt;
&lt;br /&gt;
resp 128&lt;br /&gt;
&lt;br /&gt;
You might want to use a .trig file if:&lt;br /&gt;
* your data has a large number of events, and you don’t need most of them in BESA, or,&lt;br /&gt;
* you want to include events with any of these names: CELL, SESS, bgin and TRSP.&lt;br /&gt;
&lt;br /&gt;
To use a .trig file, just make sure that the file is in the same directory as your data file when you open the data file. In addition, the .trig file must be named either ''default.trig'', or &amp;lt;your data file name&amp;gt;.trig (eg ''subject1.trig'').&lt;br /&gt;
&lt;br /&gt;
=== Loading Sensor Coordinates ===&lt;br /&gt;
After you have opened the file, you must load the sensor coordinate files (''File'' -&amp;gt; ''Head Surface Points and Sensors'' -&amp;gt; ''Load Coordinate Files''. If want to use average sensor position files (as opposed to files individually digitized for your subject), use the files in ''C:\Besa\Examples\Xtras\EEG Binary Formats\EGI'' directory.&lt;br /&gt;
&lt;br /&gt;
* If you have 256 channel data, use GSN256andRef.ela, and GSN257.sfp.&lt;br /&gt;
* If you have 128 channel data, use GSN128andRef.ela, and GSN129.sfp.&lt;br /&gt;
* If you have 64 channel data v1, use GSN64andRef.ela, and GSN65v1_0.sfp.&lt;br /&gt;
* If you have 64 channel data v2, use GSN64andRef.ela, and GSN65v2_0.sfp.&lt;br /&gt;
&lt;br /&gt;
You are now ready to do your ERP derivation in BESA.&lt;br /&gt;
&lt;br /&gt;
== Exporting Averaged ERP Data == &lt;br /&gt;
&lt;br /&gt;
=== Export ===&lt;br /&gt;
If you have derived your ERP in Net Station, and wish to export it to BESA for source localization, once again, use the File Export tool, exporting in the Epoch Marked Simple Binary File format. The following explains the options to use:&lt;br /&gt;
(This explanation assumes that the data has been rereferenced during the ERP derivation process.)&lt;br /&gt;
Since this data has been rereferenced, you should export the reference channel. In other words, check the ''Export Reference Channel'' checkbox.&lt;br /&gt;
For averaged data, you need to export using floating point precision. Since the data has been calibrated during the ERP derivation process, it doesn’t matter what you do with the ''Calibrate Data'' checkbox. Set the name of the output file to append the extention ''.raw''.&lt;br /&gt;
When exporting averaged ERP data (or any Net Station data that has been categorized, for example segmented data), Net Station generates an additional file: &amp;lt;your file name&amp;gt;.epoc. This file contains the names of the conditions for each epoch in the data.&lt;br /&gt;
&lt;br /&gt;
=== Opening in BESA ===&lt;br /&gt;
After you have generated the .raw file, move it, and the .epoc file, to the BESA PC, keeping both files in the same directory. You should now be able to read this file with BESA. To do so, in the ''File Open'' dialog box, set the ''Files of Type'' dropdown list to ''EGI Formats(*.raw)''.&lt;br /&gt;
&lt;br /&gt;
=== Loading Sensor Coordinates ===&lt;br /&gt;
After you have opened the file, you must load the sensor coordinate files (''File'' -&amp;gt; ''Head Surface Points and Sensors'' -&amp;gt; ''Load Coordinate Files''. If want to use average sensor position files (as opposed to files individually digitized for your subject), use the files in ''C:\Besa\Examples\Xtras\EEG Binary Formats\EGI'' directory.&lt;br /&gt;
&lt;br /&gt;
* If you have 256 channel data, use GSN257.ela, and GSN257.sfp.&lt;br /&gt;
* If you have 128 channel data, use GSN129.ela, and GSN129.sfp.&lt;br /&gt;
* If you have 64 channel data v1, use GSN65.ela, and GSN65v1_0.sfp.&lt;br /&gt;
* If you have 64 channel data v2, use GSN65.ela, and GSN65v2_0.sfp.&lt;br /&gt;
&lt;br /&gt;
You are now ready to do source analysis in BESA.&lt;br /&gt;
[[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Reading_EBNeuro_Files</id>
		<title>Reading EBNeuro Files</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Reading_EBNeuro_Files"/>
				<updated>2021-05-05T12:39:35Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research&lt;br /&gt;
|version = BESA Research 5.3 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
BESA provides a file format reader that allows importing EBNeuro and Galileo data in BESA Research. Supported file format versions are Galileo.NT and Galileo.NET 3.5.&lt;br /&gt;
The data read can be installed by running the ''InstallReader.exe'' application in the ''Utilities\Additional Readers\EBNeuro\'' subfolder of your BESA Research installation.&lt;br /&gt;
&lt;br /&gt;
To open data files in BESA Research, choose the data files with extension .gnt (or .set) in the ''Open File'' dialog.&lt;br /&gt;
&lt;br /&gt;
Please note, that the EBNeuro/Galileo data format requires an installation of the Galileo software to work properly!&lt;br /&gt;
[[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=How_to_Convert_BESA_Connectivity_results_for_BESA_Statistics</id>
		<title>How to Convert BESA Connectivity results for BESA Statistics</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=How_to_Convert_BESA_Connectivity_results_for_BESA_Statistics"/>
				<updated>2021-05-05T12:37:37Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Prepare data for BESA Statistics 2.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Connectivity, BESA Statistics&lt;br /&gt;
|version = 1.0 or higher (BC), 2.0 or higher (BS)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Note and general remarks==&lt;br /&gt;
Connectivity results exported from BESA Connectivity 1.0 (or higher) can be imported in BESA Statistics 2.0 (or higher) to perform statistical permutation testing. &lt;br /&gt;
&lt;br /&gt;
In '''BESA Statistics 2.1''' (or higher), exported connectivity results can directly be read - no conversion procedure is necessary.&lt;br /&gt;
&lt;br /&gt;
In '''BESA Statistics 2.0''': To be able to read the connectivity matrices that are exported to disc as ''*.conn'' files, the format and the extension of the data files need to be changed to enable reading them in BESA Statistics.&lt;br /&gt;
&lt;br /&gt;
== Export connectivity results in BESA Connectivity ==&lt;br /&gt;
&lt;br /&gt;
For exporting connectivity results in BESA Connectivity, please refer to [[Export Connectivity Results]].&lt;br /&gt;
&lt;br /&gt;
Connectivity matrices are stored to disc as ''*.conn'' files. BESA provides scripts to import these files into Matlab for further analysis. The scripts can be downloaded from the following page on the BESA website: [http://www.besa.de/downloads/matlab/ MATLAB Scripts]&lt;br /&gt;
&lt;br /&gt;
== Prepare data for BESA Statistics 2.0 ==&lt;br /&gt;
&lt;br /&gt;
In order to be able to import connectivity matrices into BESA Statistics 2.0, it is necessary to convert ''*.conn'' files exported from BESA Connectivity to ''*.tfc'' files which can be read by BESA Statistics. The ''BESA_Connectivity_to_BESA_Statistics.m'' script will perform the required conversion (download available here: [https://www.besa.de/wp-content/uploads/2020/10/BESAConnectivityScripts.zip BESA Connectivity Scripts]). The connectivity results in BESA Statistics will be displayed in the same ''matrix view'' as in BESA Connectivity without the normalized power-spectra density that is shown on the diagonal on BESA Connectivity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=500px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
Image:BESA Statisitics - Read Results from BESA Connectivity.png| BESA Statistics &lt;br /&gt;
Image:BESA Connectivity - Export Data for BESA Statistics.png| BESA Connectivity&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
[[Category:Connectivity]] [[Category:Statistics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--'''Caveat''': Since all channels are compared with all channels, the amount of data rises very quickly. For the version 2.0 of BESA Statistics, it is advised to restrict the number of channels in the source montage to not more than approximately 10-15. &lt;br /&gt;
This restriction will be lifted with the next version of BESA Statistics. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=How_to_Convert_BESA_Connectivity_results_for_BESA_Statistics</id>
		<title>How to Convert BESA Connectivity results for BESA Statistics</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=How_to_Convert_BESA_Connectivity_results_for_BESA_Statistics"/>
				<updated>2021-05-05T12:36:57Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Prepare data for BESA Statistics 2.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Connectivity, BESA Statistics&lt;br /&gt;
|version = 1.0 or higher (BC), 2.0 or higher (BS)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Note and general remarks==&lt;br /&gt;
Connectivity results exported from BESA Connectivity 1.0 (or higher) can be imported in BESA Statistics 2.0 (or higher) to perform statistical permutation testing. &lt;br /&gt;
&lt;br /&gt;
In '''BESA Statistics 2.1''' (or higher), exported connectivity results can directly be read - no conversion procedure is necessary.&lt;br /&gt;
&lt;br /&gt;
In '''BESA Statistics 2.0''': To be able to read the connectivity matrices that are exported to disc as ''*.conn'' files, the format and the extension of the data files need to be changed to enable reading them in BESA Statistics.&lt;br /&gt;
&lt;br /&gt;
== Export connectivity results in BESA Connectivity ==&lt;br /&gt;
&lt;br /&gt;
For exporting connectivity results in BESA Connectivity, please refer to [[Export Connectivity Results]].&lt;br /&gt;
&lt;br /&gt;
Connectivity matrices are stored to disc as ''*.conn'' files. BESA provides scripts to import these files into Matlab for further analysis. The scripts can be downloaded from the following page on the BESA website: [http://www.besa.de/downloads/matlab/ MATLAB Scripts]&lt;br /&gt;
&lt;br /&gt;
== Prepare data for BESA Statistics 2.0 ==&lt;br /&gt;
&lt;br /&gt;
In order to be able to import connectivity matrices into BESA Statistics 2.0, it is necessary to convert ''*.conn'' files exported from BESA Connectivity to ''*.tfc'' files which can be read by BESA Statistics.&lt;br /&gt;
&lt;br /&gt;
The ''BESA_Connectivity_to_BESA_Statistics.m'' script will perform the required conversion (download available here: [https://www.besa.de/wp-content/uploads/2020/10/BESAConnectivityScripts.zip BESA Connectivity Scripts]). The connectivity results in BESA Statistics will be displayed in the same ''matrix view'' as in BESA Connectivity without the normalized power-spectra density that is shown on the diagonal on BESA Connectivity.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=500px heights=400px mode=&amp;quot;nolines&amp;quot;&amp;gt;&lt;br /&gt;
Image:BESA Statisitics - Read Results from BESA Connectivity.png| BESA Statistics &lt;br /&gt;
Image:BESA Connectivity - Export Data for BESA Statistics.png| BESA Connectivity&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
[[Category:Connectivity]] [[Category:Statistics]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--'''Caveat''': Since all channels are compared with all channels, the amount of data rises very quickly. For the version 2.0 of BESA Statistics, it is advised to restrict the number of channels in the source montage to not more than approximately 10-15. &lt;br /&gt;
This restriction will be lifted with the next version of BESA Statistics. --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=How_to_Prepare_Data_for_BESA_Connectivity</id>
		<title>How to Prepare Data for BESA Connectivity</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=How_to_Prepare_Data_for_BESA_Connectivity"/>
				<updated>2021-05-05T12:32:33Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Export data using Matlab */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA Connectivity&lt;br /&gt;
|version = BESA Research 7.0 or higher&amp;lt;br/&amp;gt;BESA Connectivity 1.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Note and general remarks==&lt;br /&gt;
This article applies to data that are prepared using BESA Research. It is also possible to read data prepared by other programs. For the requirements, please refer to the BESA Connectivity manual, the chapter on &amp;quot;Loading data that were created in other software&amp;quot; and the chapter &amp;quot;File formats&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
BESA Connectivity needs the following data:&lt;br /&gt;
# A file containing the binary data matrix. All epochs in the data file need to have the same length, the same stimulus position, the same baseline interval, and the same channel configuration.&lt;br /&gt;
# A header file in ASCII format.&lt;br /&gt;
# A channel description file in ASCII format. Two types of files are supported: elp files and bsa files.&lt;br /&gt;
&lt;br /&gt;
== File format descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Header file format ===&lt;br /&gt;
The header file is a standard ASCII file. It contains the following lines:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Line&lt;br /&gt;
! Entry&lt;br /&gt;
! Possible values&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| BESA Generic Data v1.1&lt;br /&gt;
| &lt;br /&gt;
| File format version&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| nChannels=&lt;br /&gt;
| [1 ... 1024]&lt;br /&gt;
| Number of channels.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| sRate=&lt;br /&gt;
| [0.0001 ... ]&lt;br /&gt;
| Sampling rate (samples/second) in Hz.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| nSamples=&lt;br /&gt;
| [1 ...]&lt;br /&gt;
| Total number of samples in file.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| format=&lt;br /&gt;
| float&lt;br /&gt;
| Format of the data in the binary file.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| file=&lt;br /&gt;
| Name of binary file.&lt;br /&gt;
| Name of binary file without path information.&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| prestimulus=&lt;br /&gt;
| 500.000&lt;br /&gt;
| Pre-stimulus interval in milliseconds. If negative, then the epoch starts after the stimulus. This effectively means that the value of prestimulus denotes the  position of the stimulus in the epoch (milliseconds after epoch start).&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| epochs=&lt;br /&gt;
| &lt;br /&gt;
| Number of epochs in the data file.&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| baselineStart=&lt;br /&gt;
| &lt;br /&gt;
| Baseline start relative to the stimulus position. The value should be given in milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| baselineEnd=&lt;br /&gt;
| &lt;br /&gt;
| Baseline end relative to the stimulus position. Must be &amp;gt;= baselineStart. The value should be given in milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| epochLength=&lt;br /&gt;
| &lt;br /&gt;
| Epoch length in milliseconds. This parameter is optional and can be added for convenience. If not given, the epoch length is calculated from the overall number of samples, the sampling rate, and the number of epochs.&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Padding=&lt;br /&gt;
| 2000.000&lt;br /&gt;
| Information concerning extra data values that surround the epoch to provide padding for wavelets, expressed in milliseconds. If exported from BESA Research the default value is 2000ms.&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| conditionName=&lt;br /&gt;
| &lt;br /&gt;
| Name of the condition that identifies it.&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| channelUnits=&lt;br /&gt;
| &lt;br /&gt;
| Unit that the data are stored in the binary file. For EEG data, it should be one of µV, mV, V, µV/cm². For source data, it should be one of nAm, nAm/cm², nAm/cm³. For MEG data, it should be one of fT, pT, fT/cm, pT/cm, µV/cm².&lt;br /&gt;
This entry is repeated &amp;lt;nChannels&amp;gt; times.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Channel configuration file format ===&lt;br /&gt;
&lt;br /&gt;
The channel description file is an ASCII file. Two types of files are supported: .elp files and .bsa files.&lt;br /&gt;
&lt;br /&gt;
==== ELP file format ====&lt;br /&gt;
&lt;br /&gt;
Elp files describe surface channel coordinates using spherical coordinates (theta, phi). It contains one line for each channel in the data file. Each line contains the following entries:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column&lt;br /&gt;
! Entry&lt;br /&gt;
! Possible values&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Channel type&lt;br /&gt;
| EEG (scalp electrode)&amp;lt;br&amp;gt;&lt;br /&gt;
SCP (scalp electrode)&amp;lt;br&amp;gt;&lt;br /&gt;
POL (polygraphic channel)&amp;lt;br&amp;gt;&lt;br /&gt;
PGR (polygraphic channel)&amp;lt;br&amp;gt;&lt;br /&gt;
ICR (intracranial electrode)&amp;lt;br&amp;gt;&lt;br /&gt;
MEG (MEG sensor)&amp;lt;br&amp;gt;&lt;br /&gt;
REF (reference electrode)&lt;br /&gt;
| This column denotes the type of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Channel label&lt;br /&gt;
| Fpz&amp;lt;br&amp;gt;&lt;br /&gt;
Fz&amp;lt;br&amp;gt;&lt;br /&gt;
Fpz'&amp;lt;br&amp;gt;&lt;br /&gt;
EOG&amp;lt;br&amp;gt;&lt;br /&gt;
TpL_r, ...&lt;br /&gt;
| Channel label. Is not allowed to contain blanks.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Azimuth (theta)&lt;br /&gt;
| [-180.00 ... 180.00]&lt;br /&gt;
| Spherical azimuth angle in degrees (optional entry).&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Latitude (phi)&lt;br /&gt;
| [-90.00 ... 90.00]&lt;br /&gt;
| Spherical latitude angle in degrees (optional entry).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== BSA file format ====&lt;br /&gt;
&lt;br /&gt;
Bsa files describe source channel data. They have a header section for format version and readability, followed by one line for each source channel.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column&lt;br /&gt;
! Entry&lt;br /&gt;
! Possible values&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Channel type&lt;br /&gt;
| RegSrc (regional source)&lt;br /&gt;
DipSrc (dipole)&amp;lt;br&amp;gt;&lt;br /&gt;
SptCmp (spatial component)&amp;lt;br&amp;gt;&lt;br /&gt;
| This column denotes the type of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| x location&lt;br /&gt;
| &lt;br /&gt;
| x coordinate of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| y  location&lt;br /&gt;
| &lt;br /&gt;
| y coordinate of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| z location&lt;br /&gt;
| &lt;br /&gt;
| z coordinate of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| x orientation&lt;br /&gt;
| &lt;br /&gt;
| x orientation of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| y orientation&lt;br /&gt;
| &lt;br /&gt;
| y orientation of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| z orientation&lt;br /&gt;
| &lt;br /&gt;
| z orientation of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Color&lt;br /&gt;
| [0 … 255*255*255]&lt;br /&gt;
| RGB color value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The coordinate system is defined by a sphere with unit dimensions, which is fitted to the coordinates of sensors on the head. In the absence of co-registration information with individual MRI data, the axes are defined by reference points on the head known as fiducials. The reference points are normally the nasion (NAS), the left preauricular point (LPA), and the right preauricular point (RPA). The direction of the x axis is defined by the line joining LPA and RPA, positive towards RPA. The direction of the y axis is defined by the line through NAS that is perpendicular to the x axis (positive towards NAS). The z axis is perpendicular to the x and y axes, and goes up out of the upper part of the head (e.g. Cz). On average, the center of the unit sphere is about 4 cm above the origin of the head coordinate system.&lt;br /&gt;
&lt;br /&gt;
=== Binary data matrix file format ===&lt;br /&gt;
&lt;br /&gt;
The binary data matrix is saved in float format and contains ''&amp;lt;Number of epochs&amp;gt; * &amp;lt;Number of samples per epoch&amp;gt; * &amp;lt;Number of channels&amp;gt;'' values. These are stored in the following order:&lt;br /&gt;
*Slowest index: epochs&lt;br /&gt;
*Next index: samples&lt;br /&gt;
*Fastest index: channels&lt;br /&gt;
This is the so-called multiplexed file format. The default extension for this header file is: ''*.dat''&lt;br /&gt;
&lt;br /&gt;
== Export data using BESA Research ==&lt;br /&gt;
&lt;br /&gt;
Please follow the steps in the BESA Research 7.0 tutorial, chapter 13 - Time Frequency and Connectivity Analysis: [https://www.besa.de/wp-content/uploads/2021/04/BESA-Research-7.1-Tutorial.pdf Link]&lt;br /&gt;
&lt;br /&gt;
== Batch export data using BESA Research ==&lt;br /&gt;
&lt;br /&gt;
BESA Research provides batch processing multiple files to export data for BESA Connectivity. This will simplify and speed up your analysis if you need to apply the same data preparation steps for a large number of files.&lt;br /&gt;
&lt;br /&gt;
This section will provide the batch that is required to export the data epochs and will also explain additional steps that need to be performed to load the exported data sets into BESA Connectivity.&lt;br /&gt;
&lt;br /&gt;
==== BESA Research Batch ====&lt;br /&gt;
&lt;br /&gt;
The batch commands required to export all epochs around trigger #1 is displayed below. The first step is to set the specific montage in which all epochs should be exported. Then, the default epoch length needs to be set. In this example, epochs range from -500ms to 2000ms. However, preceding and succeeding padding intervals of 2000ms are required to avoid edge effects during time-frequency transformation. Therefore, the resulting default epoch is set to -2500ms to 4000ms. After this, trigger #1 is selected and epochs are exported to ''C:\Users\&amp;lt;USERNAME&amp;gt;\Documents\BESA\Research_7_0\Export\Batch Export\''. Finally, the batch will also export the channel configuration file (*.elp) in case of sensor data. In case of source data, the corresponding source configuration file (*.bsa) that was used to create the respective source montage needs to be copied to the output folder manually!&lt;br /&gt;
&lt;br /&gt;
Please note: adjust the ''&amp;lt;USERNAME&amp;gt;'' placeholder or the export path according to your needs. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
; Set montage&lt;br /&gt;
MAINMontage(DMN with Noise Sources, Wait if invalid, GlobalMontage)&lt;br /&gt;
; Set epoch length. Note: add 2000ms padding ad start &amp;amp; end&lt;br /&gt;
EditDefaultEpoch(-2500.000,4000.000)&lt;br /&gt;
;&lt;br /&gt;
; Export epochs for trigger #1&lt;br /&gt;
TriggerSelect(1)&lt;br /&gt;
MAINExport(%basename%-export-T1, C:\Users\&amp;lt;USERNAME&amp;gt;\Documents\BESA\Research_7_0\Export\Batch Export\, Epochs, SimpleBin, Current, FiltOff, NoResample, Replace, -, , WholeFile)&lt;br /&gt;
;&lt;br /&gt;
; Export channel configuration file&lt;br /&gt;
MAINMarkBlock(Rawdata,-,1)&lt;br /&gt;
MAINExport(%basename%-export-T1, C:\Users\&amp;lt;USERNAME&amp;gt;\Documents\BESA\Research_7_0\Export\Batch Export\, Segment, ASCmul, Original, FiltOff, NoResample, Replace, -, , WholeFile)&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
This batch can be downloaded from the following link and loaded in the ''Batch'' tab of the ''Batch Processing'' module:[[Media:Batch_Export_for_BESA_Connectivity.bbat|Download link.]]&lt;br /&gt;
&lt;br /&gt;
==== Additional Steps ====&lt;br /&gt;
&lt;br /&gt;
In order to be able to import the saved data sets into BESA Connectivity, there are a few changes that need to be made to the exported *.generic file(s).&lt;br /&gt;
&lt;br /&gt;
When opening the *.generic file with a text editor you will realize that the format slightly differs from the file format description above. the following images compare the exported file (left) and the adjusted file that can be imported into BESA Connectivity (right).  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[File:Generic_File_Unchanged.png|150px|top]][[File:Generic File Modified.png|150px|alt text]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please adjust or add the following sections to the *.generic file:&lt;br /&gt;
* File format version: set to V1.1&lt;br /&gt;
* Add lines for baselineStart, baselineEnd and epochLength. Note: the time stamps do not include the padding intervals!&lt;br /&gt;
* Add the line to specify the padding interval of 2000ms.&lt;br /&gt;
* Add the specification of the condition name. &lt;br /&gt;
* Add one line per channel/source and specify the its label and unit. &lt;br /&gt;
&lt;br /&gt;
Save the file after performing the changes. &lt;br /&gt;
&lt;br /&gt;
If you are working with source data, make sure that the corresponding source configuration file (*.bsa) has the same basename as the *.generic file. Otherwise, BESA Connectivity will not be able to load the file.&lt;br /&gt;
&lt;br /&gt;
Now the exported data sets are ready to be loaded into BESA Connectivity!&lt;br /&gt;
&lt;br /&gt;
== Export data using Matlab ==&lt;br /&gt;
&lt;br /&gt;
We provide several Matlab routines for exporting the required data files from Matlab to BESA Connectivity. The scripts can be downloaded from the following website: [http://www.besa.de/downloads/matlab/ MATLAB Scripts].&lt;br /&gt;
&lt;br /&gt;
The ''Matlab_to_BESAConnectivity.m'' script (download available here: [https://www.besa.de/wp-content/uploads/2020/10/BESAConnectivityScripts.zip BESA Connectivity Scripts]) can be used as an example to generate and export data from MATLAB to BESA Connectivity.&lt;br /&gt;
It shows how to define required parameters, generates example sine waves and calls the export function ''besa_save2Connectivity'' (included in: [https://www.besa.de/wp-content/uploads/2020/10/MATLAB2BESA.zip MATLAB to BESA Export functions]) to store the simulated example data to disc. It will store the file containing the binary data matrix, as well as the header file and channel description file in ASCII format.&lt;br /&gt;
&lt;br /&gt;
The script can be easily adopted to export your trial data do BESA Connectivity for time-frequency and connectivity analysis!&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Minimal examples for data files that can be imported in BESA Connectivity can be downloaded here.&lt;br /&gt;
# EEG data: this data set contains 25 trials (trial length: -400ms to 1200ms) of scalp data with 27 electrodes at a sampling rate of 320 samples/second.&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[Media:BESA_Connectivity_EEG_data.zip|Download link.]]&amp;lt;/p&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[File:BESA_Connectivity_Set_Parameters_EEG_Data.png|400px]][[File:BESA_Connectivity_Run_Analysis_EEG_Data_iCoh.png|400px|alt text]]&amp;lt;/p&amp;gt;&lt;br /&gt;
# Source data: this data set contains 33 trials (trial length: -400ms to 1200ms) of source data with 19 dipoles at a sampling rate of 320 samples/second.&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[Media:BESA_Connectivity_Source_data.zip|Download link.]]&amp;lt;/p&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[File:BESA_Connectivity_Set_Parameters_Source_Data.png|400px]][[File:BESA_Connectivity_Run_Analysis_Source_Data_iCoh.png|400px|alt text]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Connectivity]] [[Category:Time-Frequency]] [[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=How_to_Prepare_Data_for_BESA_Connectivity</id>
		<title>How to Prepare Data for BESA Connectivity</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=How_to_Prepare_Data_for_BESA_Connectivity"/>
				<updated>2021-05-05T12:23:02Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&amp;lt;br/&amp;gt;BESA Connectivity&lt;br /&gt;
|version = BESA Research 7.0 or higher&amp;lt;br/&amp;gt;BESA Connectivity 1.0 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Note and general remarks==&lt;br /&gt;
This article applies to data that are prepared using BESA Research. It is also possible to read data prepared by other programs. For the requirements, please refer to the BESA Connectivity manual, the chapter on &amp;quot;Loading data that were created in other software&amp;quot; and the chapter &amp;quot;File formats&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
BESA Connectivity needs the following data:&lt;br /&gt;
# A file containing the binary data matrix. All epochs in the data file need to have the same length, the same stimulus position, the same baseline interval, and the same channel configuration.&lt;br /&gt;
# A header file in ASCII format.&lt;br /&gt;
# A channel description file in ASCII format. Two types of files are supported: elp files and bsa files.&lt;br /&gt;
&lt;br /&gt;
== File format descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Header file format ===&lt;br /&gt;
The header file is a standard ASCII file. It contains the following lines:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Line&lt;br /&gt;
! Entry&lt;br /&gt;
! Possible values&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| BESA Generic Data v1.1&lt;br /&gt;
| &lt;br /&gt;
| File format version&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| nChannels=&lt;br /&gt;
| [1 ... 1024]&lt;br /&gt;
| Number of channels.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| sRate=&lt;br /&gt;
| [0.0001 ... ]&lt;br /&gt;
| Sampling rate (samples/second) in Hz.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| nSamples=&lt;br /&gt;
| [1 ...]&lt;br /&gt;
| Total number of samples in file.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| format=&lt;br /&gt;
| float&lt;br /&gt;
| Format of the data in the binary file.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| file=&lt;br /&gt;
| Name of binary file.&lt;br /&gt;
| Name of binary file without path information.&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| prestimulus=&lt;br /&gt;
| 500.000&lt;br /&gt;
| Pre-stimulus interval in milliseconds. If negative, then the epoch starts after the stimulus. This effectively means that the value of prestimulus denotes the  position of the stimulus in the epoch (milliseconds after epoch start).&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| epochs=&lt;br /&gt;
| &lt;br /&gt;
| Number of epochs in the data file.&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| baselineStart=&lt;br /&gt;
| &lt;br /&gt;
| Baseline start relative to the stimulus position. The value should be given in milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| baselineEnd=&lt;br /&gt;
| &lt;br /&gt;
| Baseline end relative to the stimulus position. Must be &amp;gt;= baselineStart. The value should be given in milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| epochLength=&lt;br /&gt;
| &lt;br /&gt;
| Epoch length in milliseconds. This parameter is optional and can be added for convenience. If not given, the epoch length is calculated from the overall number of samples, the sampling rate, and the number of epochs.&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Padding=&lt;br /&gt;
| 2000.000&lt;br /&gt;
| Information concerning extra data values that surround the epoch to provide padding for wavelets, expressed in milliseconds. If exported from BESA Research the default value is 2000ms.&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| conditionName=&lt;br /&gt;
| &lt;br /&gt;
| Name of the condition that identifies it.&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| channelUnits=&lt;br /&gt;
| &lt;br /&gt;
| Unit that the data are stored in the binary file. For EEG data, it should be one of µV, mV, V, µV/cm². For source data, it should be one of nAm, nAm/cm², nAm/cm³. For MEG data, it should be one of fT, pT, fT/cm, pT/cm, µV/cm².&lt;br /&gt;
This entry is repeated &amp;lt;nChannels&amp;gt; times.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Channel configuration file format ===&lt;br /&gt;
&lt;br /&gt;
The channel description file is an ASCII file. Two types of files are supported: .elp files and .bsa files.&lt;br /&gt;
&lt;br /&gt;
==== ELP file format ====&lt;br /&gt;
&lt;br /&gt;
Elp files describe surface channel coordinates using spherical coordinates (theta, phi). It contains one line for each channel in the data file. Each line contains the following entries:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column&lt;br /&gt;
! Entry&lt;br /&gt;
! Possible values&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Channel type&lt;br /&gt;
| EEG (scalp electrode)&amp;lt;br&amp;gt;&lt;br /&gt;
SCP (scalp electrode)&amp;lt;br&amp;gt;&lt;br /&gt;
POL (polygraphic channel)&amp;lt;br&amp;gt;&lt;br /&gt;
PGR (polygraphic channel)&amp;lt;br&amp;gt;&lt;br /&gt;
ICR (intracranial electrode)&amp;lt;br&amp;gt;&lt;br /&gt;
MEG (MEG sensor)&amp;lt;br&amp;gt;&lt;br /&gt;
REF (reference electrode)&lt;br /&gt;
| This column denotes the type of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Channel label&lt;br /&gt;
| Fpz&amp;lt;br&amp;gt;&lt;br /&gt;
Fz&amp;lt;br&amp;gt;&lt;br /&gt;
Fpz'&amp;lt;br&amp;gt;&lt;br /&gt;
EOG&amp;lt;br&amp;gt;&lt;br /&gt;
TpL_r, ...&lt;br /&gt;
| Channel label. Is not allowed to contain blanks.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Azimuth (theta)&lt;br /&gt;
| [-180.00 ... 180.00]&lt;br /&gt;
| Spherical azimuth angle in degrees (optional entry).&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Latitude (phi)&lt;br /&gt;
| [-90.00 ... 90.00]&lt;br /&gt;
| Spherical latitude angle in degrees (optional entry).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== BSA file format ====&lt;br /&gt;
&lt;br /&gt;
Bsa files describe source channel data. They have a header section for format version and readability, followed by one line for each source channel.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column&lt;br /&gt;
! Entry&lt;br /&gt;
! Possible values&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Channel type&lt;br /&gt;
| RegSrc (regional source)&lt;br /&gt;
DipSrc (dipole)&amp;lt;br&amp;gt;&lt;br /&gt;
SptCmp (spatial component)&amp;lt;br&amp;gt;&lt;br /&gt;
| This column denotes the type of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| x location&lt;br /&gt;
| &lt;br /&gt;
| x coordinate of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| y  location&lt;br /&gt;
| &lt;br /&gt;
| y coordinate of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| z location&lt;br /&gt;
| &lt;br /&gt;
| z coordinate of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| x orientation&lt;br /&gt;
| &lt;br /&gt;
| x orientation of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| y orientation&lt;br /&gt;
| &lt;br /&gt;
| y orientation of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| z orientation&lt;br /&gt;
| &lt;br /&gt;
| z orientation of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Color&lt;br /&gt;
| [0 … 255*255*255]&lt;br /&gt;
| RGB color value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The coordinate system is defined by a sphere with unit dimensions, which is fitted to the coordinates of sensors on the head. In the absence of co-registration information with individual MRI data, the axes are defined by reference points on the head known as fiducials. The reference points are normally the nasion (NAS), the left preauricular point (LPA), and the right preauricular point (RPA). The direction of the x axis is defined by the line joining LPA and RPA, positive towards RPA. The direction of the y axis is defined by the line through NAS that is perpendicular to the x axis (positive towards NAS). The z axis is perpendicular to the x and y axes, and goes up out of the upper part of the head (e.g. Cz). On average, the center of the unit sphere is about 4 cm above the origin of the head coordinate system.&lt;br /&gt;
&lt;br /&gt;
=== Binary data matrix file format ===&lt;br /&gt;
&lt;br /&gt;
The binary data matrix is saved in float format and contains ''&amp;lt;Number of epochs&amp;gt; * &amp;lt;Number of samples per epoch&amp;gt; * &amp;lt;Number of channels&amp;gt;'' values. These are stored in the following order:&lt;br /&gt;
*Slowest index: epochs&lt;br /&gt;
*Next index: samples&lt;br /&gt;
*Fastest index: channels&lt;br /&gt;
This is the so-called multiplexed file format. The default extension for this header file is: ''*.dat''&lt;br /&gt;
&lt;br /&gt;
== Export data using BESA Research ==&lt;br /&gt;
&lt;br /&gt;
Please follow the steps in the BESA Research 7.0 tutorial, chapter 13 - Time Frequency and Connectivity Analysis: [https://www.besa.de/wp-content/uploads/2021/04/BESA-Research-7.1-Tutorial.pdf Link]&lt;br /&gt;
&lt;br /&gt;
== Batch export data using BESA Research ==&lt;br /&gt;
&lt;br /&gt;
BESA Research provides batch processing multiple files to export data for BESA Connectivity. This will simplify and speed up your analysis if you need to apply the same data preparation steps for a large number of files.&lt;br /&gt;
&lt;br /&gt;
This section will provide the batch that is required to export the data epochs and will also explain additional steps that need to be performed to load the exported data sets into BESA Connectivity.&lt;br /&gt;
&lt;br /&gt;
==== BESA Research Batch ====&lt;br /&gt;
&lt;br /&gt;
The batch commands required to export all epochs around trigger #1 is displayed below. The first step is to set the specific montage in which all epochs should be exported. Then, the default epoch length needs to be set. In this example, epochs range from -500ms to 2000ms. However, preceding and succeeding padding intervals of 2000ms are required to avoid edge effects during time-frequency transformation. Therefore, the resulting default epoch is set to -2500ms to 4000ms. After this, trigger #1 is selected and epochs are exported to ''C:\Users\&amp;lt;USERNAME&amp;gt;\Documents\BESA\Research_7_0\Export\Batch Export\''. Finally, the batch will also export the channel configuration file (*.elp) in case of sensor data. In case of source data, the corresponding source configuration file (*.bsa) that was used to create the respective source montage needs to be copied to the output folder manually!&lt;br /&gt;
&lt;br /&gt;
Please note: adjust the ''&amp;lt;USERNAME&amp;gt;'' placeholder or the export path according to your needs. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
; Set montage&lt;br /&gt;
MAINMontage(DMN with Noise Sources, Wait if invalid, GlobalMontage)&lt;br /&gt;
; Set epoch length. Note: add 2000ms padding ad start &amp;amp; end&lt;br /&gt;
EditDefaultEpoch(-2500.000,4000.000)&lt;br /&gt;
;&lt;br /&gt;
; Export epochs for trigger #1&lt;br /&gt;
TriggerSelect(1)&lt;br /&gt;
MAINExport(%basename%-export-T1, C:\Users\&amp;lt;USERNAME&amp;gt;\Documents\BESA\Research_7_0\Export\Batch Export\, Epochs, SimpleBin, Current, FiltOff, NoResample, Replace, -, , WholeFile)&lt;br /&gt;
;&lt;br /&gt;
; Export channel configuration file&lt;br /&gt;
MAINMarkBlock(Rawdata,-,1)&lt;br /&gt;
MAINExport(%basename%-export-T1, C:\Users\&amp;lt;USERNAME&amp;gt;\Documents\BESA\Research_7_0\Export\Batch Export\, Segment, ASCmul, Original, FiltOff, NoResample, Replace, -, , WholeFile)&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
This batch can be downloaded from the following link and loaded in the ''Batch'' tab of the ''Batch Processing'' module:[[Media:Batch_Export_for_BESA_Connectivity.bbat|Download link.]]&lt;br /&gt;
&lt;br /&gt;
==== Additional Steps ====&lt;br /&gt;
&lt;br /&gt;
In order to be able to import the saved data sets into BESA Connectivity, there are a few changes that need to be made to the exported *.generic file(s).&lt;br /&gt;
&lt;br /&gt;
When opening the *.generic file with a text editor you will realize that the format slightly differs from the file format description above. the following images compare the exported file (left) and the adjusted file that can be imported into BESA Connectivity (right).  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[File:Generic_File_Unchanged.png|150px|top]][[File:Generic File Modified.png|150px|alt text]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please adjust or add the following sections to the *.generic file:&lt;br /&gt;
* File format version: set to V1.1&lt;br /&gt;
* Add lines for baselineStart, baselineEnd and epochLength. Note: the time stamps do not include the padding intervals!&lt;br /&gt;
* Add the line to specify the padding interval of 2000ms.&lt;br /&gt;
* Add the specification of the condition name. &lt;br /&gt;
* Add one line per channel/source and specify the its label and unit. &lt;br /&gt;
&lt;br /&gt;
Save the file after performing the changes. &lt;br /&gt;
&lt;br /&gt;
If you are working with source data, make sure that the corresponding source configuration file (*.bsa) has the same basename as the *.generic file. Otherwise, BESA Connectivity will not be able to load the file.&lt;br /&gt;
&lt;br /&gt;
Now the exported data sets are ready to be loaded into BESA Connectivity!&lt;br /&gt;
&lt;br /&gt;
== Export data using Matlab ==&lt;br /&gt;
&lt;br /&gt;
We provide several Matlab routines for exporting the required data files from Matlab to BESA Connectivity. The scripts can be downloaded from the following website: [http://www.besa.de/downloads/matlab/ MATLAB Scripts].&lt;br /&gt;
&lt;br /&gt;
The following script can be used as an example to generate and export data from MATLAB to BESA Connectivity: [ftp://h1772544.stratoserver.net/public/Matlab/BESA_Utilities/BESAConnectivityScripts/Matlab_to_BESAConnectivity.m Matlab to BESA Connectivity]&lt;br /&gt;
It shows how to define required parameters, generates example sine waves and calls the export function ''besa_save2Connectivity'' to store the simulated example data to disc. It will store the file containing the binary data matrix, as well as the header file and channel description file in ASCII format.&lt;br /&gt;
&lt;br /&gt;
The script can be easily adopted to export your trial data do BESA Connectivity for time-frequency and connectivity analysis!&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Minimal examples for data files that can be imported in BESA Connectivity can be downloaded here.&lt;br /&gt;
# EEG data: this data set contains 25 trials (trial length: -400ms to 1200ms) of scalp data with 27 electrodes at a sampling rate of 320 samples/second.&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[Media:BESA_Connectivity_EEG_data.zip|Download link.]]&amp;lt;/p&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[File:BESA_Connectivity_Set_Parameters_EEG_Data.png|400px]][[File:BESA_Connectivity_Run_Analysis_EEG_Data_iCoh.png|400px|alt text]]&amp;lt;/p&amp;gt;&lt;br /&gt;
# Source data: this data set contains 33 trials (trial length: -400ms to 1200ms) of source data with 19 dipoles at a sampling rate of 320 samples/second.&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[Media:BESA_Connectivity_Source_data.zip|Download link.]]&amp;lt;/p&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[File:BESA_Connectivity_Set_Parameters_Source_Data.png|400px]][[File:BESA_Connectivity_Run_Analysis_Source_Data_iCoh.png|400px|alt text]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Connectivity]] [[Category:Time-Frequency]] [[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=How_to_Prepare_Data_for_BESA_Connectivity</id>
		<title>How to Prepare Data for BESA Connectivity</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=How_to_Prepare_Data_for_BESA_Connectivity"/>
				<updated>2021-05-05T12:22:18Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Export data using BESA Research */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher,&lt;br /&gt;
BESA Connectivity&lt;br /&gt;
|version = 7.0 or higher (BR), 1.0 or higher (BC)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Note and general remarks==&lt;br /&gt;
This article applies to data that are prepared using BESA Research. It is also possible to read data prepared by other programs. For the requirements, please refer to the BESA Connectivity manual, the chapter on &amp;quot;Loading data that were created in other software&amp;quot; and the chapter &amp;quot;File formats&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
BESA Connectivity needs the following data:&lt;br /&gt;
# A file containing the binary data matrix. All epochs in the data file need to have the same length, the same stimulus position, the same baseline interval, and the same channel configuration.&lt;br /&gt;
# A header file in ASCII format.&lt;br /&gt;
# A channel description file in ASCII format. Two types of files are supported: elp files and bsa files.&lt;br /&gt;
&lt;br /&gt;
== File format descriptions ==&lt;br /&gt;
&lt;br /&gt;
=== Header file format ===&lt;br /&gt;
The header file is a standard ASCII file. It contains the following lines:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Line&lt;br /&gt;
! Entry&lt;br /&gt;
! Possible values&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| BESA Generic Data v1.1&lt;br /&gt;
| &lt;br /&gt;
| File format version&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| nChannels=&lt;br /&gt;
| [1 ... 1024]&lt;br /&gt;
| Number of channels.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| sRate=&lt;br /&gt;
| [0.0001 ... ]&lt;br /&gt;
| Sampling rate (samples/second) in Hz.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| nSamples=&lt;br /&gt;
| [1 ...]&lt;br /&gt;
| Total number of samples in file.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| format=&lt;br /&gt;
| float&lt;br /&gt;
| Format of the data in the binary file.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| file=&lt;br /&gt;
| Name of binary file.&lt;br /&gt;
| Name of binary file without path information.&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| prestimulus=&lt;br /&gt;
| 500.000&lt;br /&gt;
| Pre-stimulus interval in milliseconds. If negative, then the epoch starts after the stimulus. This effectively means that the value of prestimulus denotes the  position of the stimulus in the epoch (milliseconds after epoch start).&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| epochs=&lt;br /&gt;
| &lt;br /&gt;
| Number of epochs in the data file.&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| baselineStart=&lt;br /&gt;
| &lt;br /&gt;
| Baseline start relative to the stimulus position. The value should be given in milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| baselineEnd=&lt;br /&gt;
| &lt;br /&gt;
| Baseline end relative to the stimulus position. Must be &amp;gt;= baselineStart. The value should be given in milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| epochLength=&lt;br /&gt;
| &lt;br /&gt;
| Epoch length in milliseconds. This parameter is optional and can be added for convenience. If not given, the epoch length is calculated from the overall number of samples, the sampling rate, and the number of epochs.&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Padding=&lt;br /&gt;
| 2000.000&lt;br /&gt;
| Information concerning extra data values that surround the epoch to provide padding for wavelets, expressed in milliseconds. If exported from BESA Research the default value is 2000ms.&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| conditionName=&lt;br /&gt;
| &lt;br /&gt;
| Name of the condition that identifies it.&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| channelUnits=&lt;br /&gt;
| &lt;br /&gt;
| Unit that the data are stored in the binary file. For EEG data, it should be one of µV, mV, V, µV/cm². For source data, it should be one of nAm, nAm/cm², nAm/cm³. For MEG data, it should be one of fT, pT, fT/cm, pT/cm, µV/cm².&lt;br /&gt;
This entry is repeated &amp;lt;nChannels&amp;gt; times.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Channel configuration file format ===&lt;br /&gt;
&lt;br /&gt;
The channel description file is an ASCII file. Two types of files are supported: .elp files and .bsa files.&lt;br /&gt;
&lt;br /&gt;
==== ELP file format ====&lt;br /&gt;
&lt;br /&gt;
Elp files describe surface channel coordinates using spherical coordinates (theta, phi). It contains one line for each channel in the data file. Each line contains the following entries:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column&lt;br /&gt;
! Entry&lt;br /&gt;
! Possible values&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Channel type&lt;br /&gt;
| EEG (scalp electrode)&amp;lt;br&amp;gt;&lt;br /&gt;
SCP (scalp electrode)&amp;lt;br&amp;gt;&lt;br /&gt;
POL (polygraphic channel)&amp;lt;br&amp;gt;&lt;br /&gt;
PGR (polygraphic channel)&amp;lt;br&amp;gt;&lt;br /&gt;
ICR (intracranial electrode)&amp;lt;br&amp;gt;&lt;br /&gt;
MEG (MEG sensor)&amp;lt;br&amp;gt;&lt;br /&gt;
REF (reference electrode)&lt;br /&gt;
| This column denotes the type of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Channel label&lt;br /&gt;
| Fpz&amp;lt;br&amp;gt;&lt;br /&gt;
Fz&amp;lt;br&amp;gt;&lt;br /&gt;
Fpz'&amp;lt;br&amp;gt;&lt;br /&gt;
EOG&amp;lt;br&amp;gt;&lt;br /&gt;
TpL_r, ...&lt;br /&gt;
| Channel label. Is not allowed to contain blanks.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Azimuth (theta)&lt;br /&gt;
| [-180.00 ... 180.00]&lt;br /&gt;
| Spherical azimuth angle in degrees (optional entry).&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Latitude (phi)&lt;br /&gt;
| [-90.00 ... 90.00]&lt;br /&gt;
| Spherical latitude angle in degrees (optional entry).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== BSA file format ====&lt;br /&gt;
&lt;br /&gt;
Bsa files describe source channel data. They have a header section for format version and readability, followed by one line for each source channel.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column&lt;br /&gt;
! Entry&lt;br /&gt;
! Possible values&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Channel type&lt;br /&gt;
| RegSrc (regional source)&lt;br /&gt;
DipSrc (dipole)&amp;lt;br&amp;gt;&lt;br /&gt;
SptCmp (spatial component)&amp;lt;br&amp;gt;&lt;br /&gt;
| This column denotes the type of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| x location&lt;br /&gt;
| &lt;br /&gt;
| x coordinate of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| y  location&lt;br /&gt;
| &lt;br /&gt;
| y coordinate of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| z location&lt;br /&gt;
| &lt;br /&gt;
| z coordinate of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| x orientation&lt;br /&gt;
| &lt;br /&gt;
| x orientation of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| y orientation&lt;br /&gt;
| &lt;br /&gt;
| y orientation of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| z orientation&lt;br /&gt;
| &lt;br /&gt;
| z orientation of the channel.&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Color&lt;br /&gt;
| [0 … 255*255*255]&lt;br /&gt;
| RGB color value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The coordinate system is defined by a sphere with unit dimensions, which is fitted to the coordinates of sensors on the head. In the absence of co-registration information with individual MRI data, the axes are defined by reference points on the head known as fiducials. The reference points are normally the nasion (NAS), the left preauricular point (LPA), and the right preauricular point (RPA). The direction of the x axis is defined by the line joining LPA and RPA, positive towards RPA. The direction of the y axis is defined by the line through NAS that is perpendicular to the x axis (positive towards NAS). The z axis is perpendicular to the x and y axes, and goes up out of the upper part of the head (e.g. Cz). On average, the center of the unit sphere is about 4 cm above the origin of the head coordinate system.&lt;br /&gt;
&lt;br /&gt;
=== Binary data matrix file format ===&lt;br /&gt;
&lt;br /&gt;
The binary data matrix is saved in float format and contains ''&amp;lt;Number of epochs&amp;gt; * &amp;lt;Number of samples per epoch&amp;gt; * &amp;lt;Number of channels&amp;gt;'' values. These are stored in the following order:&lt;br /&gt;
*Slowest index: epochs&lt;br /&gt;
*Next index: samples&lt;br /&gt;
*Fastest index: channels&lt;br /&gt;
This is the so-called multiplexed file format. The default extension for this header file is: ''*.dat''&lt;br /&gt;
&lt;br /&gt;
== Export data using BESA Research ==&lt;br /&gt;
&lt;br /&gt;
Please follow the steps in the BESA Research 7.0 tutorial, chapter 13 - Time Frequency and Connectivity Analysis: [https://www.besa.de/wp-content/uploads/2021/04/BESA-Research-7.1-Tutorial.pdf Link]&lt;br /&gt;
&lt;br /&gt;
== Batch export data using BESA Research ==&lt;br /&gt;
&lt;br /&gt;
BESA Research provides batch processing multiple files to export data for BESA Connectivity. This will simplify and speed up your analysis if you need to apply the same data preparation steps for a large number of files.&lt;br /&gt;
&lt;br /&gt;
This section will provide the batch that is required to export the data epochs and will also explain additional steps that need to be performed to load the exported data sets into BESA Connectivity.&lt;br /&gt;
&lt;br /&gt;
==== BESA Research Batch ====&lt;br /&gt;
&lt;br /&gt;
The batch commands required to export all epochs around trigger #1 is displayed below. The first step is to set the specific montage in which all epochs should be exported. Then, the default epoch length needs to be set. In this example, epochs range from -500ms to 2000ms. However, preceding and succeeding padding intervals of 2000ms are required to avoid edge effects during time-frequency transformation. Therefore, the resulting default epoch is set to -2500ms to 4000ms. After this, trigger #1 is selected and epochs are exported to ''C:\Users\&amp;lt;USERNAME&amp;gt;\Documents\BESA\Research_7_0\Export\Batch Export\''. Finally, the batch will also export the channel configuration file (*.elp) in case of sensor data. In case of source data, the corresponding source configuration file (*.bsa) that was used to create the respective source montage needs to be copied to the output folder manually!&lt;br /&gt;
&lt;br /&gt;
Please note: adjust the ''&amp;lt;USERNAME&amp;gt;'' placeholder or the export path according to your needs. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
; Set montage&lt;br /&gt;
MAINMontage(DMN with Noise Sources, Wait if invalid, GlobalMontage)&lt;br /&gt;
; Set epoch length. Note: add 2000ms padding ad start &amp;amp; end&lt;br /&gt;
EditDefaultEpoch(-2500.000,4000.000)&lt;br /&gt;
;&lt;br /&gt;
; Export epochs for trigger #1&lt;br /&gt;
TriggerSelect(1)&lt;br /&gt;
MAINExport(%basename%-export-T1, C:\Users\&amp;lt;USERNAME&amp;gt;\Documents\BESA\Research_7_0\Export\Batch Export\, Epochs, SimpleBin, Current, FiltOff, NoResample, Replace, -, , WholeFile)&lt;br /&gt;
;&lt;br /&gt;
; Export channel configuration file&lt;br /&gt;
MAINMarkBlock(Rawdata,-,1)&lt;br /&gt;
MAINExport(%basename%-export-T1, C:\Users\&amp;lt;USERNAME&amp;gt;\Documents\BESA\Research_7_0\Export\Batch Export\, Segment, ASCmul, Original, FiltOff, NoResample, Replace, -, , WholeFile)&lt;br /&gt;
&amp;lt;/source &amp;gt;&lt;br /&gt;
&lt;br /&gt;
This batch can be downloaded from the following link and loaded in the ''Batch'' tab of the ''Batch Processing'' module:[[Media:Batch_Export_for_BESA_Connectivity.bbat|Download link.]]&lt;br /&gt;
&lt;br /&gt;
==== Additional Steps ====&lt;br /&gt;
&lt;br /&gt;
In order to be able to import the saved data sets into BESA Connectivity, there are a few changes that need to be made to the exported *.generic file(s).&lt;br /&gt;
&lt;br /&gt;
When opening the *.generic file with a text editor you will realize that the format slightly differs from the file format description above. the following images compare the exported file (left) and the adjusted file that can be imported into BESA Connectivity (right).  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[File:Generic_File_Unchanged.png|150px|top]][[File:Generic File Modified.png|150px|alt text]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please adjust or add the following sections to the *.generic file:&lt;br /&gt;
* File format version: set to V1.1&lt;br /&gt;
* Add lines for baselineStart, baselineEnd and epochLength. Note: the time stamps do not include the padding intervals!&lt;br /&gt;
* Add the line to specify the padding interval of 2000ms.&lt;br /&gt;
* Add the specification of the condition name. &lt;br /&gt;
* Add one line per channel/source and specify the its label and unit. &lt;br /&gt;
&lt;br /&gt;
Save the file after performing the changes. &lt;br /&gt;
&lt;br /&gt;
If you are working with source data, make sure that the corresponding source configuration file (*.bsa) has the same basename as the *.generic file. Otherwise, BESA Connectivity will not be able to load the file.&lt;br /&gt;
&lt;br /&gt;
Now the exported data sets are ready to be loaded into BESA Connectivity!&lt;br /&gt;
&lt;br /&gt;
== Export data using Matlab ==&lt;br /&gt;
&lt;br /&gt;
We provide several Matlab routines for exporting the required data files from Matlab to BESA Connectivity. The scripts can be downloaded from the following website: [http://www.besa.de/downloads/matlab/ MATLAB Scripts].&lt;br /&gt;
&lt;br /&gt;
The following script can be used as an example to generate and export data from MATLAB to BESA Connectivity: [ftp://h1772544.stratoserver.net/public/Matlab/BESA_Utilities/BESAConnectivityScripts/Matlab_to_BESAConnectivity.m Matlab to BESA Connectivity]&lt;br /&gt;
It shows how to define required parameters, generates example sine waves and calls the export function ''besa_save2Connectivity'' to store the simulated example data to disc. It will store the file containing the binary data matrix, as well as the header file and channel description file in ASCII format.&lt;br /&gt;
&lt;br /&gt;
The script can be easily adopted to export your trial data do BESA Connectivity for time-frequency and connectivity analysis!&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Minimal examples for data files that can be imported in BESA Connectivity can be downloaded here.&lt;br /&gt;
# EEG data: this data set contains 25 trials (trial length: -400ms to 1200ms) of scalp data with 27 electrodes at a sampling rate of 320 samples/second.&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[Media:BESA_Connectivity_EEG_data.zip|Download link.]]&amp;lt;/p&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[File:BESA_Connectivity_Set_Parameters_EEG_Data.png|400px]][[File:BESA_Connectivity_Run_Analysis_EEG_Data_iCoh.png|400px|alt text]]&amp;lt;/p&amp;gt;&lt;br /&gt;
# Source data: this data set contains 33 trials (trial length: -400ms to 1200ms) of source data with 19 dipoles at a sampling rate of 320 samples/second.&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[Media:BESA_Connectivity_Source_data.zip|Download link.]]&amp;lt;/p&amp;gt;&amp;lt;!--&lt;br /&gt;
--&amp;gt;&amp;lt;p&amp;gt;[[File:BESA_Connectivity_Set_Parameters_Source_Data.png|400px]][[File:BESA_Connectivity_Run_Analysis_Source_Data_iCoh.png|400px|alt text]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Connectivity]] [[Category:Time-Frequency]] [[Category:Data Import/Export]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Electrodes_and_Surface_Locations</id>
		<title>Electrodes and Surface Locations</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Electrodes_and_Surface_Locations"/>
				<updated>2021-05-05T09:55:52Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Digitization points with and without Fiducials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 6.1 or higher&lt;br /&gt;
}}&lt;br /&gt;
= Working with Electrodes and Surface Locations =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Here you will find out how BESA Research works with electrode and MEG sensor coordinates and labels, and how head surface points can be used to improve source modeling and coregistration of source models with the MRI. In most cases, electrode positions are sufficiently defined by their labels. The section &amp;quot;''Electrode Conventions''&amp;quot; lists the standard position which BESA Research assigns to EEG channels. In some cases, especially for larger electrode arrays or for MEG measurements, additional information is required to add sufficient information for mapping and for source analysis. The additional information is supplied in additional, auxiliary files which are read by BESA Research and associated with the data files. The auxiliary files, and how they are supplied to BESA Research, are described in this chapter.&lt;br /&gt;
&lt;br /&gt;
Examples for using auxiliary files to define the 3D locations of electrodes are found in the [[Electrodes_and_Surface_Locations#Examples|Examples]] section .&lt;br /&gt;
&lt;br /&gt;
Descriptions of file formats that BESA Research uses are given in the online help chapter [[Working_With_Additional_Files|Working With Additional Files]].&lt;br /&gt;
&lt;br /&gt;
== Working with auxiliary files ==&lt;br /&gt;
&lt;br /&gt;
Data files come with varying amounts of prior information about electrode/sensor locations, depending on the recording system. BESA Research allows you to read auxiliary files that define additional information, such as channel labels, and coordinates of the electrodes, sensors, and other head surface points. The information is required for mapping and for source montages.&lt;br /&gt;
* '''Mapping.''' BESA Research uses spherical spline mapping. For this, electrode/sensor locations are projected onto a sphere. The minimum requirement is 10-10 or 10-20 labels: if only channel labels are available without additional information, BESA Research uses default spherical coordinates.&lt;br /&gt;
* '''Source modeling'''. Spherical coordinates of electrode locations are sufficient, but digitized locations are better. Digitized locations can be defined in the data file or in auxiliary files. BESA Research will use digitized head surface points (electrodes + additional points) to fit a sphere for the spherical model. Points anterior to the left and right preauricular points and below the plane formed by these points and the nasion are excluded when fitting the sphere.&lt;br /&gt;
&lt;br /&gt;
Files can also be written, for instance for&lt;br /&gt;
* '''Source modelling with MRI coregistration'''. BESA Research allows for the export of surface points in a special format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''sfh'''&amp;lt;/span&amp;gt; file) which can be read by the BESA MRI (or BrainVoyager) program. These are fitted to the head surface defined by BESA MRI (or BrainVoyager) in order to define rotation, translation, and deformation parameters required to coregister the coordinate systems (see &amp;quot;''Integration with MRI and fMRi''&amp;quot;).&lt;br /&gt;
* '''Export of coordinates.''' Electrode, other surface point locations, and MEG sensor coordinates and other surface point locations can be written to ASCII files so that they can be reread when reading other files into BESA Research (e.g. ASCII files), or used by other programs.&lt;br /&gt;
&lt;br /&gt;
Feedback and control over how these files are read is provided by&lt;br /&gt;
* '''the Channel and digitized head surface point information dialog box.''' This dialog is usually opened when you open a file for the first time. It allows you to specify the names of auxiliary files, and it makes initial checks on the files to see whether they are consistent with each other and with the data file. If the check is OK, you will see a green tick at the top right hand corner of the dialog box. If there are inconsistencies, the tick is replaced by a red exclamation mark. In this case, you will usually need to edit the auxiliary files or specify other files. The dialog box is not opened if the file is recognized to contain all the necessary information (files with the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''foc'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''fsg'''&amp;lt;/span&amp;gt; extensions), or if the program only finds a channel definition file (with extensions &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''ela, elp,'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''elb'''&amp;lt;/span&amp;gt;). The dialog box is not opened if the data file has been opened before. You can always open the dialog box manually by specifying ''&amp;quot; File / Head Surface Points and Sensors/Load Coordinate'' ''Files.''&lt;br /&gt;
* '''The log file''' (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*_LoadFile.log&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;)'''.''' Coordinating the information between the data file and its auxiliary files can be a complex procedure. To help you check whether the coordination is being done properly, if you select the menu entry ''&amp;quot; Options / File / Generate Log &amp;quot;'' during File Open, BESA Research writes a log file with the same base name as the data file, appending &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_LoadFile.log'''&amp;lt;/span&amp;gt;&amp;quot; to the base name, recording which files have been read, and some of the parameters that have been found. This file is created every time auxiliary files are read (e.g. on file open, when reading in channel configuration files, head surface point files, MEG sensor locations), or changed (&amp;quot;''Edit /'' ''Channel Configuration''&amp;quot;).&lt;br /&gt;
* '''The log window. '''If there are inconsistencies during the processing of auxiliary files and 3D coordinates, a logging window is opened showing the information that would be written to the log file. You can read what has been done to help diagnose the problems. Select '''OK''' to continue in spite of the problems, or''' Reset''' to reject. Typing '''Reset''' also deletes the database files associated with the current data file, thus allowing you to start reading this file from scratch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA Research remembers which auxiliary files are associated with the current file'''. When a data file is first opened, and BESA Research finds auxiliary files with the same base name as the data file, you will be asked if you want this file to be read. The decision you make will be recorded in the database for this data file. Next time the file is opened, the files will or will not be read, according to your previous decision. Similarly, when an auxiliary file is read using the menu, this is recorded in the database, and the file will be opened automatically next time the data file is opened. To override previous decisions, you must delete the database files (see the''' log window '''above) or change the entries in the Channel and digitized head surface point information dialog box (see the chapter ''&amp;quot;Electrode Conventions / Channel and digitized head surface point information dialog box''&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Coordinate systems ==&lt;br /&gt;
&lt;br /&gt;
We need to deal with four different coordinate systems. These differ in how the x, y, and z axes are defined, and in the units of measurement (e.g. mm, cm, m). The first three are illustrated in the following figure:&lt;br /&gt;
&lt;br /&gt;
[[File:ST_Electrodes_(1)_02.png|800px]]&lt;br /&gt;
&amp;lt;!-- [[Image:ST Electrodes (1).gif ]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Device coordinates.''' These are the coordinates used by the recording system. The axes may be anywhere in relation to the head. For instance, in the Polhemus digitizer, the axes go through the magnetic field transmitter which is located somewhere outside the head. The units of measurement may be millimeters, centimeters, or meters.&lt;br /&gt;
&lt;br /&gt;
'''Head coordinates'''. This coordinate system is defined by reference points on the head known as ''fiducials''. The reference points are normally the nasion (Nz, NAS), the left preauricular point (T9, LPA), and the right preauricular point (T10, RPA). The x axis is defined by the line joining T9 and T10, positive towards T10. The y axis is defined by the line through Nz that is perpendicular to the x axis (positive towards Nz). The z axis is perpendicular to the x and y axes, and goes up out of the head in the vicinity of Cz. The units of measurement may be millimeters, centimeters, or meters. In BESA Research these are labelled with the prefix 'Fid', e.g. 'FidT9', 'FidNz'.&lt;br /&gt;
&lt;br /&gt;
'''BESA Research coordinates.''' For dipole analyses the head model consists of a sphere. In the default situation where no digitized sensor information is available, the center of the sphere is defined by the crossing point between the lines joining T7 (=T3) and T8 (=T4) and Fpz and Oz.. The x axis is the T8-T7 line, positive at T8. The y axis is the Oz-Fpz line, positive at Fpz. The z-axis goes up out of the head through Cz. If digitized information is available, the axes are defined by the best fit between the idealized electrode locations and the real locations. The diameter of the sphere is also defined by the best fit. Units given in the display are in millimeters.&lt;br /&gt;
&lt;br /&gt;
The '''center of the spherical model''' is on average about 4 cm above the origin of the Head Coordinates. If digitized surface points are available, the sphere is fitted to these points. Using a cot file, it is possible to override the fit and define your own head center. In conjunction with BrainVoyager, you can use the MRI to seed the location of the head center (e.g. a fixed distance anterior to the posterior commissure) and save it as a cot file. Using MRI coregistration (see &amp;quot;''Integration with MRI and'' ''fMRi''&amp;quot;), the center is placed between the anterior (AC) and posterior (PC) commissures, at the half-way point between the anterior and posterior points (AP and PP). Without coregistration, the center corresponds to a point 17.5 mm behind AC in the standard MRI head.&lt;br /&gt;
&lt;br /&gt;
'''MRI coordinates.''' These are the coordinates used by BrainVoyager. These are defined by the MRI slices. Measurement units are millimeters.&lt;br /&gt;
&lt;br /&gt;
== The Channel and Digitized Head Surface Point Information Dialog Box ==&lt;br /&gt;
&lt;br /&gt;
Many data formats read by BESA Research require additional information about data channel, which are specified by additional, auxiliary files. This dialog box allows you to specify which auxiliary files are read in to supplement the information in the data file.&lt;br /&gt;
&lt;br /&gt;
The dialog box is opened automatically the first time a data file is opened, if&lt;br /&gt;
* auxiliary files other than a channel definition file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elb&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) are found&lt;br /&gt;
* no auxiliary files are found, and the data file was not written in compressed binary format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.foc&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.fsg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) by BESA Research &lt;br /&gt;
&lt;br /&gt;
When a data file is closed, the information about which auxiliary files have been read is stored in the database. When the file is opened for a second time the dialog box is not opened automatically, because the information is assumed to be correct – the files are read automatically.&lt;br /&gt;
&lt;br /&gt;
The dialog box can be opened manually by selecting &amp;quot;''File / Head Surface Points and Sensors / Load Coordinate Files''&amp;quot;, or using the shortcut &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''ctrl-L'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (2).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dialog box is divided into several sections:&lt;br /&gt;
&lt;br /&gt;
* '''Internal data file information.''' Here you can see the file name, the originating system (file format), the name of the database file, if any, and the channel information as specified by the data file alone.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (4).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Suggestions.''' This box makes suggestions about what needs to be filled in, e.g. &amp;quot;Please enter electrode thickness&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (5).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Main feedback (top right hand corner).''' A green tick indicates that the currently selected data files are consistent among themselves and with the data file. A red exclamation mark indicates an inconsistency. Check the feedback texts in the subsequent sections for more information:&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (8).gif|70px]] [[Image:ST Electrodes (7).gif|71px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Channel configuration file specification.''' If the channel labels and types defined in the data file (&amp;quot;Internal data file information&amp;quot;) need to be changed, enter a file name here (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elb&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If a channel definition file exists with the same basename as the data file, or if a channel definition file has been specified previously (database entry exists), it will be selected automatically. To the right of the file name, feedback is provided about the number of channels and channel types found. If the labels are consistent with the data file, to the right the text &amp;quot;Good&amp;quot; is shown. If they are inconsistent, e.g. the file contains the wrong number of channel definitions, the text &amp;quot;Bad&amp;quot; is shown.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (9).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Digitized head surface point specification.''' Here you may specify a file containing digitized electrode and other head surface points. Optionally, the information can be split into two files, containing the coordinates (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp, *.eps&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the coordinate names (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.sfn'''&amp;lt;/span&amp;gt;). Alternatively, both labels and names can be contained in the coordinate file. If the files specify electrode coordinates, there '''must''' be a coordinate name for each electrode. The sequence may be different. BESA Research will use the names to assign each coordinate to the electrodes. Additional head surface points can have any other names. It is recommended that the first three digitized coordinates are the fiducials (fiduciary points), labelled &amp;quot;FidNz&amp;quot;, &amp;quot;FidT9&amp;quot;, &amp;quot;FidT10&amp;quot;. If your electrode labels not follow the 10-10 or 10-20 standard (e.g. in high-density electrode recordings), it is recommended to tick the box '''&amp;quot;Electrode labels non-conforming to 10-10 standard&amp;quot;'''. This will prevent BESA Research from using electrodes for an optimal rotation of the coordinate system which should not be used (e.g. A1, A2 which have known locations in 10-10, but are sometimes used in a nomenclature outside of 10-10). The example below shows the sphere adaption for an example data set with and without taking this into account.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (12).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The right picture shows that when discarding the non-conforming electrodes, the fiducials are correctly placed along the x any y axes.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (10).gif ]] [[Image:ST Electrodes (11).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(In the special case of Neuromag files with electrode channels, the data file contains head surface points with the wrong labels. Here you may provide a label file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfn&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) without a corresponding digitized coordinate file.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Coregistration file.''' Here you may specify a file containing the coordinates of the head center (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.cot&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) or an ''MRI Coregistration File ''(&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). Head center redefinition is only necessary if you want to provide an external definition, e.g. from the MRI. The ''MRI Coregistration File ''is used if the data are to be coregistered with individual MRI. (see &amp;quot;''Integration with MRI and fMRi'' &amp;quot;). '''Note''' that if a head center file (cot file) with the same base name as the data file exists, it will be read automatically if the head center coordinates deviate by more than 1 mm from the internally calculated values. Changes are ignored if the radio button is set to &amp;quot;No&amp;quot;. This automated function allows you to change the head center during a session, using BrainVoyager's view of the MRI and the Source Module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (14).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''MEG sensor specification'''. If the file contains MEG channels, you may enter the name of a sensor coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pmg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). This field is grayed if there are no MEG channels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (15).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Artifact coefficients file.''' If the data are to be artifact corrected, your pre-prepared coefficient file may be defined here. See the chapter &amp;quot;''Artifact Correction''&amp;quot;. Selecting the file here is equivalent to loading the file using the menu entry &amp;quot;''Artifact / Load''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (17).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each of the selected files, make sure the radio button &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Yes&amp;quot;'''&amp;lt;/span&amp;gt; is selected on the left-hand side of the dialog box. If files have been selected automatically, and you do not wish them to be read, select the &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''No'''&amp;lt;/span&amp;gt;&amp;quot; radio button.&lt;br /&gt;
&lt;br /&gt;
If some of the settings are incorrect or the text &amp;quot;Bad&amp;quot; is shown, you may edit the auxiliary files (the file is opened with the NotePad program) or browse for another file by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse'''&amp;lt;/span&amp;gt; buttons.&lt;br /&gt;
&lt;br /&gt;
After you have entered the required information, and the green tick at the top right indicates consistency, press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to continue. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Cancel'''&amp;lt;/span&amp;gt; to ignore the current settings. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear DB'''&amp;lt;/span&amp;gt; to delete the database files. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear Events'''&amp;lt;/span&amp;gt; to delete the tag files (the part of the database that records events). Both &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear'''&amp;lt;/span&amp;gt; buttons close the currently-opened data file.&lt;br /&gt;
&lt;br /&gt;
== General Reading Rules for Data Files and Auxiliary Files ==&lt;br /&gt;
&lt;br /&gt;
Auxiliary files can complement the information in the data file. Here we specify what happens when a data file is opened:&lt;br /&gt;
&lt;br /&gt;
: 1. If the data file has been read previously, the database entry specifies which auxiliary files should be read. The file and the specified auxiliary files are opened and the data are displayed.&lt;br /&gt;
&lt;br /&gt;
: 2. If&lt;br /&gt;
&lt;br /&gt;
:: a) there is a channel definition file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.el?'''&amp;lt;/span&amp;gt;) with the same basename as the data file, and &lt;br /&gt;
&lt;br /&gt;
:: b) this file includes spherical coordinates for the EEG channels (including labels with entries in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; file), and&lt;br /&gt;
&lt;br /&gt;
:: C) there are no other auxiliary files with the same base name, the file will be opened and the data displayed. If files with the same basename are not found, BESA Research will look for files with the basename “default” (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;) in the data folder. If such files are not found, BESA Research will look for files with the basename “default” one folder above (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
: 3. If the data file has been written in binary format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.foc'''&amp;lt;/span&amp;gt;, &amp;lt;span &lt;br /&gt;
style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.fsg'''&amp;lt;/span&amp;gt;) by BESA Research (after Jan. 2000), the file will be read, and all information is assumed to be complete. The file is opened and the data are displayed.&lt;br /&gt;
&lt;br /&gt;
: 4. In all other cases, the ''Channel and digitized head surface point information dialog box'' will be opened for you to specify and check auxiliary files. Auxiliary files with the same base name as the data file will be specified in the text boxes for file names. If files with the same basename are not found, BESA Research will look for files with the basename “default” (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;) in the data directory. If such files are not found, BESA Research will look for files with the basename “default” one directory above (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;). Otherwise the text boxes will be left blank.&lt;br /&gt;
&lt;br /&gt;
: 5. Auxiliary files can be specified at a later time by selecting ''File/Head Surface Points'' and ''Sensors/Load'' ''Coordinate Files''. The ''Channel and digitized head surface point information dialog box'' will be opened.&lt;br /&gt;
&lt;br /&gt;
== Electrodes ==&lt;br /&gt;
&lt;br /&gt;
=== Electrode Conventions ===&lt;br /&gt;
&lt;br /&gt;
BESA Research adheres to the 10/20 and to the new 10/10 standard of the IEF (international EEG Federation). BESA Research will recognize the labels defined by these standards. The labels are stored in most EEG file headers. Otherwise, or in the case of erroneous labeling or sequencing of the recording channels, you may edit the channel labels and/or coordinates, or you may read an electrode file stored previously on disk. In addition to the 10/20 and 10/10 standard labels BESA Research recognizes the following labels: M1, M2 (left, right mastoids), SP1, SP2 (sphenoidal), CB1, CB2 (cerebellar), Chin, Neck, LO1, LO2 (lateral ocular), SO1, SO2 (supra-ocular), IO1, IO2 (infra-ocular). BESA Research will translate all the labels into spherical coordinates for spherical spline interpolation, mapping and source imaging. The following assignments are stored in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; in the BESA folder:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (19).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Electrode labels in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd '''&amp;lt;/span&amp;gt;and their spherical coordinates. 10-20 electrodes are shown in&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt; red and italic.''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The spherical coordinates are defined in degrees by the azimuth (from Cz, positive = right, negative = left hemisphere) and the latitude (counterclockwise from T7/T3 for left and from T8/T4 for right hemisphere) of each electrode. Please do not modify the existing labels or coordinates in this file, because this would adversely affect the interpolated (virtual) montages, the maps and the source montages and source images in BESA Research. However, you may add additional labels for scalp electrodes at the end of this file if needed (up to a total of 196). When you edit the electrode configuration or read in electrode files, BESA Research may replace the 10/20 standard labels T3, T4, T5, T6 by their new 10/10 equivalents T7, &lt;br /&gt;
&lt;br /&gt;
T8, P7, P8. However, in the initialization file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini '''&amp;lt;/span&amp;gt;you can reset to the old 10/20 standard by relabeling T7=T3, P7=T5, T8=T4, P8=T6 under the heading [Electrodes]. You may use the same feature to assign appropriate labels to the X1..X8 channels which exist in many systems, e.g. X1=EKG1 etc.&lt;br /&gt;
&lt;br /&gt;
=== Recommendations for electrode placement ===&lt;br /&gt;
&lt;br /&gt;
For source montages and source analysis two principles are important:&lt;br /&gt;
&lt;br /&gt;
# Covering of the lower head with inferior electrodes to record activity from the inferior surfaces of the brain, especially from the basal temporal lobe, from the temporal pole, from orbito-frontal cortex, and from basal occipital and cerebellar areas.&lt;br /&gt;
# Equal spacing of the electrodes over the whole head to cover all brain areas.&lt;br /&gt;
&lt;br /&gt;
In the following montage EEGxx, the number xx indicates the number of electrodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG25 - Minimum 10-20 configuration including inferior electrodes'''&lt;br /&gt;
&lt;br /&gt;
This covers the 19 standard 10-20 electrodes:&lt;br /&gt;
&lt;br /&gt;
Fp1, Fp2, F7, F3, Fz, F4, F8 ....&lt;br /&gt;
&lt;br /&gt;
plus 6 inferior electrodes on both sides:&lt;br /&gt;
&lt;br /&gt;
F11, A1, P11, F12, A2, P12&lt;br /&gt;
&lt;br /&gt;
with a recommended continuation of the 20% distances, i.e. use F11 instead of F9, P11 instead of P9, A1 instead of T9 to have a wider coverage of the inferior head. A1 / A2 may be replaced by T9 / T10 (or FT9 / FT10) for convenience and comfort.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (21).gif ]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 25 electrodes. Right: left temporal basal activity mapped with 25 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG33 - Additional 10-10 electrodes within the major squares'''&lt;br /&gt;
&lt;br /&gt;
To the above electrodes add the following 8 intermediate electrodes:&lt;br /&gt;
&lt;br /&gt;
FC5, FC1, FC2, FC6, &amp;amp;nbsp;&amp;amp;nbsp;CP5, CP1, CP2, CP6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (23).gif]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 33 electrodes. Right: left temporal basal activity mapped with 33 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG35 - Additional supraorbital electrodes for better EOG separation'''&lt;br /&gt;
&lt;br /&gt;
SO1, SO2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG37 - Wider inferior coverage at interlaced 20% distances'''&lt;br /&gt;
&lt;br /&gt;
Continue 20% down from F7, FC5, CP5, P7 etc. and use the following 8 inferior electrodes instead of 6:&lt;br /&gt;
&lt;br /&gt;
F11, FT9, TP9, P11, &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;F12, FT10, TP10, P12&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG41 – Improved frontal and occipital coverage'''&lt;br /&gt;
&lt;br /&gt;
Additional electrodes halfway between Fz and Fp1 / FP2 and Pz and O1 / O2:&lt;br /&gt;
&lt;br /&gt;
AF1, AF2, &amp;amp;nbsp;&amp;amp;nbsp;PO1, PO2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG43 – Inferior chain with 5 electrodes including A1 / A2'''&lt;br /&gt;
&lt;br /&gt;
F11, FT9, A1, TP9, P11, &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;F12, FT10, A2, TP10, P12&lt;br /&gt;
&lt;br /&gt;
EEG43 represents the widest coverage with relatively even spacing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (25).gif]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 43 electrodes. Right: left temporal polar activity mapped with 43 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG64-256'''&lt;br /&gt;
&lt;br /&gt;
With 64 or more channel caps, it is similarly recommended to use a sufficient number of inferior electrodes all around the head. At least 4 inferior temporal electrodes on each side and additional electrodes above or below the eyes (outside of the cap) are suggested.&lt;br /&gt;
&lt;br /&gt;
=== Editing the channel configuration ===&lt;br /&gt;
&lt;br /&gt;
Only use the channel configuration editing facility if the electrodes or the common reference have not been correctly defined by your digital EEG system, or if you want to define specific spherical coordinates for your scalp electrodes. It is your responsibility to check and provide the correct sequence of electrode labels in correspondence with the sequence of channels in the EEG data file. If these sequences do not match exactly, errors will occur in the computation of maps, source images and interpolated montages.&lt;br /&gt;
&lt;br /&gt;
We will use the example EEG file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg'''&amp;lt;/span&amp;gt; in the subdirectory ''Examples/EEG-Focus'' of the BESA Research directory to explain the editing of electrode labels and coordinates:&lt;br /&gt;
&lt;br /&gt;
1. Select ''File'', then click on ''Open'', or click on &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg '''&amp;lt;/span&amp;gt;if this file is contained in the list of currently selected EEG files.&lt;br /&gt;
&lt;br /&gt;
2. Select ''Edit'', then click ''Channel Configuration''. The dialog box shown below will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (27).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the upper left of the figure you see the dropdown menu after selecting the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File '''&amp;lt;/span&amp;gt;menu in the dialog box. This menu allows to edit a new ('''''New''''') or an existing ('''''Open''''') electrode file and to save the changes to the same ('''''Save''''') or a different ('''''Save As''''') file. Normally, it will not be necessary to use this menu. The control fields on the right will be sufficient. If you type ''''''Ok'''''', you will be given the option of saving the changes to a file.&lt;br /&gt;
&lt;br /&gt;
3. Click on &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Reload org. &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Labels'''&amp;lt;/span&amp;gt; to reread the original labels as stored in the file header of &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg'''&amp;lt;/span&amp;gt;. BESA Research quits editing and redisplays the EEG. Repeat step 2 and select &amp;quot;''Edit / Channel'' ''Configuration''&amp;quot; again. Note: The button &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Reload org. Labels'''&amp;lt;/span&amp;gt; is not available if there are no labels in the file header.&lt;br /&gt;
&lt;br /&gt;
4. Click on the empty space of the scroll bar below the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''scroll '''&amp;lt;/span&amp;gt;button and on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''down arrow'''&amp;lt;/span&amp;gt; of the '''scroll bar''' to display the remaining electrodes in the file.&lt;br /&gt;
&lt;br /&gt;
5. Click on electrode '''R''' (line 32), then on the button &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Delete Electrode'''&amp;lt;/span&amp;gt; to remove the associated channel, which does not contain any signal. Note that you may not omit intermediate channels, even if they do not exhibit signals, because the correct correspondence between the series of electrodes and the EEG channels will not be maintained. Use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;quot;Edit / Bad Channels&amp;quot;'''&amp;lt;/span&amp;gt; menu to disable artifactual or empty channels.&lt;br /&gt;
&lt;br /&gt;
6. Click on''' EOG''' (line 30) and change the entry to '''EOG1'''. Do not type &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;lt;Enter&amp;gt;,'''&amp;lt;/span&amp;gt; but click on the next or a different electrode box to accept the changes.&lt;br /&gt;
&lt;br /&gt;
7. '''Double click''' on '''EOG '''(line 31). This will highlight the entry. Simply type the new name '''EOG2''', and note that the old label is replaced when highlighted. Electrodes '''30 '''and '''31 '''are now defined as distinct electrodes. Next, we want to replace the label '''T10 '''by '''A2'''.&lt;br /&gt;
&lt;br /&gt;
8. Click on the label '''T10''' (line 24). Then click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''drop down'''&amp;lt;/span&amp;gt; arrow right of the highlighted label to obtain the list of default scalp electrodes (read from &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; and sorted alphabetically). Type '''A''' to jump to the electrodes beginning with letter A (see below). Type '''2''' or '''click''' on '''A2''' in the list. Click on the '''type '''box (Scalp channel) to close the list and display the new entry in line 24. Note that this is the most convenient way to edit an electrode label.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (28).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Exercise: repeat step 8 to replace '''T9''' by '''A1'''. Restore labels '''T10''' and '''T9''' in lines 24 and 21.&lt;br /&gt;
&lt;br /&gt;
10. Replace SO1 and SO2 (supra-orbital) by '''PSO1 '''and '''PSO2 '''and note that these electrodes are changed to the''' 'Polygraphy'''' type, because no coordinates are associated with these labels.&lt;br /&gt;
&lt;br /&gt;
11. After you click &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''OK''''&amp;lt;/span&amp;gt;, the box '''Write Channel Configuration File''' will appear and display a name for the current electrode file. By default, the BESA electrode file path and current file name will be used and supplemented by the extension &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''''.elb''''&amp;lt;/span&amp;gt;. The electrode file path may be set in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini'''&amp;lt;/span&amp;gt; file [Defaults] section under ElectrodeFilePath. If no electrode file path is specified in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini'''&amp;lt;/span&amp;gt; file, the default electrode file path ''Montages\Channels ''is used. Simply click '&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;' or type &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;lt;Enter&amp;gt; '''&amp;lt;/span&amp;gt;to save the changes to this file, or select a new file name and/or path, if you do not want to store the electrode file in the BESA Research electrode file directory.&lt;br /&gt;
&lt;br /&gt;
Note that by using the default 10/10 labels (see chapter &amp;quot;''Electrode conventions''&amp;quot;) you specify that the associated electrode is a scalp electrode. Hence, different labels must be used for polygraphic, intracranial or MEG channels. After you have entered a new non-scalp label, you may select the type of the electrode/channel amongst the different groups ('''Polygraphy, Intracranial, MEG Channel''') from the drop down list in the ''''''Type'''''' box. This will allow for using separate selection and scaling facilities of the channel group control push-buttons at the right of the screen ('''All, Scp, Pgr, Icr, MEG'''). If you have entered a new non-scalp label and select the type '''Scalp Channel''', or if you click on the ''''Advanced&amp;gt;&amp;gt;'''' field, boxes will appear to enter the spherical coordinates (azimuth and latitude) of this electrode (cf. Fig. 6.5). These features may be used to specify non-standard scalp electrodes. Please check the earlier sections of this chapter for electrode conventions. You may view the locations of the scalp electrodes on the head schemes in the mapping window. Select '''Show Electrodes in Maps''' in the &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''View / Options'''&amp;lt;/span&amp;gt;&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (29).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Hint:''' If you want to specify the spherical coordinates of an electrode which is close to a standard electrode, click on the ''''Advanced &amp;gt;&amp;gt;'''' field, enter the label of the standard electrode and append a single quotation mark. This will specify that the electrode is close to the labeled location but has different coordinates. The ''Scalp Channel'' type will not be replaced by '''Polygraphy.''' Then edit '''Azimuth''' and '''Latitude'''. This convention is used by BESA Research when reading electrode coordinate files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''(*.elp'''&amp;lt;/span&amp;gt;), e.g. from the BESA program. The coordinates are read and compared with the default coordinates to assign the closest label. Then a single quotation mark is appended to the label, and the coordinates are assigned as specified in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.elp'''&amp;lt;/span&amp;gt; file. For example, open &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''segm1.eeg'''&amp;lt;/span&amp;gt; in the ''Examples\EEG-Focus'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
Note that the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''segm1.elp '''&amp;lt;/span&amp;gt;is searched for automatically in the directory of the data file when opening the data file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Edit Common Scalp Reference'''&lt;br /&gt;
&lt;br /&gt;
There is a separate line at the bottom in the ''Channel Configuration dialog box'' to enter the label and coordinates of the '''Common Scalp Reference electrode'''. If this is specified and enabled (click on field '''Enabled'''), the information provided by the fact that all scalp electrodes were recorded against a common recording reference will be used for mapping, source imaging and virtual montages. This information will be lost if the common reference has not been specified or if a combination of electrodes has been used as reference during recording. Specify the '''Common Scalp Reference electrode''' only if all electrodes have been referenced to the same single electrode and if a standard 10/10 location has been used for the common recording reference.&lt;br /&gt;
&lt;br /&gt;
'''Note that BESA Research cannot process digital EEG data correctly if there is no common recording reference''', and if different recording references were used for the various scalp electrodes. For intracranial and polygraphic channels different references may be used. It is preferable to use the common reference also for electrode channels near the eyes, because these electrodes provide valuable information for mapping, source imaging and interpolated montages. The traditional bipolar channels (e.g. horizontal and vertical '''EOG''') may be '''reconstructed digitally''' using the ''Selected Channels'' group or user-defined montages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 3D Coordinates for Precise Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction - Working with Digitized 3D Coordinates ===&lt;br /&gt;
&lt;br /&gt;
Working with digitized electrode coordinates usually requires reading in additional (auxiliary) files. The procedure is described on the page [[Working With Additional Files]].&lt;br /&gt;
&lt;br /&gt;
=== Data reading rules for EEG ===&lt;br /&gt;
&lt;br /&gt;
This section explains which additional files are read, or which files have to be read in order to provide the necessary information for mapping and source montages.&lt;br /&gt;
&lt;br /&gt;
Assume file name is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.xxx'''&amp;lt;/span&amp;gt;. datafile is the base name, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.xxx'''&amp;lt;/span&amp;gt; is the extension. Replace the text ''datafile'' by the base name of your own file, and the extension&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;'' xxx''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; by the extension of your own file.&lt;br /&gt;
&lt;br /&gt;
'''Channel definitions for EEG:'''&lt;br /&gt;
&lt;br /&gt;
* '''Labels have 10-10 names''': default locations will be used.&lt;br /&gt;
* '''Labels do not have 10-10 names''': Channels are interpreted as '''polygraphic'''. Mapping is not possible without one or more of the following additional files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Define channel names and types.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elb'''&amp;lt;/span&amp;gt; exist (i.e. files with basename d''efault ''one folder above the data file): Channel names and types will be replaced by those defined in this file, in order of occurrence. The ''ela'' file contains just labels and, optionally, types. The ''elp'' file contains spherical coordinates and can contain labels and types. The ''elb'' file contains the same information in binary format. See chapter &amp;quot;''[[Working_With_Additional_Files#Channel_definition_file_conventions_and_formats|Working with additional files / Channel Definition File Conventions]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define order in which electrodes were digitized.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfn'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; one folder above the data file): electrode names are supplied in the order in which coordinates were supplied in the ''sfp'' file. These names must match with the names supplied in the data file or defined in the ''ela/elp/elb'' file. BESA Research uses this to sort coordinates into the order of channels in the file. If fiducials exist, they should be defined on the first three lines. If they do not exist, BESA Research will simulate them (so that it can define the head coordinate system). See chapter ''&amp;quot;[[Working_With_Additional_Files#sfn_.28surface_point_name.29_file|Working with additional files / sfn (surface point name) file]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define electrode coordinates.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfp'''&amp;lt;/span&amp;gt; exists (i.e. file default.sfp one folder above the data file): electrode coordinates will be replaced/defined by the coordinates defined in this file. If &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; does not exist, labels can also be defined in this file. If fiducials exist, they should be defined on the first three lines. If they do not exist, BESA Research will simulate them. See chapter &amp;quot;''[[Working_With_Additional_Files#sfp_.28surface_point_coordinate.29_file|Working with additional files / sfp (surface point coordinate) file]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define coregistration information.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;sfh'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfh'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfh'''&amp;lt;/span&amp;gt; exists (i.e. file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.sfh '''&amp;lt;/span&amp;gt;one folder above the data file): head center and relative position of the unit sphere with respect to the head coordinate system is determined by the coregistration between EEG and MRI. See online help chapter ''&amp;quot;[[Integration_with_MRI_and_fMRI|Integration with MRI and fMRI]]&amp;quot;''.&lt;br /&gt;
&lt;br /&gt;
'''Define head center.''' No coregistration file exists (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, see above). File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.cot'''&amp;lt;/span&amp;gt; exists (i.e. file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.cot&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;one folder above the data file): head center as computed by fitting a sphere to the surface points is replaced by the head center coordinates contained in this file. See chapter ''&amp;quot;[[Working_With_Additional_Files#cot_.28Head_center.29_file|Working with additional files / cot (Head center) file]]&amp;quot;''.&lt;br /&gt;
&lt;br /&gt;
=== Data reading rules for MEG ===&lt;br /&gt;
&lt;br /&gt;
Assume file name is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''''datafile.xxx''''&amp;lt;/span&amp;gt;. '''datafile''' is the base name. '''xxx''' is the extension. Replace the text '''datafile''' by the base name of your own file, and the extension '''xxx''' by the extension of your own file.&lt;br /&gt;
&lt;br /&gt;
Here we consider cases a) MEG alone, b) MEG+EEG.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Automatic procedure:'''&lt;br /&gt;
&lt;br /&gt;
Labels have names defined in the files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd'''&amp;lt;/span&amp;gt;. Channels are interpreted as MEG. However, sensor locations and head surface point locations must be defined in additional files as described below. Mapping and source analysis are not possible without one or more of the following additional files.&lt;br /&gt;
&lt;br /&gt;
'''Define channel names and types.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elb'''&amp;lt;/span&amp;gt; exist (i.e. files with basename'' default'' one folder above the data file): Channel names and types will be replaced by those defined in this file, in order of occurrence. The'' ela''&amp;amp;nbsp;file contains just labels and (optionally) channel types. The ''elp'' file contains spherical coordinates and can contain labels and types. The'' elb'' file contains the equivalent information in binary format. See chapter “''Electrode file conventions'' ''and formats.”''&lt;br /&gt;
&lt;br /&gt;
'''MEG+EEG.''' Define order in which electrodes were digitized. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfn'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; one folder above the data file): electrode names are supplied in the order in which coordinates were supplied in the ''sfp'' file (or in the location descriptor in the data file: e.g. Neuromag). These names must match with the names supplied in the data file or defined in the ''ela/elp/elb'' file. BESA Research uses this to sort coordinates into the order of channels in the file. See chapter “''Working with additional files/ sfn (surface point name) file”.''&lt;br /&gt;
&lt;br /&gt;
'''MEG+EEG.''' Define head surface point/electrode coordinates. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfp'''&amp;lt;/span&amp;gt;'' ''exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfp'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; one folder above the data file): electrode coordinates will be replaced/defined by the coordinates defined in this file. If &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; does not exist, labels can also be defined in this file. See chapter “''Working with additional files/ sfp (surface point'' ''coordinate) file''”. The labels of electrode coordinates '''must '''match to those defined for the data channels. BESA Research will use the labels to associate coordinates with the correct channel.&lt;br /&gt;
&lt;br /&gt;
'''Define sensor coordinates'''. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.pos'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.pmg'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.pos(.pmg)'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.pos(.pmg)'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.pos(.pmg)'''&amp;lt;/span&amp;gt; one folder above the data file): coordinates are defined in this file. The convention is that'' pos'' files contain gradiometer coordinates and'' pmg'' files contain magnetometer coordinates. This is not necessary for the program to read in values properly: the program makes its decision about the sensor type on the basis of the number of coordinate values on one line in the file (6 = magnetometers, 9 = gradiometers). See chapter “''Working with additional files/ pos or pmg (MEG sensor coordinate) file”.''&lt;br /&gt;
&lt;br /&gt;
'''Define coregistration information.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfh'''&amp;lt;/span&amp;gt; exists, or file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.sfh&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfh'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfh'''&amp;lt;/span&amp;gt; one folder above the data file): head center and relative position of the unit sphere with respect to the head coordinate system is determined by the coregistration of the head coordinates with MRI. See (online) help chapter ''&amp;quot;Integration with MRI and fMRI&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
'''Define head center.''' No coregistration file exists (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, see above). File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.cot'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;one folder above the data file): head center as computed by fitting a sphere to the surface points is replaced by the head center coordinates contained in this file. See chapter ''&amp;quot;Working with additional files / cot (Head center) file&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reading MEG files in ASCII format ===&lt;br /&gt;
&lt;br /&gt;
'''BESA Research uses labeling or channel type definitions to decide whether channels are EEG or MEG. '''Based on the labels defined for the channels, or the type specified by the channel definition file, the program will try to find auxiliary files that define electrode coordinates or MEG sensors.&lt;br /&gt;
&lt;br /&gt;
BESA Research uses four files to make its decision:&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.ela/.elp'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;The channel type defined here overrides definitions in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ecd&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; (below).&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines electrode labels and default spherical coordinates based on the 10-20 and 10-10 naming system&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines labels and default spherical coordinates for the BTi whole-head system&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines labels and default spherical coordinates for the Neuromag whole-head system&lt;br /&gt;
&lt;br /&gt;
If the program finds a label in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;, the channel will automatically be defined as EEG. If not, if it finds a label in one of the other files, the channel will be defined as MEG. If it doesn't find the label anywhere, the channel will be defined as Polygraphic.&lt;br /&gt;
&lt;br /&gt;
The spherical coordinates defined in these files are sufficient for mapping the data. Auxiliary files defining the real sensor coordinates are required for source analysis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Defining default label and coordinate file for a new MEG system'''&lt;br /&gt;
&lt;br /&gt;
When preparing an MEG from a system other than BTi-WHS or Neuromag for import to BESA Research, you should edit either &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd '''&amp;lt;/span&amp;gt;to conform with your system. If sensor files (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos/*.pmg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) are always available for your files, the coordinates in the ''ecd ''files are irrelevant: all you need do is define the labels for your own MEG system or use the labels as already defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Files to prepare for reading in each data file'''&lt;br /&gt;
&lt;br /&gt;
Each auxiliary file should have the same base name as your data file.&lt;br /&gt;
&lt;br /&gt;
'''Define channel labels.''' There are several possibilities:&lt;br /&gt;
* Generate your data file according to the BESA'' avr'' ''format or the ASCII multiplexed format.'' Labels are listed in the second line of the file.&lt;br /&gt;
* Generate a ''label file'' (extension &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.ela'''&amp;lt;/span&amp;gt;) with one MEG channel label per line (matching with your ''ecd ''file as defined above) or with the type &amp;quot;MEG&amp;quot; and a label for each line.&lt;br /&gt;
&lt;br /&gt;
Label definitions are also possible using ''elp'' or ''elb'' files, but the above two solutions are recommended because they are the simplest.&lt;br /&gt;
&lt;br /&gt;
'''Define sensor coordinates.''' Generate a ''pos'' or ''pmg'' file. Make sure that the number of sensors matches with the number of MEG channel definitions in your data file.&lt;br /&gt;
&lt;br /&gt;
'''Define fiducials and other head surface points.''' Generate an ''sfp'' file. The first three lines define the fiducials. Subsequent lines define additional surface points.&lt;br /&gt;
&lt;br /&gt;
'''Define coordinates of the center of the head.''' Generate a ''cot'' file. If this file is absent, BESA Research generates the coordinates by fitting a sphere to the head surface points.&lt;br /&gt;
&lt;br /&gt;
Note that all coordinates should be within the same frame of reference, i.e. the same coordinate system. Units must be in meters, centimeters, or millimeters.&lt;br /&gt;
&lt;br /&gt;
==  Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Defining Channel Labels ===&lt;br /&gt;
&lt;br /&gt;
The files described in these examples can be found in the ''.\Examples\Xtras\EEG+Channel Labels'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
The simplest way to define electrode coordinates is to use BESA Research’s default settings (defined in the file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;). In this case, you only need to provide a list of channel labels. If a channel label is defined in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; (i.e. if the labels belong to the 10-20 or 10-10 system), BESA Research will recognize the channel as EEG, and will allocate 3D coordinates.&lt;br /&gt;
&lt;br /&gt;
Labels are not always supplied correctly in the data file. You can override the internal labels in several ways:&lt;br /&gt;
* Read the data file, and then use &amp;quot;''Edit / Channel Configuration''&amp;quot; to redefine the channels. The configuration is stored in a file with the name &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''basename.elb'''&amp;lt;/span&amp;gt; (for binary data) or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''basename.elp'''&amp;lt;/span&amp;gt; (for ASCII data), where basename is the base name (name without the extension) of your data file.&lt;br /&gt;
* Prepare a label file (with the extension ''ela'') containing a list of labels. This can also specify channel types (e.g. EEG, Polygraphic, Intracranial, MEG).&lt;br /&gt;
* Prepare a file (with the extension ''elp'') containing spherical coordinates of the channels. This is the method used with the previous version of BESA Research. If the file doesn’t contain labels, labels are allocated based on their proximity to the 10-20 or 10-10 definitions in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following examples illustrate the above three methods. The input files are all in ''BESA avr format, ''although these examples apply to all EEG data formats in which only EEG channels exist.&lt;br /&gt;
&lt;br /&gt;
If the data file contains polygraphic or other types of non-EEG channel, the types need to be defined. See the ''EEG+Polygraphic channels example.'' MEG is a special case, because the sensor coordinates need to be defined. See the ''MEG ASCII and the MEG+EEG'' ''examples''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. EEG file containing wrong labels – use ''Edit/Channel Configuration ''to redefine labels'''&lt;br /&gt;
* The'' avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.avr'''&amp;lt;/span&amp;gt;, contains the EEG labels. Channels 4 and 14 have been mislabeled – the labels need to be swapped.&lt;br /&gt;
* Open the file with '''''File/Open''''' (Select file type ''BESA avr''. Find the correct directory ''Xtras\EEG+Channel Labels'').&lt;br /&gt;
* The file should open correctly, displaying 32 channels of EEG.&lt;br /&gt;
* The channel coordinates can be viewed by typing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’ '''&amp;lt;/span&amp;gt;key (make sure the cursor is off). There will be a 3D display of the electrodes. Clicking on an electrode will display the label and the coordinates.&lt;br /&gt;
* In this file, channels 4 and 14 have been mislabeled as P3 and F3. In fact, the labels should be the other way around. We will now correct this:&lt;br /&gt;
* Select '''''Edit / Channel Configuration'''''.&lt;br /&gt;
* Type ‘F3’ into the label for channel 4, and ‘P3’ into the label for channel 14. Then type ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;’. The new channel configuration will be saved in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.elp'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* In the data display, the labels of channels 4 and 14 will now be displayed correctly.&lt;br /&gt;
* Close the file ('''''File/Close''''') and open it again. Note that the labels are still correct. This is because the new channel configuration file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.elp'''&amp;lt;/span&amp;gt;, is read automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. EEG file with no labels – channel labels in auxiliary file'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithoutLabels.avr'''&amp;lt;/span&amp;gt;, has no labels.&lt;br /&gt;
* EEG labels are defined in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithoutLabels.ela'''&amp;lt;/span&amp;gt;. This is read automatically when the file is opened.&lt;br /&gt;
* In this example, labels are correct. Each label in the ''ela'' file is on one line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp1''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp2''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F7''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F3''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''...''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3. EEG file with no labels – channel labels derived from spherical coordinates'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithSphericalCoords.avr'''&amp;lt;/span&amp;gt;, has no labels.&lt;br /&gt;
* Spherical coordinates are defined in the ''elp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithSphericalCoords.elp'''&amp;lt;/span&amp;gt;. This contains spherical coordinates (theta and phi) and no labels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-93 -72''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''92 74''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-97 -40''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-61 -49''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-46 -88''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''62 51''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* When the data file is opened, the ''elp'' file is read automatically, and BESA Research uses the tables in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; to assign channel labels. To indicate that it has assigned user defined coordinates and matched with the closest standard electrode, BESA appends an apostrophe (‘) to each label:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp1’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp2’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F7’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F3’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We advise to assign specific labels as well as spherical coordinates if you want to use your own spherical coordinate system, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''FP1u -90 -72''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 4. EEG file with no labels – channel labels not in basename.el?'''&lt;br /&gt;
* The ''avr ''file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGnoLabelsNoElaFile.avr'''&amp;lt;/span&amp;gt;, has no corresponding ''ela, elp'', or ''elb'' file, i.e. no file with the same base name and the ''el?'' extension.&lt;br /&gt;
* When you open the file, BESA Research will ask for a channel configuration file. The ''File Open'' ''dialog ''will select the ''directory .\Montages\Channels''. The idea is that standard (= frequently used) electrode configurations should be kept in this directory.&lt;br /&gt;
* Select the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''XtrasExample.ela'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* Close the data file and reopen it. The file will open with the correct labels. In the BESA window title you will see that the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGnoLabelsNoElaFile.elp'''&amp;lt;/span&amp;gt; has been read automatically. This file was created when &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''XtrasExample.ela'''&amp;lt;/span&amp;gt; was read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mixed EEG and Polygraphic Data === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ EEG+Polygraphic'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
The data are in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEG+Polygraphic.avr'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The third channel is defined as polygraphic in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEG+Polygraphic.ela '''&amp;lt;/span&amp;gt;file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Fp1 &lt;br /&gt;
 Fp2 &lt;br /&gt;
POLY Test&lt;br /&gt;
 F3 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The prefix &amp;quot;''POLY''&amp;quot; specifies that the channel is polygraphic. Most other channels are interpreted as EEG because the labels are known in the 10-20 system.&lt;br /&gt;
&lt;br /&gt;
Similarly, channel 31 is defined as intercranial, using the prefix &amp;quot;''ICR''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that you can also define channels as EEG by specifying the ''&amp;quot;EEG&amp;quot; ''prefix (e.g. ''&amp;quot;EEG E1&amp;quot;. ''This is useful if there are many more channels than are defined in the 10-10 or 10-20 systems, and if the channel coordinates are defined.&lt;br /&gt;
&lt;br /&gt;
=== EEG with Digitized Coordinates === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the .''\Examples\Xtras\ EEG+Digitization Points ''subdirectory.&lt;br /&gt;
&lt;br /&gt;
In the previous examples, we have illustrated how to assign labels to channels using channel definition files. In those examples, only spherical coordinates were defined. Here we will show how to read digitized surface points into BESA Research, using the surface point (''sfp'') coordinate file and the surface point name (''sfn'') file.&lt;br /&gt;
&lt;br /&gt;
The principles of defining digitization coordinate files are:&lt;br /&gt;
* The labels in the ''sfp/sfn'' file combination are used to assign coordinates to electrodes. Thus, if a coordinate has the name ‘''Fz''’ it will be assigned to the channel with the label ‘''Fz''’.&lt;br /&gt;
* In consequence, digitization of surface points can be in a different order to the sequence of channels in the data file. Matching to channels is done by comparing the labels.&lt;br /&gt;
* We recommend that the fiducial points, '''nasion, left preauricular point, right preauricular point''' be digitized. If you do not digitize them, BESA Research will simulate these locations (see ''“Example: Digitization points with and without Fiducials”''). Fiducial points, labeled '''FidNz, FidT9, FidT10''' should be the first three coordinates in the ''sfp'' file.&lt;br /&gt;
* As with the channel definition files, it is easiest for BESA Research if you name the ''sfp/sfn'' files using the base name of the data file, e.g. if the data file is named &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.avr'''&amp;lt;/span&amp;gt;, name the'' sfp'' file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.sfp'''&amp;lt;/span&amp;gt; and the ''sfn'' file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.sfn'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* You specify the files to be read in the ''Channel and digitized head surface point information dialog box.''&lt;br /&gt;
&lt;br /&gt;
See ''“Example: Polhemus Digitizer Data” ''for a discussion of how to format the files originating from Polhemus and other digitizers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. EEG file containing labels, ''sfp'' file containing coordinates, ''sfn ''file containing coordinate names'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;, contains the channel labels. Therefore, we don’t need a channel definition file.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;, contains digitized coordinates of electrodes and of additional surface points. The labels in the file do not correspond to the electrode labels in the ''avr ''file.&lt;br /&gt;
* The ''sfn'' file contains the corrected labels (1 line for each corresponding line in the'' sfp'' file). Now it is possible to match up electrode labels with the labels in the ''avr ''file.&lt;br /&gt;
* Open the data file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;. The ''Channel and digitized head surface point information dialog box'' will open automatically.&lt;br /&gt;
* Note the green tick mark at the top right of the dialog box. This is feedback to say that coordinates of all 32 electrodes have been found.&lt;br /&gt;
* Look at the entry ‘''Digitized head surface points’''. Here you will see that the ''sfp'' and the ''sfn ''files have been read automatically (because of the common base name). There are 51 locations. Note that the digitizer file can contain many more locations than the electrodes. BESA Research uses the locations for fitting the sphere of the spherical head model in source analysis. BESA Research can export these locations for coregistration with the MRI.&lt;br /&gt;
* Define the electrode thickness as 6 mm (at the right of the ‘''Digitized head surface points’'' box. This is the distance of the digitized point on the electrode to the surface of the head.&lt;br /&gt;
* Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; in the dialog box and view the coordinates by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt; key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. EEG file without labels, channel labels in ''ela'' file, surface point coordinates and names in ''sfp'' file'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.avr'''&amp;lt;/span&amp;gt;, has no channel label. Therefore, a label file is required. Here, the label file is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.ela'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.sfp'''&amp;lt;/span&amp;gt;, contains digitized coordinates of electrodes and of additional surface points. The labels are defined correctly in the ''sfp ''file, i.e. for every EEG channel label there is a corresponding coordinate. Therefore, no ''sfn'' file is required.&lt;br /&gt;
* When you open the file, don’t forget to define the electrode thickness as 6 mm in the ''Channel and digitized head surface point information dialog box.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Polhemus Digitizer Data === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ EEG+Digitization Points'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
Data from the Polhemus (other digitizers too) may often not fit the format BESA Research requires for the surface point file. Note that Polhemus data can be exported directly into BESA-compatible ''sfp''-files using the LOCATOR software.&lt;br /&gt;
&lt;br /&gt;
BESA Research requires either&lt;br /&gt;
* just the cartesian coordinates (x, y, z) values -- one set of coordinates per line. In this case, labels must be defined in a parallel surface point name file, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0.5 &amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:0cm;margin-right:0cm;&amp;quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the cartesian coordinates plus a label. The label can be in front of or behind the coordinates on the line, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0.5&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68 &amp;amp;nbsp;Fz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:2.54cm;margin-right:0cm;&amp;quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz &amp;amp;nbsp;0.5 &amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68'' &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of a few lines of a (''sfp'') file that are not read correctly by BESA Research:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''Nz&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;87.721&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''T9 &amp;amp;nbsp;-79.131&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''T10&amp;amp;nbsp;&amp;amp;nbsp;67.253&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''1 &amp;amp;nbsp;-34.192 &amp;amp;nbsp;103.374&amp;amp;nbsp;&amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''2&amp;amp;nbsp;&amp;amp;nbsp;23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048 &amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''3&amp;amp;nbsp;&amp;amp;nbsp;-81.179&amp;amp;nbsp;&amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''4 &amp;amp;nbsp;-60.701&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What is wrong?&lt;br /&gt;
&lt;br /&gt;
* First, some of the points are just numbered. These numbers don't tell BESA Research which electrode channel to which the coordinates should be assigned – assignments should be via channel labels and not numbers.&lt;br /&gt;
* Second, Nz, T9, T10 define the fiducials. Instead, the labels FidNz, FidT9, FidT10 are required (prefix &amp;quot;Fid&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What should be done? Probably the best way is&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;a) keep only the coordinates in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp &amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0&amp;amp;nbsp;&amp;amp;nbsp;87.721 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-79.131 &amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''67.253 &amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-34.192&amp;amp;nbsp;&amp;amp;nbsp;103.374 &amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048&amp;amp;nbsp;&amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-81.179 &amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-60.701&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b) prepare a surface point name file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfn&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) containing the corresponding labels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidNz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT9''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT10''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp1''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp2''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F7''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F3''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keeping labels and coordinates separate means that the label file needs generating only once. The coordinate file is different for each subject.&lt;br /&gt;
&lt;br /&gt;
Alternatively, if your digitizer program attaches the labels correctly to the coordinates, then you can prepare the ''sfp'' file like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidNz&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;87.721 &amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''FidT9&amp;amp;nbsp;&amp;amp;nbsp;-79.131&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT10&amp;amp;nbsp;&amp;amp;nbsp;67.253&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp1&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-34.192&amp;amp;nbsp;&amp;amp;nbsp;103.374 &amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp2 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048&amp;amp;nbsp;&amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F7&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-81.179 &amp;amp;nbsp;&amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F3&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-60.701&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Digitization points with and without Fiducials === &lt;br /&gt;
&lt;br /&gt;
We recommend that if electrodes are digitized, you should also digitize the three fiduciary points:''' Nasion''', '''and left and right preauricular points'''. We refer to these points as &amp;quot;fiducials&amp;quot;. We name them '''&amp;quot;FidNz&amp;quot;,''' '''&amp;quot;FidT9&amp;quot;,''' and '''&amp;quot;FidT10&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
If you do not digitize these points, BESA Research will simulate them, i.e. it will generate the points where it expects them to be, based on the fit of a sphere to the existing points, and on the names of surface points of known locations. &amp;quot;Known locations&amp;quot; means: the surface point name must be a 10-20 or 10-10 electrode name (e.g. &amp;quot;Cz&amp;quot; -- arbitrary labels, such as &amp;quot;E10&amp;quot; is not a known location). Therefore, BESA Research requires that at least 3 surface points with known labels are defined.&lt;br /&gt;
&lt;br /&gt;
In a file containing digitization points (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), the fiducials should be the first three sets of coordinates, i.e. the first three lines of the file. The remaining coordinates in the file can be electrode (or other surface point) coordinates, in any order. The assignment of electrode coordinates to data channels is achieved by matching the coordinate labels to data channel labels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Consequences of omitting fiducials'''&lt;br /&gt;
&lt;br /&gt;
When these files have been read into BESA Research, look at the head surface points in 3D using ''File/Head Surface Points'' ''and Sensors/View'' (or use the shortcut &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt;). You will see small differences in fiducial locations between the real and the simulated locations. You can expect very slight influences on the results of source modeling (the spherical head may be rotated slightly, although the head center and radius will be identical), and output of source locations in head coordinates will be different, because these coordinates are based on fiducial locations (see section [[Electrodes_and_Surface_Locations#Coordinate_systems|Coordinate systems]]).&lt;br /&gt;
&lt;br /&gt;
=== ASCII Import === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ASCII Import'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
When should the Import ASCII function be used? If you have data in BESA Research average referenced or multiplexed format, use the Open File function to read in a file directly. If you have data in a different ASCII format, BESA Research offers a flexible import function to import data from an array of numbers in an ASCII file.&lt;br /&gt;
&lt;br /&gt;
The array can be '''vectorized '''(one channel, all time points, per line) or '''multiplexed''' (one time point, all channels, per line). These alternatives are illustrated in the two example files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.asc'''&amp;lt;/span&amp;gt; and &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''multiplexed.asc'''&amp;lt;/span&amp;gt;, and in the tables below:&lt;br /&gt;
&lt;br /&gt;
'''Vectorized array:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|| channel 1, time 1&lt;br /&gt;
|| channel 1, time 2&lt;br /&gt;
|| channel 1, time 3&lt;br /&gt;
|| channel 1, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 2, time 1&lt;br /&gt;
|| channel 2, time 2&lt;br /&gt;
|| channel 2, time 3&lt;br /&gt;
|| channel 2, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 3, time 1&lt;br /&gt;
|| channel 3, time 2&lt;br /&gt;
|| channel 3, time 3&lt;br /&gt;
|| channel 3, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 4, time 1&lt;br /&gt;
|| channel 4, time 2&lt;br /&gt;
|| channel 4, time 3&lt;br /&gt;
|| channel 4, time 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiplexed array:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 1 &lt;br /&gt;
|| channel 2, time 1&lt;br /&gt;
|| channel 3, time 1&lt;br /&gt;
|| channel 4, time 1&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 2&lt;br /&gt;
|| channel 2, time 2&lt;br /&gt;
|| channel 3, time 2&lt;br /&gt;
|| channel 4, time 2&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 3&lt;br /&gt;
|| channel 2, time 3&lt;br /&gt;
|| channel 3, time 3&lt;br /&gt;
|| channel 4, time 3&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 4&lt;br /&gt;
|| channel 2, time 4&lt;br /&gt;
|| channel 3, time 4&lt;br /&gt;
|| channel 4, time 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA Research needs channel labels. If the labels are in the 10-20 or 10-10 system, BESA Research will assign the channels default coordinates. This is the minimum requirement to be able to map EEG.&lt;br /&gt;
&lt;br /&gt;
If you have 3D digitized coordinates, these can also be specified in ASCII files. This is described under the chapter “[[Electrodes_and_Surface_Locations#Example:_EEG_with_Digitized_Coordinates | Example: EEG with Digitized Coordinates]]”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. Vectorized data'''&lt;br /&gt;
&lt;br /&gt;
* The file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.asc'''&amp;lt;/span&amp;gt; contains the data. The file should be imported via ''File/Import ASCII File''.&lt;br /&gt;
* First you will be asked for a name for the binary target file. The name &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.fsg'''&amp;lt;/span&amp;gt; is suggested. You may accept this name by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; or choose an alternative name. Note that if the file already exists, the imported data will be appended to the file.&lt;br /&gt;
* Next, the ''ASCII File Properties dialog box'' will open. First select ''‘Vectorized’'', and make sure the subsequent entries are correct:&lt;br /&gt;
&lt;br /&gt;
:: Header Lines = 0 (i.e. in this example the numbers start on the first line)&lt;br /&gt;
:: Bins/Microvolt = 1.0 (i.e. a value 1 in the data represents 1 µV)&lt;br /&gt;
:: Sampling Rate = 320 Hz (When the dialog box is opened, BESA Research always chooses the setting it used previously)&lt;br /&gt;
:: Number of channels = 32 (the number of rows in the matrix)&lt;br /&gt;
:: Number of Samples = 640 (the number of columns in the matrix)&lt;br /&gt;
:: Prestimulus Time = 1000 ms (defines the zero time point 1 s after the beginning)&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to accept the settings.&lt;br /&gt;
* Next, the ''Channel and digitized head surface point information dialog box'' will open. In the ''‘Channel configuration’'' box, the label file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.ela'''&amp;lt;/span&amp;gt;, will be detected automatically. Automatic detection occurs when the label file has the same base name as the data file (in this case, vectorized). To the right of the file name is a summary of channel types: 32 channels found, 30 are EEG, 1 is intercranial, 1 is polygraphic.&lt;br /&gt;
&lt;br /&gt;
Note the green tick at the top left of the dialog box. This indicates that BESA Research thinks that it has sufficient information to read the file, and map and do source analysis on the data.&lt;br /&gt;
&lt;br /&gt;
* To see how channel types are specified in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.ela'''&amp;lt;/span&amp;gt;, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit '''&amp;lt;/span&amp;gt;button to view the file with the Notepad program. Here you will see that most channels have 10-20 electrode names. Channel 3 has the prefix ‘''POLY''’, specifying that this channel is polygraphic. Channel 31 has the prefix ‘''ICR''’, specifying that this channel is intercranial. Close Notepad, and click ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;’ in the dialog box.&lt;br /&gt;
* A final dialog box asks for a Segment Comment. This is a label that will be displayed in the resulting file. The label is particularly useful if you import several ASCII files into one target file. Each segment is then easily identified by its own label.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. Multiplexed data'''&lt;br /&gt;
&lt;br /&gt;
* This example is similar to Example 1. In this case, import the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''multiplexed.asc'''&amp;lt;/span&amp;gt;, and select ‘Multiplexed’ in the ''ASCII File Properties dialog box''. Other settings in the dialog box stay as they were.&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
# The numbers in the source files can be split into several lines per channel or per time point. Then you will have to enter the correct number of time points and channels in the dialog box. In the present examples, the lines are not split (the vectorized file has all 640 time points in each line, and the multiplexed file has all 32 channels in each line). In this case, BESA Research selects the correct numbers of time points and channels automatically.&lt;br /&gt;
# If you have digitized coordinates, these can be specified in the Channel and digitized head surface point information dialog box. Since the procedure is the same as when reading data, this is described elsewhere under “''Example: EEG with Digitized Coordinates''”.&lt;br /&gt;
&lt;br /&gt;
=== MEG ASCII === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the'' \Examples\Xtras\ MEG ASCII'' subdirectory of the BESA Research installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiplexed MEG ASCII file with labels in the header (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;''med.mul''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;)'''&lt;br /&gt;
&lt;br /&gt;
For reading MEG data, BESA Research expects&lt;br /&gt;
* Correct channel definitions, i.e. channels should be defined as MEG.&lt;br /&gt;
* Head surface points.&lt;br /&gt;
* Sensor coordinates, in '''the same coordinate system''' as the head surface points.&lt;br /&gt;
* Optionally, you can define the coordinates of the center of the head. This will be important if too few head surface points are available to specify where to place the spherical head used by BESA Research for source modeling, or if you want to use some external definition, e.g. from the MRI.&lt;br /&gt;
&lt;br /&gt;
As with digitized EEG coordinates, we use the ''Channel and digitized head surface point information'' ''dialog box'' to specify the files which need to be read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. File Open'''&lt;br /&gt;
* The file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.mul'''&amp;lt;/span&amp;gt;, contains MEG data in the ASCII multiplexed format. This format contains channel labels. The labels used are recognized by BESA Research as originating from the Neuromag system. They are therefore identified as MEG and do not need further identification.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.sfp'''&amp;lt;/span&amp;gt;, defines fiducials and head surface points. Coordinate labels are included in the file, so no'' sfn'' file is required.&lt;br /&gt;
* The cot file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.cot'''&amp;lt;/span&amp;gt;, defines the coordinates of the head center. If this were missing, BESA Research would compute the head center based on the sphere that best fits the head surface points.&lt;br /&gt;
* The ''pos'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.pos'''&amp;lt;/span&amp;gt;, defines the coordinates of the 122 sensors. For the Neuromag system there are 9 values per line, defining primary coil location, secondary coil location, and orientation cosines. The sequence of coordinates in the ''pos'' file '''must''' match the sequence of MEG channels! The file format and locations of the primary and secondary coils allow BESA Research to identify the sensor type as planar gradiometers. If the file had only six values per line, BESA Research would classify the sensors as magnetometers (one primary coil and the orientation cosines).&lt;br /&gt;
* Open the file, selecting current file type as ''‘*,m''??’. The ''Channel and digitized head surface point'' ''information dialog box'' will open, displaying the different auxiliary file names. The green tick indicates that BESA Research finds everything to be OK.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; button and then the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''' ‘V’ '''&amp;lt;/span&amp;gt;key to view the coordinates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. File Import'''&lt;br /&gt;
* The file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCIIimport.asc'''&amp;lt;/span&amp;gt;, contains MEG data in a multiplexed array, without a header. This needs to be imported using ''File/Import ASCII'' (see ''“Example: ASCII Import”).''&lt;br /&gt;
* On import you have to specify the file as ‘Multiplexed’, the number of time points (285), the number of channels (132), the bins/µV (or bins/fT) (=1), the time at which the stimulus occurred (50 ms), and the sampling rate (949.667 Hz).&lt;br /&gt;
* This format contains no channel labels. The labels in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''ME&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;GASCIIimport.ela'''&amp;lt;/span&amp;gt; are recognized by BESA Research as originating from the Neuromag system. They are therefore identified as MEG and do not need further identification.&lt;br /&gt;
* Since it recognizes the channels as MEG, the ''Channel and digitized head surface point information dialog box'' will open, displaying the different auxiliary file names as before. Since all necessary files with the same base name as the data file are supplied, they are read automatically.&lt;br /&gt;
* Press the ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK’'''&amp;lt;/span&amp;gt; button, enter a segment name, and then the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt; key to view the coordinates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3. File Open -- MEG information recorded elsewhere'''&lt;br /&gt;
&lt;br /&gt;
This example illustrates the case where the auxiliary files have a different base name from the data file: you must select the file name in the ''Channel and digitized head surface point information dialog box''.&lt;br /&gt;
&lt;br /&gt;
* Open the file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCIIelsewhere.mul'''&amp;lt;/span&amp;gt;. It is read as an MEG magnetometer file.&lt;br /&gt;
* In the ''Channel and digitized head surface point information dialog box'', specify&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.sfp'''&amp;lt;/span&amp;gt; for the head surface points, and&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.pos'''&amp;lt;/span&amp;gt; for the MEG sensors&amp;lt;/div&amp;gt;&lt;br /&gt;
* MEG coordinates will be correct. The sensor definition file specifies the sensors as planar gradiometers.&lt;br /&gt;
* Where the auxiliary files came from will be recorded in the database. If you open the file again, the auxiliary files will be found automatically, without asking any questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reading combined EEG and MEG from an ASCII file === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''Examples\Xtras\MEG+EEG'' subdirectory of the BESA Research installation folder.&lt;br /&gt;
&lt;br /&gt;
Here are two examples containing mixed MEG, EEG, and polygraphic channels:&lt;br /&gt;
* Open a file using the ''File/Open'' command&lt;br /&gt;
* Import a file using ''File/Import ASCII'' command&lt;br /&gt;
&lt;br /&gt;
In both cases&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file defines the channel labels. Based on the labels, BESA Research knows which channels are EEG and MEG. The remainder are classified as polygraphic channels.&lt;br /&gt;
* The &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file defines the MEG sensor coordinates. The number of values on a line of this file (=9) defines the MEG as gradiometers. The relative locations of primary and secondary coils identify the gradiometers as planar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Example with ''File/Open'''''&lt;br /&gt;
* Open the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.mul'''&amp;lt;/span&amp;gt;. The ''Channel and digitized head surface point information dialog box'' will open automatically (unless the file has already been read once and the information is in the database).&lt;br /&gt;
* You will see under ''‘internal data file information’'' that BESA Research finds 122 MEG sensors, and 162 channels in all.&lt;br /&gt;
* Under ‘''Channel configuration’'', you will see that as a result of reading the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.ela'''&amp;lt;/span&amp;gt;, 32 channels are defined as EEG, and 8 channels as polygraphic.&lt;br /&gt;
* Under ‘''Digitized head surface points’'' is the feedback that out of the 51 locations in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.sfp'''&amp;lt;/span&amp;gt;, all electrode locations have been defined.&lt;br /&gt;
* Under ‘''MEG sensors’'', the sensors have been identified as gradiometers.&lt;br /&gt;
* The green tick at the top right of the window indicates that BESA Research classifies everything as OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Example with ''File/Import ASCII'''''&lt;br /&gt;
* Import the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEGimport.asc'''&amp;lt;/span&amp;gt;. Select &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEGimport.fsg '''&amp;lt;/span&amp;gt;as the target file (see ''“Example: ASCII Import”'').&lt;br /&gt;
* Select 320 Hz sampling rate, and 500 ms pre-stimulus time. Other selections in the dialog box should be ‘Multiplexed’, 1 bin/microvolt (this is interpreted as 1 bin/fT for MEG), 162 channels and 320 samples.&lt;br /&gt;
* The ''Channel and digitized head surface point information dialog box'' will open as above.&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Electrodes_and_Surface_Locations</id>
		<title>Electrodes and Surface Locations</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Electrodes_and_Surface_Locations"/>
				<updated>2021-05-05T09:54:02Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* 3D Coordinates for Precise Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 6.1 or higher&lt;br /&gt;
}}&lt;br /&gt;
= Working with Electrodes and Surface Locations =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Here you will find out how BESA Research works with electrode and MEG sensor coordinates and labels, and how head surface points can be used to improve source modeling and coregistration of source models with the MRI. In most cases, electrode positions are sufficiently defined by their labels. The section &amp;quot;''Electrode Conventions''&amp;quot; lists the standard position which BESA Research assigns to EEG channels. In some cases, especially for larger electrode arrays or for MEG measurements, additional information is required to add sufficient information for mapping and for source analysis. The additional information is supplied in additional, auxiliary files which are read by BESA Research and associated with the data files. The auxiliary files, and how they are supplied to BESA Research, are described in this chapter.&lt;br /&gt;
&lt;br /&gt;
Examples for using auxiliary files to define the 3D locations of electrodes are found in the [[Electrodes_and_Surface_Locations#Examples|Examples]] section .&lt;br /&gt;
&lt;br /&gt;
Descriptions of file formats that BESA Research uses are given in the online help chapter [[Working_With_Additional_Files|Working With Additional Files]].&lt;br /&gt;
&lt;br /&gt;
== Working with auxiliary files ==&lt;br /&gt;
&lt;br /&gt;
Data files come with varying amounts of prior information about electrode/sensor locations, depending on the recording system. BESA Research allows you to read auxiliary files that define additional information, such as channel labels, and coordinates of the electrodes, sensors, and other head surface points. The information is required for mapping and for source montages.&lt;br /&gt;
* '''Mapping.''' BESA Research uses spherical spline mapping. For this, electrode/sensor locations are projected onto a sphere. The minimum requirement is 10-10 or 10-20 labels: if only channel labels are available without additional information, BESA Research uses default spherical coordinates.&lt;br /&gt;
* '''Source modeling'''. Spherical coordinates of electrode locations are sufficient, but digitized locations are better. Digitized locations can be defined in the data file or in auxiliary files. BESA Research will use digitized head surface points (electrodes + additional points) to fit a sphere for the spherical model. Points anterior to the left and right preauricular points and below the plane formed by these points and the nasion are excluded when fitting the sphere.&lt;br /&gt;
&lt;br /&gt;
Files can also be written, for instance for&lt;br /&gt;
* '''Source modelling with MRI coregistration'''. BESA Research allows for the export of surface points in a special format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''sfh'''&amp;lt;/span&amp;gt; file) which can be read by the BESA MRI (or BrainVoyager) program. These are fitted to the head surface defined by BESA MRI (or BrainVoyager) in order to define rotation, translation, and deformation parameters required to coregister the coordinate systems (see &amp;quot;''Integration with MRI and fMRi''&amp;quot;).&lt;br /&gt;
* '''Export of coordinates.''' Electrode, other surface point locations, and MEG sensor coordinates and other surface point locations can be written to ASCII files so that they can be reread when reading other files into BESA Research (e.g. ASCII files), or used by other programs.&lt;br /&gt;
&lt;br /&gt;
Feedback and control over how these files are read is provided by&lt;br /&gt;
* '''the Channel and digitized head surface point information dialog box.''' This dialog is usually opened when you open a file for the first time. It allows you to specify the names of auxiliary files, and it makes initial checks on the files to see whether they are consistent with each other and with the data file. If the check is OK, you will see a green tick at the top right hand corner of the dialog box. If there are inconsistencies, the tick is replaced by a red exclamation mark. In this case, you will usually need to edit the auxiliary files or specify other files. The dialog box is not opened if the file is recognized to contain all the necessary information (files with the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''foc'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''fsg'''&amp;lt;/span&amp;gt; extensions), or if the program only finds a channel definition file (with extensions &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''ela, elp,'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''elb'''&amp;lt;/span&amp;gt;). The dialog box is not opened if the data file has been opened before. You can always open the dialog box manually by specifying ''&amp;quot; File / Head Surface Points and Sensors/Load Coordinate'' ''Files.''&lt;br /&gt;
* '''The log file''' (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*_LoadFile.log&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;)'''.''' Coordinating the information between the data file and its auxiliary files can be a complex procedure. To help you check whether the coordination is being done properly, if you select the menu entry ''&amp;quot; Options / File / Generate Log &amp;quot;'' during File Open, BESA Research writes a log file with the same base name as the data file, appending &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_LoadFile.log'''&amp;lt;/span&amp;gt;&amp;quot; to the base name, recording which files have been read, and some of the parameters that have been found. This file is created every time auxiliary files are read (e.g. on file open, when reading in channel configuration files, head surface point files, MEG sensor locations), or changed (&amp;quot;''Edit /'' ''Channel Configuration''&amp;quot;).&lt;br /&gt;
* '''The log window. '''If there are inconsistencies during the processing of auxiliary files and 3D coordinates, a logging window is opened showing the information that would be written to the log file. You can read what has been done to help diagnose the problems. Select '''OK''' to continue in spite of the problems, or''' Reset''' to reject. Typing '''Reset''' also deletes the database files associated with the current data file, thus allowing you to start reading this file from scratch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA Research remembers which auxiliary files are associated with the current file'''. When a data file is first opened, and BESA Research finds auxiliary files with the same base name as the data file, you will be asked if you want this file to be read. The decision you make will be recorded in the database for this data file. Next time the file is opened, the files will or will not be read, according to your previous decision. Similarly, when an auxiliary file is read using the menu, this is recorded in the database, and the file will be opened automatically next time the data file is opened. To override previous decisions, you must delete the database files (see the''' log window '''above) or change the entries in the Channel and digitized head surface point information dialog box (see the chapter ''&amp;quot;Electrode Conventions / Channel and digitized head surface point information dialog box''&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Coordinate systems ==&lt;br /&gt;
&lt;br /&gt;
We need to deal with four different coordinate systems. These differ in how the x, y, and z axes are defined, and in the units of measurement (e.g. mm, cm, m). The first three are illustrated in the following figure:&lt;br /&gt;
&lt;br /&gt;
[[File:ST_Electrodes_(1)_02.png|800px]]&lt;br /&gt;
&amp;lt;!-- [[Image:ST Electrodes (1).gif ]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Device coordinates.''' These are the coordinates used by the recording system. The axes may be anywhere in relation to the head. For instance, in the Polhemus digitizer, the axes go through the magnetic field transmitter which is located somewhere outside the head. The units of measurement may be millimeters, centimeters, or meters.&lt;br /&gt;
&lt;br /&gt;
'''Head coordinates'''. This coordinate system is defined by reference points on the head known as ''fiducials''. The reference points are normally the nasion (Nz, NAS), the left preauricular point (T9, LPA), and the right preauricular point (T10, RPA). The x axis is defined by the line joining T9 and T10, positive towards T10. The y axis is defined by the line through Nz that is perpendicular to the x axis (positive towards Nz). The z axis is perpendicular to the x and y axes, and goes up out of the head in the vicinity of Cz. The units of measurement may be millimeters, centimeters, or meters. In BESA Research these are labelled with the prefix 'Fid', e.g. 'FidT9', 'FidNz'.&lt;br /&gt;
&lt;br /&gt;
'''BESA Research coordinates.''' For dipole analyses the head model consists of a sphere. In the default situation where no digitized sensor information is available, the center of the sphere is defined by the crossing point between the lines joining T7 (=T3) and T8 (=T4) and Fpz and Oz.. The x axis is the T8-T7 line, positive at T8. The y axis is the Oz-Fpz line, positive at Fpz. The z-axis goes up out of the head through Cz. If digitized information is available, the axes are defined by the best fit between the idealized electrode locations and the real locations. The diameter of the sphere is also defined by the best fit. Units given in the display are in millimeters.&lt;br /&gt;
&lt;br /&gt;
The '''center of the spherical model''' is on average about 4 cm above the origin of the Head Coordinates. If digitized surface points are available, the sphere is fitted to these points. Using a cot file, it is possible to override the fit and define your own head center. In conjunction with BrainVoyager, you can use the MRI to seed the location of the head center (e.g. a fixed distance anterior to the posterior commissure) and save it as a cot file. Using MRI coregistration (see &amp;quot;''Integration with MRI and'' ''fMRi''&amp;quot;), the center is placed between the anterior (AC) and posterior (PC) commissures, at the half-way point between the anterior and posterior points (AP and PP). Without coregistration, the center corresponds to a point 17.5 mm behind AC in the standard MRI head.&lt;br /&gt;
&lt;br /&gt;
'''MRI coordinates.''' These are the coordinates used by BrainVoyager. These are defined by the MRI slices. Measurement units are millimeters.&lt;br /&gt;
&lt;br /&gt;
== The Channel and Digitized Head Surface Point Information Dialog Box ==&lt;br /&gt;
&lt;br /&gt;
Many data formats read by BESA Research require additional information about data channel, which are specified by additional, auxiliary files. This dialog box allows you to specify which auxiliary files are read in to supplement the information in the data file.&lt;br /&gt;
&lt;br /&gt;
The dialog box is opened automatically the first time a data file is opened, if&lt;br /&gt;
* auxiliary files other than a channel definition file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elb&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) are found&lt;br /&gt;
* no auxiliary files are found, and the data file was not written in compressed binary format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.foc&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.fsg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) by BESA Research &lt;br /&gt;
&lt;br /&gt;
When a data file is closed, the information about which auxiliary files have been read is stored in the database. When the file is opened for a second time the dialog box is not opened automatically, because the information is assumed to be correct – the files are read automatically.&lt;br /&gt;
&lt;br /&gt;
The dialog box can be opened manually by selecting &amp;quot;''File / Head Surface Points and Sensors / Load Coordinate Files''&amp;quot;, or using the shortcut &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''ctrl-L'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (2).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dialog box is divided into several sections:&lt;br /&gt;
&lt;br /&gt;
* '''Internal data file information.''' Here you can see the file name, the originating system (file format), the name of the database file, if any, and the channel information as specified by the data file alone.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (4).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Suggestions.''' This box makes suggestions about what needs to be filled in, e.g. &amp;quot;Please enter electrode thickness&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (5).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Main feedback (top right hand corner).''' A green tick indicates that the currently selected data files are consistent among themselves and with the data file. A red exclamation mark indicates an inconsistency. Check the feedback texts in the subsequent sections for more information:&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (8).gif|70px]] [[Image:ST Electrodes (7).gif|71px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Channel configuration file specification.''' If the channel labels and types defined in the data file (&amp;quot;Internal data file information&amp;quot;) need to be changed, enter a file name here (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elb&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If a channel definition file exists with the same basename as the data file, or if a channel definition file has been specified previously (database entry exists), it will be selected automatically. To the right of the file name, feedback is provided about the number of channels and channel types found. If the labels are consistent with the data file, to the right the text &amp;quot;Good&amp;quot; is shown. If they are inconsistent, e.g. the file contains the wrong number of channel definitions, the text &amp;quot;Bad&amp;quot; is shown.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (9).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Digitized head surface point specification.''' Here you may specify a file containing digitized electrode and other head surface points. Optionally, the information can be split into two files, containing the coordinates (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp, *.eps&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the coordinate names (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.sfn'''&amp;lt;/span&amp;gt;). Alternatively, both labels and names can be contained in the coordinate file. If the files specify electrode coordinates, there '''must''' be a coordinate name for each electrode. The sequence may be different. BESA Research will use the names to assign each coordinate to the electrodes. Additional head surface points can have any other names. It is recommended that the first three digitized coordinates are the fiducials (fiduciary points), labelled &amp;quot;FidNz&amp;quot;, &amp;quot;FidT9&amp;quot;, &amp;quot;FidT10&amp;quot;. If your electrode labels not follow the 10-10 or 10-20 standard (e.g. in high-density electrode recordings), it is recommended to tick the box '''&amp;quot;Electrode labels non-conforming to 10-10 standard&amp;quot;'''. This will prevent BESA Research from using electrodes for an optimal rotation of the coordinate system which should not be used (e.g. A1, A2 which have known locations in 10-10, but are sometimes used in a nomenclature outside of 10-10). The example below shows the sphere adaption for an example data set with and without taking this into account.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (12).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The right picture shows that when discarding the non-conforming electrodes, the fiducials are correctly placed along the x any y axes.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (10).gif ]] [[Image:ST Electrodes (11).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(In the special case of Neuromag files with electrode channels, the data file contains head surface points with the wrong labels. Here you may provide a label file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfn&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) without a corresponding digitized coordinate file.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Coregistration file.''' Here you may specify a file containing the coordinates of the head center (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.cot&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) or an ''MRI Coregistration File ''(&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). Head center redefinition is only necessary if you want to provide an external definition, e.g. from the MRI. The ''MRI Coregistration File ''is used if the data are to be coregistered with individual MRI. (see &amp;quot;''Integration with MRI and fMRi'' &amp;quot;). '''Note''' that if a head center file (cot file) with the same base name as the data file exists, it will be read automatically if the head center coordinates deviate by more than 1 mm from the internally calculated values. Changes are ignored if the radio button is set to &amp;quot;No&amp;quot;. This automated function allows you to change the head center during a session, using BrainVoyager's view of the MRI and the Source Module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (14).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''MEG sensor specification'''. If the file contains MEG channels, you may enter the name of a sensor coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pmg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). This field is grayed if there are no MEG channels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (15).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Artifact coefficients file.''' If the data are to be artifact corrected, your pre-prepared coefficient file may be defined here. See the chapter &amp;quot;''Artifact Correction''&amp;quot;. Selecting the file here is equivalent to loading the file using the menu entry &amp;quot;''Artifact / Load''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (17).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each of the selected files, make sure the radio button &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Yes&amp;quot;'''&amp;lt;/span&amp;gt; is selected on the left-hand side of the dialog box. If files have been selected automatically, and you do not wish them to be read, select the &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''No'''&amp;lt;/span&amp;gt;&amp;quot; radio button.&lt;br /&gt;
&lt;br /&gt;
If some of the settings are incorrect or the text &amp;quot;Bad&amp;quot; is shown, you may edit the auxiliary files (the file is opened with the NotePad program) or browse for another file by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse'''&amp;lt;/span&amp;gt; buttons.&lt;br /&gt;
&lt;br /&gt;
After you have entered the required information, and the green tick at the top right indicates consistency, press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to continue. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Cancel'''&amp;lt;/span&amp;gt; to ignore the current settings. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear DB'''&amp;lt;/span&amp;gt; to delete the database files. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear Events'''&amp;lt;/span&amp;gt; to delete the tag files (the part of the database that records events). Both &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear'''&amp;lt;/span&amp;gt; buttons close the currently-opened data file.&lt;br /&gt;
&lt;br /&gt;
== General Reading Rules for Data Files and Auxiliary Files ==&lt;br /&gt;
&lt;br /&gt;
Auxiliary files can complement the information in the data file. Here we specify what happens when a data file is opened:&lt;br /&gt;
&lt;br /&gt;
: 1. If the data file has been read previously, the database entry specifies which auxiliary files should be read. The file and the specified auxiliary files are opened and the data are displayed.&lt;br /&gt;
&lt;br /&gt;
: 2. If&lt;br /&gt;
&lt;br /&gt;
:: a) there is a channel definition file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.el?'''&amp;lt;/span&amp;gt;) with the same basename as the data file, and &lt;br /&gt;
&lt;br /&gt;
:: b) this file includes spherical coordinates for the EEG channels (including labels with entries in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; file), and&lt;br /&gt;
&lt;br /&gt;
:: C) there are no other auxiliary files with the same base name, the file will be opened and the data displayed. If files with the same basename are not found, BESA Research will look for files with the basename “default” (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;) in the data folder. If such files are not found, BESA Research will look for files with the basename “default” one folder above (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
: 3. If the data file has been written in binary format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.foc'''&amp;lt;/span&amp;gt;, &amp;lt;span &lt;br /&gt;
style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.fsg'''&amp;lt;/span&amp;gt;) by BESA Research (after Jan. 2000), the file will be read, and all information is assumed to be complete. The file is opened and the data are displayed.&lt;br /&gt;
&lt;br /&gt;
: 4. In all other cases, the ''Channel and digitized head surface point information dialog box'' will be opened for you to specify and check auxiliary files. Auxiliary files with the same base name as the data file will be specified in the text boxes for file names. If files with the same basename are not found, BESA Research will look for files with the basename “default” (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;) in the data directory. If such files are not found, BESA Research will look for files with the basename “default” one directory above (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;). Otherwise the text boxes will be left blank.&lt;br /&gt;
&lt;br /&gt;
: 5. Auxiliary files can be specified at a later time by selecting ''File/Head Surface Points'' and ''Sensors/Load'' ''Coordinate Files''. The ''Channel and digitized head surface point information dialog box'' will be opened.&lt;br /&gt;
&lt;br /&gt;
== Electrodes ==&lt;br /&gt;
&lt;br /&gt;
=== Electrode Conventions ===&lt;br /&gt;
&lt;br /&gt;
BESA Research adheres to the 10/20 and to the new 10/10 standard of the IEF (international EEG Federation). BESA Research will recognize the labels defined by these standards. The labels are stored in most EEG file headers. Otherwise, or in the case of erroneous labeling or sequencing of the recording channels, you may edit the channel labels and/or coordinates, or you may read an electrode file stored previously on disk. In addition to the 10/20 and 10/10 standard labels BESA Research recognizes the following labels: M1, M2 (left, right mastoids), SP1, SP2 (sphenoidal), CB1, CB2 (cerebellar), Chin, Neck, LO1, LO2 (lateral ocular), SO1, SO2 (supra-ocular), IO1, IO2 (infra-ocular). BESA Research will translate all the labels into spherical coordinates for spherical spline interpolation, mapping and source imaging. The following assignments are stored in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; in the BESA folder:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (19).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Electrode labels in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd '''&amp;lt;/span&amp;gt;and their spherical coordinates. 10-20 electrodes are shown in&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt; red and italic.''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The spherical coordinates are defined in degrees by the azimuth (from Cz, positive = right, negative = left hemisphere) and the latitude (counterclockwise from T7/T3 for left and from T8/T4 for right hemisphere) of each electrode. Please do not modify the existing labels or coordinates in this file, because this would adversely affect the interpolated (virtual) montages, the maps and the source montages and source images in BESA Research. However, you may add additional labels for scalp electrodes at the end of this file if needed (up to a total of 196). When you edit the electrode configuration or read in electrode files, BESA Research may replace the 10/20 standard labels T3, T4, T5, T6 by their new 10/10 equivalents T7, &lt;br /&gt;
&lt;br /&gt;
T8, P7, P8. However, in the initialization file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini '''&amp;lt;/span&amp;gt;you can reset to the old 10/20 standard by relabeling T7=T3, P7=T5, T8=T4, P8=T6 under the heading [Electrodes]. You may use the same feature to assign appropriate labels to the X1..X8 channels which exist in many systems, e.g. X1=EKG1 etc.&lt;br /&gt;
&lt;br /&gt;
=== Recommendations for electrode placement ===&lt;br /&gt;
&lt;br /&gt;
For source montages and source analysis two principles are important:&lt;br /&gt;
&lt;br /&gt;
# Covering of the lower head with inferior electrodes to record activity from the inferior surfaces of the brain, especially from the basal temporal lobe, from the temporal pole, from orbito-frontal cortex, and from basal occipital and cerebellar areas.&lt;br /&gt;
# Equal spacing of the electrodes over the whole head to cover all brain areas.&lt;br /&gt;
&lt;br /&gt;
In the following montage EEGxx, the number xx indicates the number of electrodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG25 - Minimum 10-20 configuration including inferior electrodes'''&lt;br /&gt;
&lt;br /&gt;
This covers the 19 standard 10-20 electrodes:&lt;br /&gt;
&lt;br /&gt;
Fp1, Fp2, F7, F3, Fz, F4, F8 ....&lt;br /&gt;
&lt;br /&gt;
plus 6 inferior electrodes on both sides:&lt;br /&gt;
&lt;br /&gt;
F11, A1, P11, F12, A2, P12&lt;br /&gt;
&lt;br /&gt;
with a recommended continuation of the 20% distances, i.e. use F11 instead of F9, P11 instead of P9, A1 instead of T9 to have a wider coverage of the inferior head. A1 / A2 may be replaced by T9 / T10 (or FT9 / FT10) for convenience and comfort.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (21).gif ]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 25 electrodes. Right: left temporal basal activity mapped with 25 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG33 - Additional 10-10 electrodes within the major squares'''&lt;br /&gt;
&lt;br /&gt;
To the above electrodes add the following 8 intermediate electrodes:&lt;br /&gt;
&lt;br /&gt;
FC5, FC1, FC2, FC6, &amp;amp;nbsp;&amp;amp;nbsp;CP5, CP1, CP2, CP6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (23).gif]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 33 electrodes. Right: left temporal basal activity mapped with 33 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG35 - Additional supraorbital electrodes for better EOG separation'''&lt;br /&gt;
&lt;br /&gt;
SO1, SO2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG37 - Wider inferior coverage at interlaced 20% distances'''&lt;br /&gt;
&lt;br /&gt;
Continue 20% down from F7, FC5, CP5, P7 etc. and use the following 8 inferior electrodes instead of 6:&lt;br /&gt;
&lt;br /&gt;
F11, FT9, TP9, P11, &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;F12, FT10, TP10, P12&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG41 – Improved frontal and occipital coverage'''&lt;br /&gt;
&lt;br /&gt;
Additional electrodes halfway between Fz and Fp1 / FP2 and Pz and O1 / O2:&lt;br /&gt;
&lt;br /&gt;
AF1, AF2, &amp;amp;nbsp;&amp;amp;nbsp;PO1, PO2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG43 – Inferior chain with 5 electrodes including A1 / A2'''&lt;br /&gt;
&lt;br /&gt;
F11, FT9, A1, TP9, P11, &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;F12, FT10, A2, TP10, P12&lt;br /&gt;
&lt;br /&gt;
EEG43 represents the widest coverage with relatively even spacing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (25).gif]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 43 electrodes. Right: left temporal polar activity mapped with 43 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG64-256'''&lt;br /&gt;
&lt;br /&gt;
With 64 or more channel caps, it is similarly recommended to use a sufficient number of inferior electrodes all around the head. At least 4 inferior temporal electrodes on each side and additional electrodes above or below the eyes (outside of the cap) are suggested.&lt;br /&gt;
&lt;br /&gt;
=== Editing the channel configuration ===&lt;br /&gt;
&lt;br /&gt;
Only use the channel configuration editing facility if the electrodes or the common reference have not been correctly defined by your digital EEG system, or if you want to define specific spherical coordinates for your scalp electrodes. It is your responsibility to check and provide the correct sequence of electrode labels in correspondence with the sequence of channels in the EEG data file. If these sequences do not match exactly, errors will occur in the computation of maps, source images and interpolated montages.&lt;br /&gt;
&lt;br /&gt;
We will use the example EEG file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg'''&amp;lt;/span&amp;gt; in the subdirectory ''Examples/EEG-Focus'' of the BESA Research directory to explain the editing of electrode labels and coordinates:&lt;br /&gt;
&lt;br /&gt;
1. Select ''File'', then click on ''Open'', or click on &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg '''&amp;lt;/span&amp;gt;if this file is contained in the list of currently selected EEG files.&lt;br /&gt;
&lt;br /&gt;
2. Select ''Edit'', then click ''Channel Configuration''. The dialog box shown below will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (27).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the upper left of the figure you see the dropdown menu after selecting the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File '''&amp;lt;/span&amp;gt;menu in the dialog box. This menu allows to edit a new ('''''New''''') or an existing ('''''Open''''') electrode file and to save the changes to the same ('''''Save''''') or a different ('''''Save As''''') file. Normally, it will not be necessary to use this menu. The control fields on the right will be sufficient. If you type ''''''Ok'''''', you will be given the option of saving the changes to a file.&lt;br /&gt;
&lt;br /&gt;
3. Click on &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Reload org. &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Labels'''&amp;lt;/span&amp;gt; to reread the original labels as stored in the file header of &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg'''&amp;lt;/span&amp;gt;. BESA Research quits editing and redisplays the EEG. Repeat step 2 and select &amp;quot;''Edit / Channel'' ''Configuration''&amp;quot; again. Note: The button &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Reload org. Labels'''&amp;lt;/span&amp;gt; is not available if there are no labels in the file header.&lt;br /&gt;
&lt;br /&gt;
4. Click on the empty space of the scroll bar below the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''scroll '''&amp;lt;/span&amp;gt;button and on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''down arrow'''&amp;lt;/span&amp;gt; of the '''scroll bar''' to display the remaining electrodes in the file.&lt;br /&gt;
&lt;br /&gt;
5. Click on electrode '''R''' (line 32), then on the button &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Delete Electrode'''&amp;lt;/span&amp;gt; to remove the associated channel, which does not contain any signal. Note that you may not omit intermediate channels, even if they do not exhibit signals, because the correct correspondence between the series of electrodes and the EEG channels will not be maintained. Use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;quot;Edit / Bad Channels&amp;quot;'''&amp;lt;/span&amp;gt; menu to disable artifactual or empty channels.&lt;br /&gt;
&lt;br /&gt;
6. Click on''' EOG''' (line 30) and change the entry to '''EOG1'''. Do not type &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;lt;Enter&amp;gt;,'''&amp;lt;/span&amp;gt; but click on the next or a different electrode box to accept the changes.&lt;br /&gt;
&lt;br /&gt;
7. '''Double click''' on '''EOG '''(line 31). This will highlight the entry. Simply type the new name '''EOG2''', and note that the old label is replaced when highlighted. Electrodes '''30 '''and '''31 '''are now defined as distinct electrodes. Next, we want to replace the label '''T10 '''by '''A2'''.&lt;br /&gt;
&lt;br /&gt;
8. Click on the label '''T10''' (line 24). Then click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''drop down'''&amp;lt;/span&amp;gt; arrow right of the highlighted label to obtain the list of default scalp electrodes (read from &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; and sorted alphabetically). Type '''A''' to jump to the electrodes beginning with letter A (see below). Type '''2''' or '''click''' on '''A2''' in the list. Click on the '''type '''box (Scalp channel) to close the list and display the new entry in line 24. Note that this is the most convenient way to edit an electrode label.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (28).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Exercise: repeat step 8 to replace '''T9''' by '''A1'''. Restore labels '''T10''' and '''T9''' in lines 24 and 21.&lt;br /&gt;
&lt;br /&gt;
10. Replace SO1 and SO2 (supra-orbital) by '''PSO1 '''and '''PSO2 '''and note that these electrodes are changed to the''' 'Polygraphy'''' type, because no coordinates are associated with these labels.&lt;br /&gt;
&lt;br /&gt;
11. After you click &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''OK''''&amp;lt;/span&amp;gt;, the box '''Write Channel Configuration File''' will appear and display a name for the current electrode file. By default, the BESA electrode file path and current file name will be used and supplemented by the extension &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''''.elb''''&amp;lt;/span&amp;gt;. The electrode file path may be set in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini'''&amp;lt;/span&amp;gt; file [Defaults] section under ElectrodeFilePath. If no electrode file path is specified in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini'''&amp;lt;/span&amp;gt; file, the default electrode file path ''Montages\Channels ''is used. Simply click '&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;' or type &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;lt;Enter&amp;gt; '''&amp;lt;/span&amp;gt;to save the changes to this file, or select a new file name and/or path, if you do not want to store the electrode file in the BESA Research electrode file directory.&lt;br /&gt;
&lt;br /&gt;
Note that by using the default 10/10 labels (see chapter &amp;quot;''Electrode conventions''&amp;quot;) you specify that the associated electrode is a scalp electrode. Hence, different labels must be used for polygraphic, intracranial or MEG channels. After you have entered a new non-scalp label, you may select the type of the electrode/channel amongst the different groups ('''Polygraphy, Intracranial, MEG Channel''') from the drop down list in the ''''''Type'''''' box. This will allow for using separate selection and scaling facilities of the channel group control push-buttons at the right of the screen ('''All, Scp, Pgr, Icr, MEG'''). If you have entered a new non-scalp label and select the type '''Scalp Channel''', or if you click on the ''''Advanced&amp;gt;&amp;gt;'''' field, boxes will appear to enter the spherical coordinates (azimuth and latitude) of this electrode (cf. Fig. 6.5). These features may be used to specify non-standard scalp electrodes. Please check the earlier sections of this chapter for electrode conventions. You may view the locations of the scalp electrodes on the head schemes in the mapping window. Select '''Show Electrodes in Maps''' in the &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''View / Options'''&amp;lt;/span&amp;gt;&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (29).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Hint:''' If you want to specify the spherical coordinates of an electrode which is close to a standard electrode, click on the ''''Advanced &amp;gt;&amp;gt;'''' field, enter the label of the standard electrode and append a single quotation mark. This will specify that the electrode is close to the labeled location but has different coordinates. The ''Scalp Channel'' type will not be replaced by '''Polygraphy.''' Then edit '''Azimuth''' and '''Latitude'''. This convention is used by BESA Research when reading electrode coordinate files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''(*.elp'''&amp;lt;/span&amp;gt;), e.g. from the BESA program. The coordinates are read and compared with the default coordinates to assign the closest label. Then a single quotation mark is appended to the label, and the coordinates are assigned as specified in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.elp'''&amp;lt;/span&amp;gt; file. For example, open &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''segm1.eeg'''&amp;lt;/span&amp;gt; in the ''Examples\EEG-Focus'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
Note that the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''segm1.elp '''&amp;lt;/span&amp;gt;is searched for automatically in the directory of the data file when opening the data file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Edit Common Scalp Reference'''&lt;br /&gt;
&lt;br /&gt;
There is a separate line at the bottom in the ''Channel Configuration dialog box'' to enter the label and coordinates of the '''Common Scalp Reference electrode'''. If this is specified and enabled (click on field '''Enabled'''), the information provided by the fact that all scalp electrodes were recorded against a common recording reference will be used for mapping, source imaging and virtual montages. This information will be lost if the common reference has not been specified or if a combination of electrodes has been used as reference during recording. Specify the '''Common Scalp Reference electrode''' only if all electrodes have been referenced to the same single electrode and if a standard 10/10 location has been used for the common recording reference.&lt;br /&gt;
&lt;br /&gt;
'''Note that BESA Research cannot process digital EEG data correctly if there is no common recording reference''', and if different recording references were used for the various scalp electrodes. For intracranial and polygraphic channels different references may be used. It is preferable to use the common reference also for electrode channels near the eyes, because these electrodes provide valuable information for mapping, source imaging and interpolated montages. The traditional bipolar channels (e.g. horizontal and vertical '''EOG''') may be '''reconstructed digitally''' using the ''Selected Channels'' group or user-defined montages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 3D Coordinates for Precise Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction - Working with Digitized 3D Coordinates ===&lt;br /&gt;
&lt;br /&gt;
Working with digitized electrode coordinates usually requires reading in additional (auxiliary) files. The procedure is described on the page [[Working With Additional Files]].&lt;br /&gt;
&lt;br /&gt;
=== Data reading rules for EEG ===&lt;br /&gt;
&lt;br /&gt;
This section explains which additional files are read, or which files have to be read in order to provide the necessary information for mapping and source montages.&lt;br /&gt;
&lt;br /&gt;
Assume file name is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.xxx'''&amp;lt;/span&amp;gt;. datafile is the base name, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.xxx'''&amp;lt;/span&amp;gt; is the extension. Replace the text ''datafile'' by the base name of your own file, and the extension&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;'' xxx''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; by the extension of your own file.&lt;br /&gt;
&lt;br /&gt;
'''Channel definitions for EEG:'''&lt;br /&gt;
&lt;br /&gt;
* '''Labels have 10-10 names''': default locations will be used.&lt;br /&gt;
* '''Labels do not have 10-10 names''': Channels are interpreted as '''polygraphic'''. Mapping is not possible without one or more of the following additional files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Define channel names and types.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elb'''&amp;lt;/span&amp;gt; exist (i.e. files with basename d''efault ''one folder above the data file): Channel names and types will be replaced by those defined in this file, in order of occurrence. The ''ela'' file contains just labels and, optionally, types. The ''elp'' file contains spherical coordinates and can contain labels and types. The ''elb'' file contains the same information in binary format. See chapter &amp;quot;''[[Working_With_Additional_Files#Channel_definition_file_conventions_and_formats|Working with additional files / Channel Definition File Conventions]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define order in which electrodes were digitized.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfn'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; one folder above the data file): electrode names are supplied in the order in which coordinates were supplied in the ''sfp'' file. These names must match with the names supplied in the data file or defined in the ''ela/elp/elb'' file. BESA Research uses this to sort coordinates into the order of channels in the file. If fiducials exist, they should be defined on the first three lines. If they do not exist, BESA Research will simulate them (so that it can define the head coordinate system). See chapter ''&amp;quot;[[Working_With_Additional_Files#sfn_.28surface_point_name.29_file|Working with additional files / sfn (surface point name) file]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define electrode coordinates.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfp'''&amp;lt;/span&amp;gt; exists (i.e. file default.sfp one folder above the data file): electrode coordinates will be replaced/defined by the coordinates defined in this file. If &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; does not exist, labels can also be defined in this file. If fiducials exist, they should be defined on the first three lines. If they do not exist, BESA Research will simulate them. See chapter &amp;quot;''[[Working_With_Additional_Files#sfp_.28surface_point_coordinate.29_file|Working with additional files / sfp (surface point coordinate) file]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define coregistration information.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;sfh'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfh'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfh'''&amp;lt;/span&amp;gt; exists (i.e. file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.sfh '''&amp;lt;/span&amp;gt;one folder above the data file): head center and relative position of the unit sphere with respect to the head coordinate system is determined by the coregistration between EEG and MRI. See online help chapter ''&amp;quot;[[Integration_with_MRI_and_fMRI|Integration with MRI and fMRI]]&amp;quot;''.&lt;br /&gt;
&lt;br /&gt;
'''Define head center.''' No coregistration file exists (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, see above). File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.cot'''&amp;lt;/span&amp;gt; exists (i.e. file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.cot&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;one folder above the data file): head center as computed by fitting a sphere to the surface points is replaced by the head center coordinates contained in this file. See chapter ''&amp;quot;[[Working_With_Additional_Files#cot_.28Head_center.29_file|Working with additional files / cot (Head center) file]]&amp;quot;''.&lt;br /&gt;
&lt;br /&gt;
=== Data reading rules for MEG ===&lt;br /&gt;
&lt;br /&gt;
Assume file name is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''''datafile.xxx''''&amp;lt;/span&amp;gt;. '''datafile''' is the base name. '''xxx''' is the extension. Replace the text '''datafile''' by the base name of your own file, and the extension '''xxx''' by the extension of your own file.&lt;br /&gt;
&lt;br /&gt;
Here we consider cases a) MEG alone, b) MEG+EEG.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Automatic procedure:'''&lt;br /&gt;
&lt;br /&gt;
Labels have names defined in the files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd'''&amp;lt;/span&amp;gt;. Channels are interpreted as MEG. However, sensor locations and head surface point locations must be defined in additional files as described below. Mapping and source analysis are not possible without one or more of the following additional files.&lt;br /&gt;
&lt;br /&gt;
'''Define channel names and types.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elb'''&amp;lt;/span&amp;gt; exist (i.e. files with basename'' default'' one folder above the data file): Channel names and types will be replaced by those defined in this file, in order of occurrence. The'' ela''&amp;amp;nbsp;file contains just labels and (optionally) channel types. The ''elp'' file contains spherical coordinates and can contain labels and types. The'' elb'' file contains the equivalent information in binary format. See chapter “''Electrode file conventions'' ''and formats.”''&lt;br /&gt;
&lt;br /&gt;
'''MEG+EEG.''' Define order in which electrodes were digitized. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfn'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; one folder above the data file): electrode names are supplied in the order in which coordinates were supplied in the ''sfp'' file (or in the location descriptor in the data file: e.g. Neuromag). These names must match with the names supplied in the data file or defined in the ''ela/elp/elb'' file. BESA Research uses this to sort coordinates into the order of channels in the file. See chapter “''Working with additional files/ sfn (surface point name) file”.''&lt;br /&gt;
&lt;br /&gt;
'''MEG+EEG.''' Define head surface point/electrode coordinates. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfp'''&amp;lt;/span&amp;gt;'' ''exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfp'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; one folder above the data file): electrode coordinates will be replaced/defined by the coordinates defined in this file. If &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; does not exist, labels can also be defined in this file. See chapter “''Working with additional files/ sfp (surface point'' ''coordinate) file''”. The labels of electrode coordinates '''must '''match to those defined for the data channels. BESA Research will use the labels to associate coordinates with the correct channel.&lt;br /&gt;
&lt;br /&gt;
'''Define sensor coordinates'''. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.pos'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.pmg'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.pos(.pmg)'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.pos(.pmg)'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.pos(.pmg)'''&amp;lt;/span&amp;gt; one folder above the data file): coordinates are defined in this file. The convention is that'' pos'' files contain gradiometer coordinates and'' pmg'' files contain magnetometer coordinates. This is not necessary for the program to read in values properly: the program makes its decision about the sensor type on the basis of the number of coordinate values on one line in the file (6 = magnetometers, 9 = gradiometers). See chapter “''Working with additional files/ pos or pmg (MEG sensor coordinate) file”.''&lt;br /&gt;
&lt;br /&gt;
'''Define coregistration information.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfh'''&amp;lt;/span&amp;gt; exists, or file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.sfh&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfh'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfh'''&amp;lt;/span&amp;gt; one folder above the data file): head center and relative position of the unit sphere with respect to the head coordinate system is determined by the coregistration of the head coordinates with MRI. See (online) help chapter ''&amp;quot;Integration with MRI and fMRI&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
'''Define head center.''' No coregistration file exists (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, see above). File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.cot'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;one folder above the data file): head center as computed by fitting a sphere to the surface points is replaced by the head center coordinates contained in this file. See chapter ''&amp;quot;Working with additional files / cot (Head center) file&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reading MEG files in ASCII format ===&lt;br /&gt;
&lt;br /&gt;
'''BESA Research uses labeling or channel type definitions to decide whether channels are EEG or MEG. '''Based on the labels defined for the channels, or the type specified by the channel definition file, the program will try to find auxiliary files that define electrode coordinates or MEG sensors.&lt;br /&gt;
&lt;br /&gt;
BESA Research uses four files to make its decision:&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.ela/.elp'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;The channel type defined here overrides definitions in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ecd&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; (below).&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines electrode labels and default spherical coordinates based on the 10-20 and 10-10 naming system&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines labels and default spherical coordinates for the BTi whole-head system&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines labels and default spherical coordinates for the Neuromag whole-head system&lt;br /&gt;
&lt;br /&gt;
If the program finds a label in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;, the channel will automatically be defined as EEG. If not, if it finds a label in one of the other files, the channel will be defined as MEG. If it doesn't find the label anywhere, the channel will be defined as Polygraphic.&lt;br /&gt;
&lt;br /&gt;
The spherical coordinates defined in these files are sufficient for mapping the data. Auxiliary files defining the real sensor coordinates are required for source analysis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Defining default label and coordinate file for a new MEG system'''&lt;br /&gt;
&lt;br /&gt;
When preparing an MEG from a system other than BTi-WHS or Neuromag for import to BESA Research, you should edit either &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd '''&amp;lt;/span&amp;gt;to conform with your system. If sensor files (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos/*.pmg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) are always available for your files, the coordinates in the ''ecd ''files are irrelevant: all you need do is define the labels for your own MEG system or use the labels as already defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Files to prepare for reading in each data file'''&lt;br /&gt;
&lt;br /&gt;
Each auxiliary file should have the same base name as your data file.&lt;br /&gt;
&lt;br /&gt;
'''Define channel labels.''' There are several possibilities:&lt;br /&gt;
* Generate your data file according to the BESA'' avr'' ''format or the ASCII multiplexed format.'' Labels are listed in the second line of the file.&lt;br /&gt;
* Generate a ''label file'' (extension &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.ela'''&amp;lt;/span&amp;gt;) with one MEG channel label per line (matching with your ''ecd ''file as defined above) or with the type &amp;quot;MEG&amp;quot; and a label for each line.&lt;br /&gt;
&lt;br /&gt;
Label definitions are also possible using ''elp'' or ''elb'' files, but the above two solutions are recommended because they are the simplest.&lt;br /&gt;
&lt;br /&gt;
'''Define sensor coordinates.''' Generate a ''pos'' or ''pmg'' file. Make sure that the number of sensors matches with the number of MEG channel definitions in your data file.&lt;br /&gt;
&lt;br /&gt;
'''Define fiducials and other head surface points.''' Generate an ''sfp'' file. The first three lines define the fiducials. Subsequent lines define additional surface points.&lt;br /&gt;
&lt;br /&gt;
'''Define coordinates of the center of the head.''' Generate a ''cot'' file. If this file is absent, BESA Research generates the coordinates by fitting a sphere to the head surface points.&lt;br /&gt;
&lt;br /&gt;
Note that all coordinates should be within the same frame of reference, i.e. the same coordinate system. Units must be in meters, centimeters, or millimeters.&lt;br /&gt;
&lt;br /&gt;
==  Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Defining Channel Labels ===&lt;br /&gt;
&lt;br /&gt;
The files described in these examples can be found in the ''.\Examples\Xtras\EEG+Channel Labels'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
The simplest way to define electrode coordinates is to use BESA Research’s default settings (defined in the file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;). In this case, you only need to provide a list of channel labels. If a channel label is defined in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; (i.e. if the labels belong to the 10-20 or 10-10 system), BESA Research will recognize the channel as EEG, and will allocate 3D coordinates.&lt;br /&gt;
&lt;br /&gt;
Labels are not always supplied correctly in the data file. You can override the internal labels in several ways:&lt;br /&gt;
* Read the data file, and then use &amp;quot;''Edit / Channel Configuration''&amp;quot; to redefine the channels. The configuration is stored in a file with the name &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''basename.elb'''&amp;lt;/span&amp;gt; (for binary data) or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''basename.elp'''&amp;lt;/span&amp;gt; (for ASCII data), where basename is the base name (name without the extension) of your data file.&lt;br /&gt;
* Prepare a label file (with the extension ''ela'') containing a list of labels. This can also specify channel types (e.g. EEG, Polygraphic, Intracranial, MEG).&lt;br /&gt;
* Prepare a file (with the extension ''elp'') containing spherical coordinates of the channels. This is the method used with the previous version of BESA Research. If the file doesn’t contain labels, labels are allocated based on their proximity to the 10-20 or 10-10 definitions in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following examples illustrate the above three methods. The input files are all in ''BESA avr format, ''although these examples apply to all EEG data formats in which only EEG channels exist.&lt;br /&gt;
&lt;br /&gt;
If the data file contains polygraphic or other types of non-EEG channel, the types need to be defined. See the ''EEG+Polygraphic channels example.'' MEG is a special case, because the sensor coordinates need to be defined. See the ''MEG ASCII and the MEG+EEG'' ''examples''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. EEG file containing wrong labels – use ''Edit/Channel Configuration ''to redefine labels'''&lt;br /&gt;
* The'' avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.avr'''&amp;lt;/span&amp;gt;, contains the EEG labels. Channels 4 and 14 have been mislabeled – the labels need to be swapped.&lt;br /&gt;
* Open the file with '''''File/Open''''' (Select file type ''BESA avr''. Find the correct directory ''Xtras\EEG+Channel Labels'').&lt;br /&gt;
* The file should open correctly, displaying 32 channels of EEG.&lt;br /&gt;
* The channel coordinates can be viewed by typing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’ '''&amp;lt;/span&amp;gt;key (make sure the cursor is off). There will be a 3D display of the electrodes. Clicking on an electrode will display the label and the coordinates.&lt;br /&gt;
* In this file, channels 4 and 14 have been mislabeled as P3 and F3. In fact, the labels should be the other way around. We will now correct this:&lt;br /&gt;
* Select '''''Edit / Channel Configuration'''''.&lt;br /&gt;
* Type ‘F3’ into the label for channel 4, and ‘P3’ into the label for channel 14. Then type ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;’. The new channel configuration will be saved in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.elp'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* In the data display, the labels of channels 4 and 14 will now be displayed correctly.&lt;br /&gt;
* Close the file ('''''File/Close''''') and open it again. Note that the labels are still correct. This is because the new channel configuration file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.elp'''&amp;lt;/span&amp;gt;, is read automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. EEG file with no labels – channel labels in auxiliary file'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithoutLabels.avr'''&amp;lt;/span&amp;gt;, has no labels.&lt;br /&gt;
* EEG labels are defined in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithoutLabels.ela'''&amp;lt;/span&amp;gt;. This is read automatically when the file is opened.&lt;br /&gt;
* In this example, labels are correct. Each label in the ''ela'' file is on one line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp1''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp2''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F7''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F3''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''...''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3. EEG file with no labels – channel labels derived from spherical coordinates'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithSphericalCoords.avr'''&amp;lt;/span&amp;gt;, has no labels.&lt;br /&gt;
* Spherical coordinates are defined in the ''elp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithSphericalCoords.elp'''&amp;lt;/span&amp;gt;. This contains spherical coordinates (theta and phi) and no labels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-93 -72''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''92 74''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-97 -40''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-61 -49''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-46 -88''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''62 51''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* When the data file is opened, the ''elp'' file is read automatically, and BESA Research uses the tables in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; to assign channel labels. To indicate that it has assigned user defined coordinates and matched with the closest standard electrode, BESA appends an apostrophe (‘) to each label:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp1’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp2’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F7’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F3’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We advise to assign specific labels as well as spherical coordinates if you want to use your own spherical coordinate system, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''FP1u -90 -72''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 4. EEG file with no labels – channel labels not in basename.el?'''&lt;br /&gt;
* The ''avr ''file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGnoLabelsNoElaFile.avr'''&amp;lt;/span&amp;gt;, has no corresponding ''ela, elp'', or ''elb'' file, i.e. no file with the same base name and the ''el?'' extension.&lt;br /&gt;
* When you open the file, BESA Research will ask for a channel configuration file. The ''File Open'' ''dialog ''will select the ''directory .\Montages\Channels''. The idea is that standard (= frequently used) electrode configurations should be kept in this directory.&lt;br /&gt;
* Select the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''XtrasExample.ela'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* Close the data file and reopen it. The file will open with the correct labels. In the BESA window title you will see that the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGnoLabelsNoElaFile.elp'''&amp;lt;/span&amp;gt; has been read automatically. This file was created when &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''XtrasExample.ela'''&amp;lt;/span&amp;gt; was read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mixed EEG and Polygraphic Data === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ EEG+Polygraphic'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
The data are in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEG+Polygraphic.avr'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The third channel is defined as polygraphic in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEG+Polygraphic.ela '''&amp;lt;/span&amp;gt;file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Fp1 &lt;br /&gt;
 Fp2 &lt;br /&gt;
POLY Test&lt;br /&gt;
 F3 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The prefix &amp;quot;''POLY''&amp;quot; specifies that the channel is polygraphic. Most other channels are interpreted as EEG because the labels are known in the 10-20 system.&lt;br /&gt;
&lt;br /&gt;
Similarly, channel 31 is defined as intercranial, using the prefix &amp;quot;''ICR''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that you can also define channels as EEG by specifying the ''&amp;quot;EEG&amp;quot; ''prefix (e.g. ''&amp;quot;EEG E1&amp;quot;. ''This is useful if there are many more channels than are defined in the 10-10 or 10-20 systems, and if the channel coordinates are defined.&lt;br /&gt;
&lt;br /&gt;
=== EEG with Digitized Coordinates === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the .''\Examples\Xtras\ EEG+Digitization Points ''subdirectory.&lt;br /&gt;
&lt;br /&gt;
In the previous examples, we have illustrated how to assign labels to channels using channel definition files. In those examples, only spherical coordinates were defined. Here we will show how to read digitized surface points into BESA Research, using the surface point (''sfp'') coordinate file and the surface point name (''sfn'') file.&lt;br /&gt;
&lt;br /&gt;
The principles of defining digitization coordinate files are:&lt;br /&gt;
* The labels in the ''sfp/sfn'' file combination are used to assign coordinates to electrodes. Thus, if a coordinate has the name ‘''Fz''’ it will be assigned to the channel with the label ‘''Fz''’.&lt;br /&gt;
* In consequence, digitization of surface points can be in a different order to the sequence of channels in the data file. Matching to channels is done by comparing the labels.&lt;br /&gt;
* We recommend that the fiducial points, '''nasion, left preauricular point, right preauricular point''' be digitized. If you do not digitize them, BESA Research will simulate these locations (see ''“Example: Digitization points with and without Fiducials”''). Fiducial points, labeled '''FidNz, FidT9, FidT10''' should be the first three coordinates in the ''sfp'' file.&lt;br /&gt;
* As with the channel definition files, it is easiest for BESA Research if you name the ''sfp/sfn'' files using the base name of the data file, e.g. if the data file is named &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.avr'''&amp;lt;/span&amp;gt;, name the'' sfp'' file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.sfp'''&amp;lt;/span&amp;gt; and the ''sfn'' file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.sfn'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* You specify the files to be read in the ''Channel and digitized head surface point information dialog box.''&lt;br /&gt;
&lt;br /&gt;
See ''“Example: Polhemus Digitizer Data” ''for a discussion of how to format the files originating from Polhemus and other digitizers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. EEG file containing labels, ''sfp'' file containing coordinates, ''sfn ''file containing coordinate names'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;, contains the channel labels. Therefore, we don’t need a channel definition file.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;, contains digitized coordinates of electrodes and of additional surface points. The labels in the file do not correspond to the electrode labels in the ''avr ''file.&lt;br /&gt;
* The ''sfn'' file contains the corrected labels (1 line for each corresponding line in the'' sfp'' file). Now it is possible to match up electrode labels with the labels in the ''avr ''file.&lt;br /&gt;
* Open the data file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;. The ''Channel and digitized head surface point information dialog box'' will open automatically.&lt;br /&gt;
* Note the green tick mark at the top right of the dialog box. This is feedback to say that coordinates of all 32 electrodes have been found.&lt;br /&gt;
* Look at the entry ‘''Digitized head surface points’''. Here you will see that the ''sfp'' and the ''sfn ''files have been read automatically (because of the common base name). There are 51 locations. Note that the digitizer file can contain many more locations than the electrodes. BESA Research uses the locations for fitting the sphere of the spherical head model in source analysis. BESA Research can export these locations for coregistration with the MRI.&lt;br /&gt;
* Define the electrode thickness as 6 mm (at the right of the ‘''Digitized head surface points’'' box. This is the distance of the digitized point on the electrode to the surface of the head.&lt;br /&gt;
* Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; in the dialog box and view the coordinates by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt; key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. EEG file without labels, channel labels in ''ela'' file, surface point coordinates and names in ''sfp'' file'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.avr'''&amp;lt;/span&amp;gt;, has no channel label. Therefore, a label file is required. Here, the label file is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.ela'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.sfp'''&amp;lt;/span&amp;gt;, contains digitized coordinates of electrodes and of additional surface points. The labels are defined correctly in the ''sfp ''file, i.e. for every EEG channel label there is a corresponding coordinate. Therefore, no ''sfn'' file is required.&lt;br /&gt;
* When you open the file, don’t forget to define the electrode thickness as 6 mm in the ''Channel and digitized head surface point information dialog box.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Polhemus Digitizer Data === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ EEG+Digitization Points'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
Data from the Polhemus (other digitizers too) may often not fit the format BESA Research requires for the surface point file. Note that Polhemus data can be exported directly into BESA-compatible ''sfp''-files using the LOCATOR software.&lt;br /&gt;
&lt;br /&gt;
BESA Research requires either&lt;br /&gt;
* just the cartesian coordinates (x, y, z) values -- one set of coordinates per line. In this case, labels must be defined in a parallel surface point name file, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0.5 &amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:0cm;margin-right:0cm;&amp;quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the cartesian coordinates plus a label. The label can be in front of or behind the coordinates on the line, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0.5&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68 &amp;amp;nbsp;Fz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:2.54cm;margin-right:0cm;&amp;quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz &amp;amp;nbsp;0.5 &amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68'' &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of a few lines of a (''sfp'') file that are not read correctly by BESA Research:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''Nz&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;87.721&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''T9 &amp;amp;nbsp;-79.131&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''T10&amp;amp;nbsp;&amp;amp;nbsp;67.253&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''1 &amp;amp;nbsp;-34.192 &amp;amp;nbsp;103.374&amp;amp;nbsp;&amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''2&amp;amp;nbsp;&amp;amp;nbsp;23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048 &amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''3&amp;amp;nbsp;&amp;amp;nbsp;-81.179&amp;amp;nbsp;&amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''4 &amp;amp;nbsp;-60.701&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What is wrong?&lt;br /&gt;
&lt;br /&gt;
* First, some of the points are just numbered. These numbers don't tell BESA Research which electrode channel to which the coordinates should be assigned – assignments should be via channel labels and not numbers.&lt;br /&gt;
* Second, Nz, T9, T10 define the fiducials. Instead, the labels FidNz, FidT9, FidT10 are required (prefix &amp;quot;Fid&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What should be done? Probably the best way is&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;a) keep only the coordinates in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp &amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0&amp;amp;nbsp;&amp;amp;nbsp;87.721 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-79.131 &amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''67.253 &amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-34.192&amp;amp;nbsp;&amp;amp;nbsp;103.374 &amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048&amp;amp;nbsp;&amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-81.179 &amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-60.701&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b) prepare a surface point name file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfn&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) containing the corresponding labels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidNz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT9''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT10''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp1''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp2''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F7''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F3''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keeping labels and coordinates separate means that the label file needs generating only once. The coordinate file is different for each subject.&lt;br /&gt;
&lt;br /&gt;
Alternatively, if your digitizer program attaches the labels correctly to the coordinates, then you can prepare the ''sfp'' file like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidNz&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;87.721 &amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''FidT9&amp;amp;nbsp;&amp;amp;nbsp;-79.131&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT10&amp;amp;nbsp;&amp;amp;nbsp;67.253&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp1&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-34.192&amp;amp;nbsp;&amp;amp;nbsp;103.374 &amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp2 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048&amp;amp;nbsp;&amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F7&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-81.179 &amp;amp;nbsp;&amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F3&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-60.701&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Digitization points with and without Fiducials === &lt;br /&gt;
&lt;br /&gt;
We recommend that if electrodes are digitized, you should also digitize the three fiduciary points:''' Nasion''', '''and left and right preauricular points'''. We refer to these points as &amp;quot;fiducials&amp;quot;. We name them '''&amp;quot;FidNz&amp;quot;,''' '''&amp;quot;FidT9&amp;quot;,''' and '''&amp;quot;FidT10&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
If you do not digitize these points, BESA Research will simulate them, i.e. it will generate the points where it expects them to be, based on the fit of a sphere to the existing points, and on the names of surface points of known locations. &amp;quot;Known locations&amp;quot; means: the surface point name must be a 10-20 or 10-10 electrode name (e.g. &amp;quot;Cz&amp;quot; -- arbitrary labels, such as &amp;quot;E10&amp;quot; is not a known location). Therefore, BESA Research requires that at least 3 surface points with known labels are defined.&lt;br /&gt;
&lt;br /&gt;
In a file containing digitization points (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), the fiducials should be the first three sets of coordinates, i.e. the first three lines of the file. The remaining coordinates in the file can be electrode (or other surface point) coordinates, in any order. The assignment of electrode coordinates to data channels is achieved by matching the coordinate labels to data channel labels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Consequences of omitting fiducials'''&lt;br /&gt;
&lt;br /&gt;
When these files have been read into BESA Research, look at the head surface points in 3D using ''File/Head Surface Points'' ''and Sensors/View'' (or use the shortcut &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt;). You will see small differences in fiducial locations between the real and the simulated locations. You can expect very slight influences on the results of source modeling (the spherical head may be rotated slightly, although the head center and radius will be identical), and output of source locations in head coordinates will be different, because these coordinates are based on fiducial locations (see chapter ''“Working with Electrodes and Surface'' ''Locations/ Coordinate systems''”).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ASCII Import === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ASCII Import'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
When should the Import ASCII function be used? If you have data in BESA Research average referenced or multiplexed format, use the Open File function to read in a file directly. If you have data in a different ASCII format, BESA Research offers a flexible import function to import data from an array of numbers in an ASCII file.&lt;br /&gt;
&lt;br /&gt;
The array can be '''vectorized '''(one channel, all time points, per line) or '''multiplexed''' (one time point, all channels, per line). These alternatives are illustrated in the two example files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.asc'''&amp;lt;/span&amp;gt; and &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''multiplexed.asc'''&amp;lt;/span&amp;gt;, and in the tables below:&lt;br /&gt;
&lt;br /&gt;
'''Vectorized array:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|| channel 1, time 1&lt;br /&gt;
|| channel 1, time 2&lt;br /&gt;
|| channel 1, time 3&lt;br /&gt;
|| channel 1, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 2, time 1&lt;br /&gt;
|| channel 2, time 2&lt;br /&gt;
|| channel 2, time 3&lt;br /&gt;
|| channel 2, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 3, time 1&lt;br /&gt;
|| channel 3, time 2&lt;br /&gt;
|| channel 3, time 3&lt;br /&gt;
|| channel 3, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 4, time 1&lt;br /&gt;
|| channel 4, time 2&lt;br /&gt;
|| channel 4, time 3&lt;br /&gt;
|| channel 4, time 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiplexed array:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 1 &lt;br /&gt;
|| channel 2, time 1&lt;br /&gt;
|| channel 3, time 1&lt;br /&gt;
|| channel 4, time 1&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 2&lt;br /&gt;
|| channel 2, time 2&lt;br /&gt;
|| channel 3, time 2&lt;br /&gt;
|| channel 4, time 2&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 3&lt;br /&gt;
|| channel 2, time 3&lt;br /&gt;
|| channel 3, time 3&lt;br /&gt;
|| channel 4, time 3&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 4&lt;br /&gt;
|| channel 2, time 4&lt;br /&gt;
|| channel 3, time 4&lt;br /&gt;
|| channel 4, time 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA Research needs channel labels. If the labels are in the 10-20 or 10-10 system, BESA Research will assign the channels default coordinates. This is the minimum requirement to be able to map EEG.&lt;br /&gt;
&lt;br /&gt;
If you have 3D digitized coordinates, these can also be specified in ASCII files. This is described under the chapter “[[Electrodes_and_Surface_Locations#Example:_EEG_with_Digitized_Coordinates | Example: EEG with Digitized Coordinates]]”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. Vectorized data'''&lt;br /&gt;
&lt;br /&gt;
* The file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.asc'''&amp;lt;/span&amp;gt; contains the data. The file should be imported via ''File/Import ASCII File''.&lt;br /&gt;
* First you will be asked for a name for the binary target file. The name &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.fsg'''&amp;lt;/span&amp;gt; is suggested. You may accept this name by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; or choose an alternative name. Note that if the file already exists, the imported data will be appended to the file.&lt;br /&gt;
* Next, the ''ASCII File Properties dialog box'' will open. First select ''‘Vectorized’'', and make sure the subsequent entries are correct:&lt;br /&gt;
&lt;br /&gt;
:: Header Lines = 0 (i.e. in this example the numbers start on the first line)&lt;br /&gt;
:: Bins/Microvolt = 1.0 (i.e. a value 1 in the data represents 1 µV)&lt;br /&gt;
:: Sampling Rate = 320 Hz (When the dialog box is opened, BESA Research always chooses the setting it used previously)&lt;br /&gt;
:: Number of channels = 32 (the number of rows in the matrix)&lt;br /&gt;
:: Number of Samples = 640 (the number of columns in the matrix)&lt;br /&gt;
:: Prestimulus Time = 1000 ms (defines the zero time point 1 s after the beginning)&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to accept the settings.&lt;br /&gt;
* Next, the ''Channel and digitized head surface point information dialog box'' will open. In the ''‘Channel configuration’'' box, the label file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.ela'''&amp;lt;/span&amp;gt;, will be detected automatically. Automatic detection occurs when the label file has the same base name as the data file (in this case, vectorized). To the right of the file name is a summary of channel types: 32 channels found, 30 are EEG, 1 is intercranial, 1 is polygraphic.&lt;br /&gt;
&lt;br /&gt;
Note the green tick at the top left of the dialog box. This indicates that BESA Research thinks that it has sufficient information to read the file, and map and do source analysis on the data.&lt;br /&gt;
&lt;br /&gt;
* To see how channel types are specified in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.ela'''&amp;lt;/span&amp;gt;, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit '''&amp;lt;/span&amp;gt;button to view the file with the Notepad program. Here you will see that most channels have 10-20 electrode names. Channel 3 has the prefix ‘''POLY''’, specifying that this channel is polygraphic. Channel 31 has the prefix ‘''ICR''’, specifying that this channel is intercranial. Close Notepad, and click ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;’ in the dialog box.&lt;br /&gt;
* A final dialog box asks for a Segment Comment. This is a label that will be displayed in the resulting file. The label is particularly useful if you import several ASCII files into one target file. Each segment is then easily identified by its own label.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. Multiplexed data'''&lt;br /&gt;
&lt;br /&gt;
* This example is similar to Example 1. In this case, import the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''multiplexed.asc'''&amp;lt;/span&amp;gt;, and select ‘Multiplexed’ in the ''ASCII File Properties dialog box''. Other settings in the dialog box stay as they were.&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
# The numbers in the source files can be split into several lines per channel or per time point. Then you will have to enter the correct number of time points and channels in the dialog box. In the present examples, the lines are not split (the vectorized file has all 640 time points in each line, and the multiplexed file has all 32 channels in each line). In this case, BESA Research selects the correct numbers of time points and channels automatically.&lt;br /&gt;
# If you have digitized coordinates, these can be specified in the Channel and digitized head surface point information dialog box. Since the procedure is the same as when reading data, this is described elsewhere under “''Example: EEG with Digitized Coordinates''”.&lt;br /&gt;
&lt;br /&gt;
=== MEG ASCII === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the'' \Examples\Xtras\ MEG ASCII'' subdirectory of the BESA Research installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiplexed MEG ASCII file with labels in the header (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;''med.mul''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;)'''&lt;br /&gt;
&lt;br /&gt;
For reading MEG data, BESA Research expects&lt;br /&gt;
* Correct channel definitions, i.e. channels should be defined as MEG.&lt;br /&gt;
* Head surface points.&lt;br /&gt;
* Sensor coordinates, in '''the same coordinate system''' as the head surface points.&lt;br /&gt;
* Optionally, you can define the coordinates of the center of the head. This will be important if too few head surface points are available to specify where to place the spherical head used by BESA Research for source modeling, or if you want to use some external definition, e.g. from the MRI.&lt;br /&gt;
&lt;br /&gt;
As with digitized EEG coordinates, we use the ''Channel and digitized head surface point information'' ''dialog box'' to specify the files which need to be read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. File Open'''&lt;br /&gt;
* The file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.mul'''&amp;lt;/span&amp;gt;, contains MEG data in the ASCII multiplexed format. This format contains channel labels. The labels used are recognized by BESA Research as originating from the Neuromag system. They are therefore identified as MEG and do not need further identification.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.sfp'''&amp;lt;/span&amp;gt;, defines fiducials and head surface points. Coordinate labels are included in the file, so no'' sfn'' file is required.&lt;br /&gt;
* The cot file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.cot'''&amp;lt;/span&amp;gt;, defines the coordinates of the head center. If this were missing, BESA Research would compute the head center based on the sphere that best fits the head surface points.&lt;br /&gt;
* The ''pos'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.pos'''&amp;lt;/span&amp;gt;, defines the coordinates of the 122 sensors. For the Neuromag system there are 9 values per line, defining primary coil location, secondary coil location, and orientation cosines. The sequence of coordinates in the ''pos'' file '''must''' match the sequence of MEG channels! The file format and locations of the primary and secondary coils allow BESA Research to identify the sensor type as planar gradiometers. If the file had only six values per line, BESA Research would classify the sensors as magnetometers (one primary coil and the orientation cosines).&lt;br /&gt;
* Open the file, selecting current file type as ''‘*,m''??’. The ''Channel and digitized head surface point'' ''information dialog box'' will open, displaying the different auxiliary file names. The green tick indicates that BESA Research finds everything to be OK.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; button and then the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''' ‘V’ '''&amp;lt;/span&amp;gt;key to view the coordinates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. File Import'''&lt;br /&gt;
* The file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCIIimport.asc'''&amp;lt;/span&amp;gt;, contains MEG data in a multiplexed array, without a header. This needs to be imported using ''File/Import ASCII'' (see ''“Example: ASCII Import”).''&lt;br /&gt;
* On import you have to specify the file as ‘Multiplexed’, the number of time points (285), the number of channels (132), the bins/µV (or bins/fT) (=1), the time at which the stimulus occurred (50 ms), and the sampling rate (949.667 Hz).&lt;br /&gt;
* This format contains no channel labels. The labels in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''ME&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;GASCIIimport.ela'''&amp;lt;/span&amp;gt; are recognized by BESA Research as originating from the Neuromag system. They are therefore identified as MEG and do not need further identification.&lt;br /&gt;
* Since it recognizes the channels as MEG, the ''Channel and digitized head surface point information dialog box'' will open, displaying the different auxiliary file names as before. Since all necessary files with the same base name as the data file are supplied, they are read automatically.&lt;br /&gt;
* Press the ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK’'''&amp;lt;/span&amp;gt; button, enter a segment name, and then the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt; key to view the coordinates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3. File Open -- MEG information recorded elsewhere'''&lt;br /&gt;
&lt;br /&gt;
This example illustrates the case where the auxiliary files have a different base name from the data file: you must select the file name in the ''Channel and digitized head surface point information dialog box''.&lt;br /&gt;
&lt;br /&gt;
* Open the file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCIIelsewhere.mul'''&amp;lt;/span&amp;gt;. It is read as an MEG magnetometer file.&lt;br /&gt;
* In the ''Channel and digitized head surface point information dialog box'', specify&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.sfp'''&amp;lt;/span&amp;gt; for the head surface points, and&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.pos'''&amp;lt;/span&amp;gt; for the MEG sensors&amp;lt;/div&amp;gt;&lt;br /&gt;
* MEG coordinates will be correct. The sensor definition file specifies the sensors as planar gradiometers.&lt;br /&gt;
* Where the auxiliary files came from will be recorded in the database. If you open the file again, the auxiliary files will be found automatically, without asking any questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reading combined EEG and MEG from an ASCII file === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''Examples\Xtras\MEG+EEG'' subdirectory of the BESA Research installation folder.&lt;br /&gt;
&lt;br /&gt;
Here are two examples containing mixed MEG, EEG, and polygraphic channels:&lt;br /&gt;
* Open a file using the ''File/Open'' command&lt;br /&gt;
* Import a file using ''File/Import ASCII'' command&lt;br /&gt;
&lt;br /&gt;
In both cases&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file defines the channel labels. Based on the labels, BESA Research knows which channels are EEG and MEG. The remainder are classified as polygraphic channels.&lt;br /&gt;
* The &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file defines the MEG sensor coordinates. The number of values on a line of this file (=9) defines the MEG as gradiometers. The relative locations of primary and secondary coils identify the gradiometers as planar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Example with ''File/Open'''''&lt;br /&gt;
* Open the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.mul'''&amp;lt;/span&amp;gt;. The ''Channel and digitized head surface point information dialog box'' will open automatically (unless the file has already been read once and the information is in the database).&lt;br /&gt;
* You will see under ''‘internal data file information’'' that BESA Research finds 122 MEG sensors, and 162 channels in all.&lt;br /&gt;
* Under ‘''Channel configuration’'', you will see that as a result of reading the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.ela'''&amp;lt;/span&amp;gt;, 32 channels are defined as EEG, and 8 channels as polygraphic.&lt;br /&gt;
* Under ‘''Digitized head surface points’'' is the feedback that out of the 51 locations in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.sfp'''&amp;lt;/span&amp;gt;, all electrode locations have been defined.&lt;br /&gt;
* Under ‘''MEG sensors’'', the sensors have been identified as gradiometers.&lt;br /&gt;
* The green tick at the top right of the window indicates that BESA Research classifies everything as OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Example with ''File/Import ASCII'''''&lt;br /&gt;
* Import the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEGimport.asc'''&amp;lt;/span&amp;gt;. Select &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEGimport.fsg '''&amp;lt;/span&amp;gt;as the target file (see ''“Example: ASCII Import”'').&lt;br /&gt;
* Select 320 Hz sampling rate, and 500 ms pre-stimulus time. Other selections in the dialog box should be ‘Multiplexed’, 1 bin/microvolt (this is interpreted as 1 bin/fT for MEG), 162 channels and 320 samples.&lt;br /&gt;
* The ''Channel and digitized head surface point information dialog box'' will open as above.&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Electrodes_and_Surface_Locations</id>
		<title>Electrodes and Surface Locations</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Electrodes_and_Surface_Locations"/>
				<updated>2021-05-05T09:43:34Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Recommendations for electrode placement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 6.1 or higher&lt;br /&gt;
}}&lt;br /&gt;
= Working with Electrodes and Surface Locations =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Here you will find out how BESA Research works with electrode and MEG sensor coordinates and labels, and how head surface points can be used to improve source modeling and coregistration of source models with the MRI. In most cases, electrode positions are sufficiently defined by their labels. The section &amp;quot;''Electrode Conventions''&amp;quot; lists the standard position which BESA Research assigns to EEG channels. In some cases, especially for larger electrode arrays or for MEG measurements, additional information is required to add sufficient information for mapping and for source analysis. The additional information is supplied in additional, auxiliary files which are read by BESA Research and associated with the data files. The auxiliary files, and how they are supplied to BESA Research, are described in this chapter.&lt;br /&gt;
&lt;br /&gt;
Examples for using auxiliary files to define the 3D locations of electrodes are found in the [[Electrodes_and_Surface_Locations#Examples|Examples]] section .&lt;br /&gt;
&lt;br /&gt;
Descriptions of file formats that BESA Research uses are given in the online help chapter [[Working_With_Additional_Files|Working With Additional Files]].&lt;br /&gt;
&lt;br /&gt;
== Working with auxiliary files ==&lt;br /&gt;
&lt;br /&gt;
Data files come with varying amounts of prior information about electrode/sensor locations, depending on the recording system. BESA Research allows you to read auxiliary files that define additional information, such as channel labels, and coordinates of the electrodes, sensors, and other head surface points. The information is required for mapping and for source montages.&lt;br /&gt;
* '''Mapping.''' BESA Research uses spherical spline mapping. For this, electrode/sensor locations are projected onto a sphere. The minimum requirement is 10-10 or 10-20 labels: if only channel labels are available without additional information, BESA Research uses default spherical coordinates.&lt;br /&gt;
* '''Source modeling'''. Spherical coordinates of electrode locations are sufficient, but digitized locations are better. Digitized locations can be defined in the data file or in auxiliary files. BESA Research will use digitized head surface points (electrodes + additional points) to fit a sphere for the spherical model. Points anterior to the left and right preauricular points and below the plane formed by these points and the nasion are excluded when fitting the sphere.&lt;br /&gt;
&lt;br /&gt;
Files can also be written, for instance for&lt;br /&gt;
* '''Source modelling with MRI coregistration'''. BESA Research allows for the export of surface points in a special format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''sfh'''&amp;lt;/span&amp;gt; file) which can be read by the BESA MRI (or BrainVoyager) program. These are fitted to the head surface defined by BESA MRI (or BrainVoyager) in order to define rotation, translation, and deformation parameters required to coregister the coordinate systems (see &amp;quot;''Integration with MRI and fMRi''&amp;quot;).&lt;br /&gt;
* '''Export of coordinates.''' Electrode, other surface point locations, and MEG sensor coordinates and other surface point locations can be written to ASCII files so that they can be reread when reading other files into BESA Research (e.g. ASCII files), or used by other programs.&lt;br /&gt;
&lt;br /&gt;
Feedback and control over how these files are read is provided by&lt;br /&gt;
* '''the Channel and digitized head surface point information dialog box.''' This dialog is usually opened when you open a file for the first time. It allows you to specify the names of auxiliary files, and it makes initial checks on the files to see whether they are consistent with each other and with the data file. If the check is OK, you will see a green tick at the top right hand corner of the dialog box. If there are inconsistencies, the tick is replaced by a red exclamation mark. In this case, you will usually need to edit the auxiliary files or specify other files. The dialog box is not opened if the file is recognized to contain all the necessary information (files with the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''foc'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''fsg'''&amp;lt;/span&amp;gt; extensions), or if the program only finds a channel definition file (with extensions &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''ela, elp,'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''elb'''&amp;lt;/span&amp;gt;). The dialog box is not opened if the data file has been opened before. You can always open the dialog box manually by specifying ''&amp;quot; File / Head Surface Points and Sensors/Load Coordinate'' ''Files.''&lt;br /&gt;
* '''The log file''' (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*_LoadFile.log&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;)'''.''' Coordinating the information between the data file and its auxiliary files can be a complex procedure. To help you check whether the coordination is being done properly, if you select the menu entry ''&amp;quot; Options / File / Generate Log &amp;quot;'' during File Open, BESA Research writes a log file with the same base name as the data file, appending &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_LoadFile.log'''&amp;lt;/span&amp;gt;&amp;quot; to the base name, recording which files have been read, and some of the parameters that have been found. This file is created every time auxiliary files are read (e.g. on file open, when reading in channel configuration files, head surface point files, MEG sensor locations), or changed (&amp;quot;''Edit /'' ''Channel Configuration''&amp;quot;).&lt;br /&gt;
* '''The log window. '''If there are inconsistencies during the processing of auxiliary files and 3D coordinates, a logging window is opened showing the information that would be written to the log file. You can read what has been done to help diagnose the problems. Select '''OK''' to continue in spite of the problems, or''' Reset''' to reject. Typing '''Reset''' also deletes the database files associated with the current data file, thus allowing you to start reading this file from scratch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA Research remembers which auxiliary files are associated with the current file'''. When a data file is first opened, and BESA Research finds auxiliary files with the same base name as the data file, you will be asked if you want this file to be read. The decision you make will be recorded in the database for this data file. Next time the file is opened, the files will or will not be read, according to your previous decision. Similarly, when an auxiliary file is read using the menu, this is recorded in the database, and the file will be opened automatically next time the data file is opened. To override previous decisions, you must delete the database files (see the''' log window '''above) or change the entries in the Channel and digitized head surface point information dialog box (see the chapter ''&amp;quot;Electrode Conventions / Channel and digitized head surface point information dialog box''&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Coordinate systems ==&lt;br /&gt;
&lt;br /&gt;
We need to deal with four different coordinate systems. These differ in how the x, y, and z axes are defined, and in the units of measurement (e.g. mm, cm, m). The first three are illustrated in the following figure:&lt;br /&gt;
&lt;br /&gt;
[[File:ST_Electrodes_(1)_02.png|800px]]&lt;br /&gt;
&amp;lt;!-- [[Image:ST Electrodes (1).gif ]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Device coordinates.''' These are the coordinates used by the recording system. The axes may be anywhere in relation to the head. For instance, in the Polhemus digitizer, the axes go through the magnetic field transmitter which is located somewhere outside the head. The units of measurement may be millimeters, centimeters, or meters.&lt;br /&gt;
&lt;br /&gt;
'''Head coordinates'''. This coordinate system is defined by reference points on the head known as ''fiducials''. The reference points are normally the nasion (Nz, NAS), the left preauricular point (T9, LPA), and the right preauricular point (T10, RPA). The x axis is defined by the line joining T9 and T10, positive towards T10. The y axis is defined by the line through Nz that is perpendicular to the x axis (positive towards Nz). The z axis is perpendicular to the x and y axes, and goes up out of the head in the vicinity of Cz. The units of measurement may be millimeters, centimeters, or meters. In BESA Research these are labelled with the prefix 'Fid', e.g. 'FidT9', 'FidNz'.&lt;br /&gt;
&lt;br /&gt;
'''BESA Research coordinates.''' For dipole analyses the head model consists of a sphere. In the default situation where no digitized sensor information is available, the center of the sphere is defined by the crossing point between the lines joining T7 (=T3) and T8 (=T4) and Fpz and Oz.. The x axis is the T8-T7 line, positive at T8. The y axis is the Oz-Fpz line, positive at Fpz. The z-axis goes up out of the head through Cz. If digitized information is available, the axes are defined by the best fit between the idealized electrode locations and the real locations. The diameter of the sphere is also defined by the best fit. Units given in the display are in millimeters.&lt;br /&gt;
&lt;br /&gt;
The '''center of the spherical model''' is on average about 4 cm above the origin of the Head Coordinates. If digitized surface points are available, the sphere is fitted to these points. Using a cot file, it is possible to override the fit and define your own head center. In conjunction with BrainVoyager, you can use the MRI to seed the location of the head center (e.g. a fixed distance anterior to the posterior commissure) and save it as a cot file. Using MRI coregistration (see &amp;quot;''Integration with MRI and'' ''fMRi''&amp;quot;), the center is placed between the anterior (AC) and posterior (PC) commissures, at the half-way point between the anterior and posterior points (AP and PP). Without coregistration, the center corresponds to a point 17.5 mm behind AC in the standard MRI head.&lt;br /&gt;
&lt;br /&gt;
'''MRI coordinates.''' These are the coordinates used by BrainVoyager. These are defined by the MRI slices. Measurement units are millimeters.&lt;br /&gt;
&lt;br /&gt;
== The Channel and Digitized Head Surface Point Information Dialog Box ==&lt;br /&gt;
&lt;br /&gt;
Many data formats read by BESA Research require additional information about data channel, which are specified by additional, auxiliary files. This dialog box allows you to specify which auxiliary files are read in to supplement the information in the data file.&lt;br /&gt;
&lt;br /&gt;
The dialog box is opened automatically the first time a data file is opened, if&lt;br /&gt;
* auxiliary files other than a channel definition file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elb&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) are found&lt;br /&gt;
* no auxiliary files are found, and the data file was not written in compressed binary format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.foc&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.fsg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) by BESA Research &lt;br /&gt;
&lt;br /&gt;
When a data file is closed, the information about which auxiliary files have been read is stored in the database. When the file is opened for a second time the dialog box is not opened automatically, because the information is assumed to be correct – the files are read automatically.&lt;br /&gt;
&lt;br /&gt;
The dialog box can be opened manually by selecting &amp;quot;''File / Head Surface Points and Sensors / Load Coordinate Files''&amp;quot;, or using the shortcut &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''ctrl-L'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (2).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dialog box is divided into several sections:&lt;br /&gt;
&lt;br /&gt;
* '''Internal data file information.''' Here you can see the file name, the originating system (file format), the name of the database file, if any, and the channel information as specified by the data file alone.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (4).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Suggestions.''' This box makes suggestions about what needs to be filled in, e.g. &amp;quot;Please enter electrode thickness&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (5).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Main feedback (top right hand corner).''' A green tick indicates that the currently selected data files are consistent among themselves and with the data file. A red exclamation mark indicates an inconsistency. Check the feedback texts in the subsequent sections for more information:&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (8).gif|70px]] [[Image:ST Electrodes (7).gif|71px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Channel configuration file specification.''' If the channel labels and types defined in the data file (&amp;quot;Internal data file information&amp;quot;) need to be changed, enter a file name here (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elb&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If a channel definition file exists with the same basename as the data file, or if a channel definition file has been specified previously (database entry exists), it will be selected automatically. To the right of the file name, feedback is provided about the number of channels and channel types found. If the labels are consistent with the data file, to the right the text &amp;quot;Good&amp;quot; is shown. If they are inconsistent, e.g. the file contains the wrong number of channel definitions, the text &amp;quot;Bad&amp;quot; is shown.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (9).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Digitized head surface point specification.''' Here you may specify a file containing digitized electrode and other head surface points. Optionally, the information can be split into two files, containing the coordinates (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp, *.eps&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the coordinate names (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.sfn'''&amp;lt;/span&amp;gt;). Alternatively, both labels and names can be contained in the coordinate file. If the files specify electrode coordinates, there '''must''' be a coordinate name for each electrode. The sequence may be different. BESA Research will use the names to assign each coordinate to the electrodes. Additional head surface points can have any other names. It is recommended that the first three digitized coordinates are the fiducials (fiduciary points), labelled &amp;quot;FidNz&amp;quot;, &amp;quot;FidT9&amp;quot;, &amp;quot;FidT10&amp;quot;. If your electrode labels not follow the 10-10 or 10-20 standard (e.g. in high-density electrode recordings), it is recommended to tick the box '''&amp;quot;Electrode labels non-conforming to 10-10 standard&amp;quot;'''. This will prevent BESA Research from using electrodes for an optimal rotation of the coordinate system which should not be used (e.g. A1, A2 which have known locations in 10-10, but are sometimes used in a nomenclature outside of 10-10). The example below shows the sphere adaption for an example data set with and without taking this into account.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (12).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The right picture shows that when discarding the non-conforming electrodes, the fiducials are correctly placed along the x any y axes.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (10).gif ]] [[Image:ST Electrodes (11).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(In the special case of Neuromag files with electrode channels, the data file contains head surface points with the wrong labels. Here you may provide a label file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfn&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) without a corresponding digitized coordinate file.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Coregistration file.''' Here you may specify a file containing the coordinates of the head center (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.cot&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) or an ''MRI Coregistration File ''(&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). Head center redefinition is only necessary if you want to provide an external definition, e.g. from the MRI. The ''MRI Coregistration File ''is used if the data are to be coregistered with individual MRI. (see &amp;quot;''Integration with MRI and fMRi'' &amp;quot;). '''Note''' that if a head center file (cot file) with the same base name as the data file exists, it will be read automatically if the head center coordinates deviate by more than 1 mm from the internally calculated values. Changes are ignored if the radio button is set to &amp;quot;No&amp;quot;. This automated function allows you to change the head center during a session, using BrainVoyager's view of the MRI and the Source Module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (14).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''MEG sensor specification'''. If the file contains MEG channels, you may enter the name of a sensor coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pmg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). This field is grayed if there are no MEG channels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (15).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Artifact coefficients file.''' If the data are to be artifact corrected, your pre-prepared coefficient file may be defined here. See the chapter &amp;quot;''Artifact Correction''&amp;quot;. Selecting the file here is equivalent to loading the file using the menu entry &amp;quot;''Artifact / Load''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (17).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each of the selected files, make sure the radio button &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Yes&amp;quot;'''&amp;lt;/span&amp;gt; is selected on the left-hand side of the dialog box. If files have been selected automatically, and you do not wish them to be read, select the &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''No'''&amp;lt;/span&amp;gt;&amp;quot; radio button.&lt;br /&gt;
&lt;br /&gt;
If some of the settings are incorrect or the text &amp;quot;Bad&amp;quot; is shown, you may edit the auxiliary files (the file is opened with the NotePad program) or browse for another file by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse'''&amp;lt;/span&amp;gt; buttons.&lt;br /&gt;
&lt;br /&gt;
After you have entered the required information, and the green tick at the top right indicates consistency, press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to continue. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Cancel'''&amp;lt;/span&amp;gt; to ignore the current settings. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear DB'''&amp;lt;/span&amp;gt; to delete the database files. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear Events'''&amp;lt;/span&amp;gt; to delete the tag files (the part of the database that records events). Both &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear'''&amp;lt;/span&amp;gt; buttons close the currently-opened data file.&lt;br /&gt;
&lt;br /&gt;
== General Reading Rules for Data Files and Auxiliary Files ==&lt;br /&gt;
&lt;br /&gt;
Auxiliary files can complement the information in the data file. Here we specify what happens when a data file is opened:&lt;br /&gt;
&lt;br /&gt;
: 1. If the data file has been read previously, the database entry specifies which auxiliary files should be read. The file and the specified auxiliary files are opened and the data are displayed.&lt;br /&gt;
&lt;br /&gt;
: 2. If&lt;br /&gt;
&lt;br /&gt;
:: a) there is a channel definition file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.el?'''&amp;lt;/span&amp;gt;) with the same basename as the data file, and &lt;br /&gt;
&lt;br /&gt;
:: b) this file includes spherical coordinates for the EEG channels (including labels with entries in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; file), and&lt;br /&gt;
&lt;br /&gt;
:: C) there are no other auxiliary files with the same base name, the file will be opened and the data displayed. If files with the same basename are not found, BESA Research will look for files with the basename “default” (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;) in the data folder. If such files are not found, BESA Research will look for files with the basename “default” one folder above (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
: 3. If the data file has been written in binary format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.foc'''&amp;lt;/span&amp;gt;, &amp;lt;span &lt;br /&gt;
style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.fsg'''&amp;lt;/span&amp;gt;) by BESA Research (after Jan. 2000), the file will be read, and all information is assumed to be complete. The file is opened and the data are displayed.&lt;br /&gt;
&lt;br /&gt;
: 4. In all other cases, the ''Channel and digitized head surface point information dialog box'' will be opened for you to specify and check auxiliary files. Auxiliary files with the same base name as the data file will be specified in the text boxes for file names. If files with the same basename are not found, BESA Research will look for files with the basename “default” (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;) in the data directory. If such files are not found, BESA Research will look for files with the basename “default” one directory above (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;). Otherwise the text boxes will be left blank.&lt;br /&gt;
&lt;br /&gt;
: 5. Auxiliary files can be specified at a later time by selecting ''File/Head Surface Points'' and ''Sensors/Load'' ''Coordinate Files''. The ''Channel and digitized head surface point information dialog box'' will be opened.&lt;br /&gt;
&lt;br /&gt;
== Electrodes ==&lt;br /&gt;
&lt;br /&gt;
=== Electrode Conventions ===&lt;br /&gt;
&lt;br /&gt;
BESA Research adheres to the 10/20 and to the new 10/10 standard of the IEF (international EEG Federation). BESA Research will recognize the labels defined by these standards. The labels are stored in most EEG file headers. Otherwise, or in the case of erroneous labeling or sequencing of the recording channels, you may edit the channel labels and/or coordinates, or you may read an electrode file stored previously on disk. In addition to the 10/20 and 10/10 standard labels BESA Research recognizes the following labels: M1, M2 (left, right mastoids), SP1, SP2 (sphenoidal), CB1, CB2 (cerebellar), Chin, Neck, LO1, LO2 (lateral ocular), SO1, SO2 (supra-ocular), IO1, IO2 (infra-ocular). BESA Research will translate all the labels into spherical coordinates for spherical spline interpolation, mapping and source imaging. The following assignments are stored in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; in the BESA folder:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (19).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Electrode labels in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd '''&amp;lt;/span&amp;gt;and their spherical coordinates. 10-20 electrodes are shown in&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt; red and italic.''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The spherical coordinates are defined in degrees by the azimuth (from Cz, positive = right, negative = left hemisphere) and the latitude (counterclockwise from T7/T3 for left and from T8/T4 for right hemisphere) of each electrode. Please do not modify the existing labels or coordinates in this file, because this would adversely affect the interpolated (virtual) montages, the maps and the source montages and source images in BESA Research. However, you may add additional labels for scalp electrodes at the end of this file if needed (up to a total of 196). When you edit the electrode configuration or read in electrode files, BESA Research may replace the 10/20 standard labels T3, T4, T5, T6 by their new 10/10 equivalents T7, &lt;br /&gt;
&lt;br /&gt;
T8, P7, P8. However, in the initialization file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini '''&amp;lt;/span&amp;gt;you can reset to the old 10/20 standard by relabeling T7=T3, P7=T5, T8=T4, P8=T6 under the heading [Electrodes]. You may use the same feature to assign appropriate labels to the X1..X8 channels which exist in many systems, e.g. X1=EKG1 etc.&lt;br /&gt;
&lt;br /&gt;
=== Recommendations for electrode placement ===&lt;br /&gt;
&lt;br /&gt;
For source montages and source analysis two principles are important:&lt;br /&gt;
&lt;br /&gt;
# Covering of the lower head with inferior electrodes to record activity from the inferior surfaces of the brain, especially from the basal temporal lobe, from the temporal pole, from orbito-frontal cortex, and from basal occipital and cerebellar areas.&lt;br /&gt;
# Equal spacing of the electrodes over the whole head to cover all brain areas.&lt;br /&gt;
&lt;br /&gt;
In the following montage EEGxx, the number xx indicates the number of electrodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG25 - Minimum 10-20 configuration including inferior electrodes'''&lt;br /&gt;
&lt;br /&gt;
This covers the 19 standard 10-20 electrodes:&lt;br /&gt;
&lt;br /&gt;
Fp1, Fp2, F7, F3, Fz, F4, F8 ....&lt;br /&gt;
&lt;br /&gt;
plus 6 inferior electrodes on both sides:&lt;br /&gt;
&lt;br /&gt;
F11, A1, P11, F12, A2, P12&lt;br /&gt;
&lt;br /&gt;
with a recommended continuation of the 20% distances, i.e. use F11 instead of F9, P11 instead of P9, A1 instead of T9 to have a wider coverage of the inferior head. A1 / A2 may be replaced by T9 / T10 (or FT9 / FT10) for convenience and comfort.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (21).gif ]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 25 electrodes. Right: left temporal basal activity mapped with 25 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG33 - Additional 10-10 electrodes within the major squares'''&lt;br /&gt;
&lt;br /&gt;
To the above electrodes add the following 8 intermediate electrodes:&lt;br /&gt;
&lt;br /&gt;
FC5, FC1, FC2, FC6, &amp;amp;nbsp;&amp;amp;nbsp;CP5, CP1, CP2, CP6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (23).gif]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 33 electrodes. Right: left temporal basal activity mapped with 33 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG35 - Additional supraorbital electrodes for better EOG separation'''&lt;br /&gt;
&lt;br /&gt;
SO1, SO2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG37 - Wider inferior coverage at interlaced 20% distances'''&lt;br /&gt;
&lt;br /&gt;
Continue 20% down from F7, FC5, CP5, P7 etc. and use the following 8 inferior electrodes instead of 6:&lt;br /&gt;
&lt;br /&gt;
F11, FT9, TP9, P11, &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;F12, FT10, TP10, P12&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG41 – Improved frontal and occipital coverage'''&lt;br /&gt;
&lt;br /&gt;
Additional electrodes halfway between Fz and Fp1 / FP2 and Pz and O1 / O2:&lt;br /&gt;
&lt;br /&gt;
AF1, AF2, &amp;amp;nbsp;&amp;amp;nbsp;PO1, PO2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG43 – Inferior chain with 5 electrodes including A1 / A2'''&lt;br /&gt;
&lt;br /&gt;
F11, FT9, A1, TP9, P11, &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;F12, FT10, A2, TP10, P12&lt;br /&gt;
&lt;br /&gt;
EEG43 represents the widest coverage with relatively even spacing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (25).gif]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 43 electrodes. Right: left temporal polar activity mapped with 43 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG64-256'''&lt;br /&gt;
&lt;br /&gt;
With 64 or more channel caps, it is similarly recommended to use a sufficient number of inferior electrodes all around the head. At least 4 inferior temporal electrodes on each side and additional electrodes above or below the eyes (outside of the cap) are suggested.&lt;br /&gt;
&lt;br /&gt;
=== Editing the channel configuration ===&lt;br /&gt;
&lt;br /&gt;
Only use the channel configuration editing facility if the electrodes or the common reference have not been correctly defined by your digital EEG system, or if you want to define specific spherical coordinates for your scalp electrodes. It is your responsibility to check and provide the correct sequence of electrode labels in correspondence with the sequence of channels in the EEG data file. If these sequences do not match exactly, errors will occur in the computation of maps, source images and interpolated montages.&lt;br /&gt;
&lt;br /&gt;
We will use the example EEG file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg'''&amp;lt;/span&amp;gt; in the subdirectory ''Examples/EEG-Focus'' of the BESA Research directory to explain the editing of electrode labels and coordinates:&lt;br /&gt;
&lt;br /&gt;
1. Select ''File'', then click on ''Open'', or click on &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg '''&amp;lt;/span&amp;gt;if this file is contained in the list of currently selected EEG files.&lt;br /&gt;
&lt;br /&gt;
2. Select ''Edit'', then click ''Channel Configuration''. The dialog box shown below will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (27).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the upper left of the figure you see the dropdown menu after selecting the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File '''&amp;lt;/span&amp;gt;menu in the dialog box. This menu allows to edit a new ('''''New''''') or an existing ('''''Open''''') electrode file and to save the changes to the same ('''''Save''''') or a different ('''''Save As''''') file. Normally, it will not be necessary to use this menu. The control fields on the right will be sufficient. If you type ''''''Ok'''''', you will be given the option of saving the changes to a file.&lt;br /&gt;
&lt;br /&gt;
3. Click on &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Reload org. &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Labels'''&amp;lt;/span&amp;gt; to reread the original labels as stored in the file header of &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg'''&amp;lt;/span&amp;gt;. BESA Research quits editing and redisplays the EEG. Repeat step 2 and select &amp;quot;''Edit / Channel'' ''Configuration''&amp;quot; again. Note: The button &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Reload org. Labels'''&amp;lt;/span&amp;gt; is not available if there are no labels in the file header.&lt;br /&gt;
&lt;br /&gt;
4. Click on the empty space of the scroll bar below the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''scroll '''&amp;lt;/span&amp;gt;button and on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''down arrow'''&amp;lt;/span&amp;gt; of the '''scroll bar''' to display the remaining electrodes in the file.&lt;br /&gt;
&lt;br /&gt;
5. Click on electrode '''R''' (line 32), then on the button &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Delete Electrode'''&amp;lt;/span&amp;gt; to remove the associated channel, which does not contain any signal. Note that you may not omit intermediate channels, even if they do not exhibit signals, because the correct correspondence between the series of electrodes and the EEG channels will not be maintained. Use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;quot;Edit / Bad Channels&amp;quot;'''&amp;lt;/span&amp;gt; menu to disable artifactual or empty channels.&lt;br /&gt;
&lt;br /&gt;
6. Click on''' EOG''' (line 30) and change the entry to '''EOG1'''. Do not type &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;lt;Enter&amp;gt;,'''&amp;lt;/span&amp;gt; but click on the next or a different electrode box to accept the changes.&lt;br /&gt;
&lt;br /&gt;
7. '''Double click''' on '''EOG '''(line 31). This will highlight the entry. Simply type the new name '''EOG2''', and note that the old label is replaced when highlighted. Electrodes '''30 '''and '''31 '''are now defined as distinct electrodes. Next, we want to replace the label '''T10 '''by '''A2'''.&lt;br /&gt;
&lt;br /&gt;
8. Click on the label '''T10''' (line 24). Then click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''drop down'''&amp;lt;/span&amp;gt; arrow right of the highlighted label to obtain the list of default scalp electrodes (read from &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; and sorted alphabetically). Type '''A''' to jump to the electrodes beginning with letter A (see below). Type '''2''' or '''click''' on '''A2''' in the list. Click on the '''type '''box (Scalp channel) to close the list and display the new entry in line 24. Note that this is the most convenient way to edit an electrode label.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (28).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Exercise: repeat step 8 to replace '''T9''' by '''A1'''. Restore labels '''T10''' and '''T9''' in lines 24 and 21.&lt;br /&gt;
&lt;br /&gt;
10. Replace SO1 and SO2 (supra-orbital) by '''PSO1 '''and '''PSO2 '''and note that these electrodes are changed to the''' 'Polygraphy'''' type, because no coordinates are associated with these labels.&lt;br /&gt;
&lt;br /&gt;
11. After you click &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''OK''''&amp;lt;/span&amp;gt;, the box '''Write Channel Configuration File''' will appear and display a name for the current electrode file. By default, the BESA electrode file path and current file name will be used and supplemented by the extension &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''''.elb''''&amp;lt;/span&amp;gt;. The electrode file path may be set in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini'''&amp;lt;/span&amp;gt; file [Defaults] section under ElectrodeFilePath. If no electrode file path is specified in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini'''&amp;lt;/span&amp;gt; file, the default electrode file path ''Montages\Channels ''is used. Simply click '&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;' or type &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;lt;Enter&amp;gt; '''&amp;lt;/span&amp;gt;to save the changes to this file, or select a new file name and/or path, if you do not want to store the electrode file in the BESA Research electrode file directory.&lt;br /&gt;
&lt;br /&gt;
Note that by using the default 10/10 labels (see chapter &amp;quot;''Electrode conventions''&amp;quot;) you specify that the associated electrode is a scalp electrode. Hence, different labels must be used for polygraphic, intracranial or MEG channels. After you have entered a new non-scalp label, you may select the type of the electrode/channel amongst the different groups ('''Polygraphy, Intracranial, MEG Channel''') from the drop down list in the ''''''Type'''''' box. This will allow for using separate selection and scaling facilities of the channel group control push-buttons at the right of the screen ('''All, Scp, Pgr, Icr, MEG'''). If you have entered a new non-scalp label and select the type '''Scalp Channel''', or if you click on the ''''Advanced&amp;gt;&amp;gt;'''' field, boxes will appear to enter the spherical coordinates (azimuth and latitude) of this electrode (cf. Fig. 6.5). These features may be used to specify non-standard scalp electrodes. Please check the earlier sections of this chapter for electrode conventions. You may view the locations of the scalp electrodes on the head schemes in the mapping window. Select '''Show Electrodes in Maps''' in the &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''View / Options'''&amp;lt;/span&amp;gt;&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (29).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Hint:''' If you want to specify the spherical coordinates of an electrode which is close to a standard electrode, click on the ''''Advanced &amp;gt;&amp;gt;'''' field, enter the label of the standard electrode and append a single quotation mark. This will specify that the electrode is close to the labeled location but has different coordinates. The ''Scalp Channel'' type will not be replaced by '''Polygraphy.''' Then edit '''Azimuth''' and '''Latitude'''. This convention is used by BESA Research when reading electrode coordinate files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''(*.elp'''&amp;lt;/span&amp;gt;), e.g. from the BESA program. The coordinates are read and compared with the default coordinates to assign the closest label. Then a single quotation mark is appended to the label, and the coordinates are assigned as specified in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.elp'''&amp;lt;/span&amp;gt; file. For example, open &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''segm1.eeg'''&amp;lt;/span&amp;gt; in the ''Examples\EEG-Focus'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
Note that the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''segm1.elp '''&amp;lt;/span&amp;gt;is searched for automatically in the directory of the data file when opening the data file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Edit Common Scalp Reference'''&lt;br /&gt;
&lt;br /&gt;
There is a separate line at the bottom in the ''Channel Configuration dialog box'' to enter the label and coordinates of the '''Common Scalp Reference electrode'''. If this is specified and enabled (click on field '''Enabled'''), the information provided by the fact that all scalp electrodes were recorded against a common recording reference will be used for mapping, source imaging and virtual montages. This information will be lost if the common reference has not been specified or if a combination of electrodes has been used as reference during recording. Specify the '''Common Scalp Reference electrode''' only if all electrodes have been referenced to the same single electrode and if a standard 10/10 location has been used for the common recording reference.&lt;br /&gt;
&lt;br /&gt;
'''Note that BESA Research cannot process digital EEG data correctly if there is no common recording reference''', and if different recording references were used for the various scalp electrodes. For intracranial and polygraphic channels different references may be used. It is preferable to use the common reference also for electrode channels near the eyes, because these electrodes provide valuable information for mapping, source imaging and interpolated montages. The traditional bipolar channels (e.g. horizontal and vertical '''EOG''') may be '''reconstructed digitally''' using the ''Selected Channels'' group or user-defined montages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 3D Coordinates for Precise Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction - Working with Digitized 3D Coordinates ===&lt;br /&gt;
&lt;br /&gt;
Working with digitized electrode coordinates usually requires reading in additional (auxiliary) files. The procedure is described in the chapter &amp;quot;''Working with auxiliary files''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Data reading rules for EEG ===&lt;br /&gt;
&lt;br /&gt;
This section explains which additional files are read, or which files have to be read in order to provide the necessary information for mapping and source montages.&lt;br /&gt;
&lt;br /&gt;
Assume file name is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.xxx'''&amp;lt;/span&amp;gt;. datafile is the base name, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.xxx'''&amp;lt;/span&amp;gt; is the extension. Replace the text ''datafile'' by the base name of your own file, and the extension&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;'' xxx''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; by the extension of your own file.&lt;br /&gt;
&lt;br /&gt;
'''Channel definitions for EEG:'''&lt;br /&gt;
&lt;br /&gt;
* '''Labels have 10-10 names''': default locations will be used.&lt;br /&gt;
* '''Labels do not have 10-10 names''': Channels are interpreted as '''polygraphic'''. Mapping is not possible without one or more of the following additional files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Define channel names and types.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elb'''&amp;lt;/span&amp;gt; exist (i.e. files with basename d''efault ''one folder above the data file): Channel names and types will be replaced by those defined in this file, in order of occurrence. The ''ela'' file contains just labels and, optionally, types. The ''elp'' file contains spherical coordinates and can contain labels and types. The ''elb'' file contains the same information in binary format. See chapter &amp;quot;''[[Working_With_Additional_Files#Channel_definition_file_conventions_and_formats|Working with additional files / Channel Definition File Conventions]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define order in which electrodes were digitized.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfn'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; one folder above the data file): electrode names are supplied in the order in which coordinates were supplied in the ''sfp'' file. These names must match with the names supplied in the data file or defined in the ''ela/elp/elb'' file. BESA Research uses this to sort coordinates into the order of channels in the file. If fiducials exist, they should be defined on the first three lines. If they do not exist, BESA Research will simulate them (so that it can define the head coordinate system). See chapter ''&amp;quot;[[Working_With_Additional_Files#sfn_.28surface_point_name.29_file|Working with additional files / sfn (surface point name) file]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define electrode coordinates.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfp'''&amp;lt;/span&amp;gt; exists (i.e. file default.sfp one folder above the data file): electrode coordinates will be replaced/defined by the coordinates defined in this file. If &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; does not exist, labels can also be defined in this file. If fiducials exist, they should be defined on the first three lines. If they do not exist, BESA Research will simulate them. See chapter &amp;quot;''[[Working_With_Additional_Files#sfp_.28surface_point_coordinate.29_file|Working with additional files / sfp (surface point coordinate) file]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define coregistration information.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;sfh'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfh'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfh'''&amp;lt;/span&amp;gt; exists (i.e. file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.sfh '''&amp;lt;/span&amp;gt;one folder above the data file): head center and relative position of the unit sphere with respect to the head coordinate system is determined by the coregistration between EEG and MRI. See online help chapter ''&amp;quot;[[Integration_with_MRI_and_fMRI|Integration with MRI and fMRI]]&amp;quot;''.&lt;br /&gt;
&lt;br /&gt;
'''Define head center.''' No coregistration file exists (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, see above). File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.cot'''&amp;lt;/span&amp;gt; exists (i.e. file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.cot&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;one folder above the data file): head center as computed by fitting a sphere to the surface points is replaced by the head center coordinates contained in this file. See chapter ''&amp;quot;[[Working_With_Additional_Files#cot_.28Head_center.29_file|Working with additional files / cot (Head center) file]]&amp;quot;''.&lt;br /&gt;
&lt;br /&gt;
=== Data reading rules for MEG ===&lt;br /&gt;
&lt;br /&gt;
Assume file name is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''''datafile.xxx''''&amp;lt;/span&amp;gt;. '''datafile''' is the base name. '''xxx''' is the extension. Replace the text '''datafile''' by the base name of your own file, and the extension '''xxx''' by the extension of your own file.&lt;br /&gt;
&lt;br /&gt;
Here we consider cases a) MEG alone, b) MEG+EEG.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Automatic procedure:'''&lt;br /&gt;
&lt;br /&gt;
Labels have names defined in the files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd'''&amp;lt;/span&amp;gt;. Channels are interpreted as MEG. However, sensor locations and head surface point locations must be defined in additional files as described below. Mapping and source analysis are not possible without one or more of the following additional files.&lt;br /&gt;
&lt;br /&gt;
'''Define channel names and types.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elb'''&amp;lt;/span&amp;gt; exist (i.e. files with basename'' default'' one folder above the data file): Channel names and types will be replaced by those defined in this file, in order of occurrence. The'' ela''&amp;amp;nbsp;file contains just labels and (optionally) channel types. The ''elp'' file contains spherical coordinates and can contain labels and types. The'' elb'' file contains the equivalent information in binary format. See chapter “''Electrode file conventions'' ''and formats.”''&lt;br /&gt;
&lt;br /&gt;
'''MEG+EEG.''' Define order in which electrodes were digitized. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfn'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; one folder above the data file): electrode names are supplied in the order in which coordinates were supplied in the ''sfp'' file (or in the location descriptor in the data file: e.g. Neuromag). These names must match with the names supplied in the data file or defined in the ''ela/elp/elb'' file. BESA Research uses this to sort coordinates into the order of channels in the file. See chapter “''Working with additional files/ sfn (surface point name) file”.''&lt;br /&gt;
&lt;br /&gt;
'''MEG+EEG.''' Define head surface point/electrode coordinates. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfp'''&amp;lt;/span&amp;gt;'' ''exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfp'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; one folder above the data file): electrode coordinates will be replaced/defined by the coordinates defined in this file. If &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; does not exist, labels can also be defined in this file. See chapter “''Working with additional files/ sfp (surface point'' ''coordinate) file''”. The labels of electrode coordinates '''must '''match to those defined for the data channels. BESA Research will use the labels to associate coordinates with the correct channel.&lt;br /&gt;
&lt;br /&gt;
'''Define sensor coordinates'''. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.pos'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.pmg'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.pos(.pmg)'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.pos(.pmg)'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.pos(.pmg)'''&amp;lt;/span&amp;gt; one folder above the data file): coordinates are defined in this file. The convention is that'' pos'' files contain gradiometer coordinates and'' pmg'' files contain magnetometer coordinates. This is not necessary for the program to read in values properly: the program makes its decision about the sensor type on the basis of the number of coordinate values on one line in the file (6 = magnetometers, 9 = gradiometers). See chapter “''Working with additional files/ pos or pmg (MEG sensor coordinate) file”.''&lt;br /&gt;
&lt;br /&gt;
'''Define coregistration information.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfh'''&amp;lt;/span&amp;gt; exists, or file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.sfh&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfh'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfh'''&amp;lt;/span&amp;gt; one folder above the data file): head center and relative position of the unit sphere with respect to the head coordinate system is determined by the coregistration of the head coordinates with MRI. See (online) help chapter ''&amp;quot;Integration with MRI and fMRI&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
'''Define head center.''' No coregistration file exists (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, see above). File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.cot'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;one folder above the data file): head center as computed by fitting a sphere to the surface points is replaced by the head center coordinates contained in this file. See chapter ''&amp;quot;Working with additional files / cot (Head center) file&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reading MEG files in ASCII format ===&lt;br /&gt;
&lt;br /&gt;
'''BESA Research uses labeling or channel type definitions to decide whether channels are EEG or MEG. '''Based on the labels defined for the channels, or the type specified by the channel definition file, the program will try to find auxiliary files that define electrode coordinates or MEG sensors.&lt;br /&gt;
&lt;br /&gt;
BESA Research uses four files to make its decision:&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.ela/.elp'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;The channel type defined here overrides definitions in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ecd&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; (below).&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines electrode labels and default spherical coordinates based on the 10-20 and 10-10 naming system&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines labels and default spherical coordinates for the BTi whole-head system&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines labels and default spherical coordinates for the Neuromag whole-head system&lt;br /&gt;
&lt;br /&gt;
If the program finds a label in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;, the channel will automatically be defined as EEG. If not, if it finds a label in one of the other files, the channel will be defined as MEG. If it doesn't find the label anywhere, the channel will be defined as Polygraphic.&lt;br /&gt;
&lt;br /&gt;
The spherical coordinates defined in these files are sufficient for mapping the data. Auxiliary files defining the real sensor coordinates are required for source analysis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Defining default label and coordinate file for a new MEG system'''&lt;br /&gt;
&lt;br /&gt;
When preparing an MEG from a system other than BTi-WHS or Neuromag for import to BESA Research, you should edit either &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd '''&amp;lt;/span&amp;gt;to conform with your system. If sensor files (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos/*.pmg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) are always available for your files, the coordinates in the ''ecd ''files are irrelevant: all you need do is define the labels for your own MEG system or use the labels as already defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Files to prepare for reading in each data file'''&lt;br /&gt;
&lt;br /&gt;
Each auxiliary file should have the same base name as your data file.&lt;br /&gt;
&lt;br /&gt;
'''Define channel labels.''' There are several possibilities:&lt;br /&gt;
* Generate your data file according to the BESA'' avr'' ''format or the ASCII multiplexed format.'' Labels are listed in the second line of the file.&lt;br /&gt;
* Generate a ''label file'' (extension &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.ela'''&amp;lt;/span&amp;gt;) with one MEG channel label per line (matching with your ''ecd ''file as defined above) or with the type &amp;quot;MEG&amp;quot; and a label for each line.&lt;br /&gt;
&lt;br /&gt;
Label definitions are also possible using ''elp'' or ''elb'' files, but the above two solutions are recommended because they are the simplest.&lt;br /&gt;
&lt;br /&gt;
'''Define sensor coordinates.''' Generate a ''pos'' or ''pmg'' file. Make sure that the number of sensors matches with the number of MEG channel definitions in your data file.&lt;br /&gt;
&lt;br /&gt;
'''Define fiducials and other head surface points.''' Generate an ''sfp'' file. The first three lines define the fiducials. Subsequent lines define additional surface points.&lt;br /&gt;
&lt;br /&gt;
'''Define coordinates of the center of the head.''' Generate a ''cot'' file. If this file is absent, BESA Research generates the coordinates by fitting a sphere to the head surface points.&lt;br /&gt;
&lt;br /&gt;
Note that all coordinates should be within the same frame of reference, i.e. the same coordinate system. Units must be in meters, centimeters, or millimeters.&lt;br /&gt;
&lt;br /&gt;
==  Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Defining Channel Labels ===&lt;br /&gt;
&lt;br /&gt;
The files described in these examples can be found in the ''.\Examples\Xtras\EEG+Channel Labels'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
The simplest way to define electrode coordinates is to use BESA Research’s default settings (defined in the file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;). In this case, you only need to provide a list of channel labels. If a channel label is defined in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; (i.e. if the labels belong to the 10-20 or 10-10 system), BESA Research will recognize the channel as EEG, and will allocate 3D coordinates.&lt;br /&gt;
&lt;br /&gt;
Labels are not always supplied correctly in the data file. You can override the internal labels in several ways:&lt;br /&gt;
* Read the data file, and then use &amp;quot;''Edit / Channel Configuration''&amp;quot; to redefine the channels. The configuration is stored in a file with the name &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''basename.elb'''&amp;lt;/span&amp;gt; (for binary data) or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''basename.elp'''&amp;lt;/span&amp;gt; (for ASCII data), where basename is the base name (name without the extension) of your data file.&lt;br /&gt;
* Prepare a label file (with the extension ''ela'') containing a list of labels. This can also specify channel types (e.g. EEG, Polygraphic, Intracranial, MEG).&lt;br /&gt;
* Prepare a file (with the extension ''elp'') containing spherical coordinates of the channels. This is the method used with the previous version of BESA Research. If the file doesn’t contain labels, labels are allocated based on their proximity to the 10-20 or 10-10 definitions in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following examples illustrate the above three methods. The input files are all in ''BESA avr format, ''although these examples apply to all EEG data formats in which only EEG channels exist.&lt;br /&gt;
&lt;br /&gt;
If the data file contains polygraphic or other types of non-EEG channel, the types need to be defined. See the ''EEG+Polygraphic channels example.'' MEG is a special case, because the sensor coordinates need to be defined. See the ''MEG ASCII and the MEG+EEG'' ''examples''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. EEG file containing wrong labels – use ''Edit/Channel Configuration ''to redefine labels'''&lt;br /&gt;
* The'' avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.avr'''&amp;lt;/span&amp;gt;, contains the EEG labels. Channels 4 and 14 have been mislabeled – the labels need to be swapped.&lt;br /&gt;
* Open the file with '''''File/Open''''' (Select file type ''BESA avr''. Find the correct directory ''Xtras\EEG+Channel Labels'').&lt;br /&gt;
* The file should open correctly, displaying 32 channels of EEG.&lt;br /&gt;
* The channel coordinates can be viewed by typing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’ '''&amp;lt;/span&amp;gt;key (make sure the cursor is off). There will be a 3D display of the electrodes. Clicking on an electrode will display the label and the coordinates.&lt;br /&gt;
* In this file, channels 4 and 14 have been mislabeled as P3 and F3. In fact, the labels should be the other way around. We will now correct this:&lt;br /&gt;
* Select '''''Edit / Channel Configuration'''''.&lt;br /&gt;
* Type ‘F3’ into the label for channel 4, and ‘P3’ into the label for channel 14. Then type ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;’. The new channel configuration will be saved in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.elp'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* In the data display, the labels of channels 4 and 14 will now be displayed correctly.&lt;br /&gt;
* Close the file ('''''File/Close''''') and open it again. Note that the labels are still correct. This is because the new channel configuration file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.elp'''&amp;lt;/span&amp;gt;, is read automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. EEG file with no labels – channel labels in auxiliary file'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithoutLabels.avr'''&amp;lt;/span&amp;gt;, has no labels.&lt;br /&gt;
* EEG labels are defined in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithoutLabels.ela'''&amp;lt;/span&amp;gt;. This is read automatically when the file is opened.&lt;br /&gt;
* In this example, labels are correct. Each label in the ''ela'' file is on one line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp1''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp2''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F7''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F3''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''...''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3. EEG file with no labels – channel labels derived from spherical coordinates'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithSphericalCoords.avr'''&amp;lt;/span&amp;gt;, has no labels.&lt;br /&gt;
* Spherical coordinates are defined in the ''elp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithSphericalCoords.elp'''&amp;lt;/span&amp;gt;. This contains spherical coordinates (theta and phi) and no labels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-93 -72''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''92 74''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-97 -40''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-61 -49''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-46 -88''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''62 51''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* When the data file is opened, the ''elp'' file is read automatically, and BESA Research uses the tables in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; to assign channel labels. To indicate that it has assigned user defined coordinates and matched with the closest standard electrode, BESA appends an apostrophe (‘) to each label:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp1’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp2’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F7’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F3’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We advise to assign specific labels as well as spherical coordinates if you want to use your own spherical coordinate system, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''FP1u -90 -72''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 4. EEG file with no labels – channel labels not in basename.el?'''&lt;br /&gt;
* The ''avr ''file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGnoLabelsNoElaFile.avr'''&amp;lt;/span&amp;gt;, has no corresponding ''ela, elp'', or ''elb'' file, i.e. no file with the same base name and the ''el?'' extension.&lt;br /&gt;
* When you open the file, BESA Research will ask for a channel configuration file. The ''File Open'' ''dialog ''will select the ''directory .\Montages\Channels''. The idea is that standard (= frequently used) electrode configurations should be kept in this directory.&lt;br /&gt;
* Select the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''XtrasExample.ela'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* Close the data file and reopen it. The file will open with the correct labels. In the BESA window title you will see that the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGnoLabelsNoElaFile.elp'''&amp;lt;/span&amp;gt; has been read automatically. This file was created when &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''XtrasExample.ela'''&amp;lt;/span&amp;gt; was read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mixed EEG and Polygraphic Data === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ EEG+Polygraphic'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
The data are in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEG+Polygraphic.avr'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The third channel is defined as polygraphic in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEG+Polygraphic.ela '''&amp;lt;/span&amp;gt;file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Fp1 &lt;br /&gt;
 Fp2 &lt;br /&gt;
POLY Test&lt;br /&gt;
 F3 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The prefix &amp;quot;''POLY''&amp;quot; specifies that the channel is polygraphic. Most other channels are interpreted as EEG because the labels are known in the 10-20 system.&lt;br /&gt;
&lt;br /&gt;
Similarly, channel 31 is defined as intercranial, using the prefix &amp;quot;''ICR''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that you can also define channels as EEG by specifying the ''&amp;quot;EEG&amp;quot; ''prefix (e.g. ''&amp;quot;EEG E1&amp;quot;. ''This is useful if there are many more channels than are defined in the 10-10 or 10-20 systems, and if the channel coordinates are defined.&lt;br /&gt;
&lt;br /&gt;
=== EEG with Digitized Coordinates === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the .''\Examples\Xtras\ EEG+Digitization Points ''subdirectory.&lt;br /&gt;
&lt;br /&gt;
In the previous examples, we have illustrated how to assign labels to channels using channel definition files. In those examples, only spherical coordinates were defined. Here we will show how to read digitized surface points into BESA Research, using the surface point (''sfp'') coordinate file and the surface point name (''sfn'') file.&lt;br /&gt;
&lt;br /&gt;
The principles of defining digitization coordinate files are:&lt;br /&gt;
* The labels in the ''sfp/sfn'' file combination are used to assign coordinates to electrodes. Thus, if a coordinate has the name ‘''Fz''’ it will be assigned to the channel with the label ‘''Fz''’.&lt;br /&gt;
* In consequence, digitization of surface points can be in a different order to the sequence of channels in the data file. Matching to channels is done by comparing the labels.&lt;br /&gt;
* We recommend that the fiducial points, '''nasion, left preauricular point, right preauricular point''' be digitized. If you do not digitize them, BESA Research will simulate these locations (see ''“Example: Digitization points with and without Fiducials”''). Fiducial points, labeled '''FidNz, FidT9, FidT10''' should be the first three coordinates in the ''sfp'' file.&lt;br /&gt;
* As with the channel definition files, it is easiest for BESA Research if you name the ''sfp/sfn'' files using the base name of the data file, e.g. if the data file is named &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.avr'''&amp;lt;/span&amp;gt;, name the'' sfp'' file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.sfp'''&amp;lt;/span&amp;gt; and the ''sfn'' file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.sfn'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* You specify the files to be read in the ''Channel and digitized head surface point information dialog box.''&lt;br /&gt;
&lt;br /&gt;
See ''“Example: Polhemus Digitizer Data” ''for a discussion of how to format the files originating from Polhemus and other digitizers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. EEG file containing labels, ''sfp'' file containing coordinates, ''sfn ''file containing coordinate names'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;, contains the channel labels. Therefore, we don’t need a channel definition file.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;, contains digitized coordinates of electrodes and of additional surface points. The labels in the file do not correspond to the electrode labels in the ''avr ''file.&lt;br /&gt;
* The ''sfn'' file contains the corrected labels (1 line for each corresponding line in the'' sfp'' file). Now it is possible to match up electrode labels with the labels in the ''avr ''file.&lt;br /&gt;
* Open the data file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;. The ''Channel and digitized head surface point information dialog box'' will open automatically.&lt;br /&gt;
* Note the green tick mark at the top right of the dialog box. This is feedback to say that coordinates of all 32 electrodes have been found.&lt;br /&gt;
* Look at the entry ‘''Digitized head surface points’''. Here you will see that the ''sfp'' and the ''sfn ''files have been read automatically (because of the common base name). There are 51 locations. Note that the digitizer file can contain many more locations than the electrodes. BESA Research uses the locations for fitting the sphere of the spherical head model in source analysis. BESA Research can export these locations for coregistration with the MRI.&lt;br /&gt;
* Define the electrode thickness as 6 mm (at the right of the ‘''Digitized head surface points’'' box. This is the distance of the digitized point on the electrode to the surface of the head.&lt;br /&gt;
* Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; in the dialog box and view the coordinates by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt; key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. EEG file without labels, channel labels in ''ela'' file, surface point coordinates and names in ''sfp'' file'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.avr'''&amp;lt;/span&amp;gt;, has no channel label. Therefore, a label file is required. Here, the label file is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.ela'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.sfp'''&amp;lt;/span&amp;gt;, contains digitized coordinates of electrodes and of additional surface points. The labels are defined correctly in the ''sfp ''file, i.e. for every EEG channel label there is a corresponding coordinate. Therefore, no ''sfn'' file is required.&lt;br /&gt;
* When you open the file, don’t forget to define the electrode thickness as 6 mm in the ''Channel and digitized head surface point information dialog box.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Polhemus Digitizer Data === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ EEG+Digitization Points'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
Data from the Polhemus (other digitizers too) may often not fit the format BESA Research requires for the surface point file. Note that Polhemus data can be exported directly into BESA-compatible ''sfp''-files using the LOCATOR software.&lt;br /&gt;
&lt;br /&gt;
BESA Research requires either&lt;br /&gt;
* just the cartesian coordinates (x, y, z) values -- one set of coordinates per line. In this case, labels must be defined in a parallel surface point name file, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0.5 &amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:0cm;margin-right:0cm;&amp;quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the cartesian coordinates plus a label. The label can be in front of or behind the coordinates on the line, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0.5&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68 &amp;amp;nbsp;Fz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:2.54cm;margin-right:0cm;&amp;quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz &amp;amp;nbsp;0.5 &amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68'' &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of a few lines of a (''sfp'') file that are not read correctly by BESA Research:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''Nz&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;87.721&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''T9 &amp;amp;nbsp;-79.131&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''T10&amp;amp;nbsp;&amp;amp;nbsp;67.253&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''1 &amp;amp;nbsp;-34.192 &amp;amp;nbsp;103.374&amp;amp;nbsp;&amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''2&amp;amp;nbsp;&amp;amp;nbsp;23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048 &amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''3&amp;amp;nbsp;&amp;amp;nbsp;-81.179&amp;amp;nbsp;&amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''4 &amp;amp;nbsp;-60.701&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What is wrong?&lt;br /&gt;
&lt;br /&gt;
* First, some of the points are just numbered. These numbers don't tell BESA Research which electrode channel to which the coordinates should be assigned – assignments should be via channel labels and not numbers.&lt;br /&gt;
* Second, Nz, T9, T10 define the fiducials. Instead, the labels FidNz, FidT9, FidT10 are required (prefix &amp;quot;Fid&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What should be done? Probably the best way is&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;a) keep only the coordinates in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp &amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0&amp;amp;nbsp;&amp;amp;nbsp;87.721 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-79.131 &amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''67.253 &amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-34.192&amp;amp;nbsp;&amp;amp;nbsp;103.374 &amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048&amp;amp;nbsp;&amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-81.179 &amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-60.701&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b) prepare a surface point name file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfn&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) containing the corresponding labels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidNz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT9''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT10''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp1''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp2''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F7''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F3''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keeping labels and coordinates separate means that the label file needs generating only once. The coordinate file is different for each subject.&lt;br /&gt;
&lt;br /&gt;
Alternatively, if your digitizer program attaches the labels correctly to the coordinates, then you can prepare the ''sfp'' file like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidNz&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;87.721 &amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''FidT9&amp;amp;nbsp;&amp;amp;nbsp;-79.131&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT10&amp;amp;nbsp;&amp;amp;nbsp;67.253&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp1&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-34.192&amp;amp;nbsp;&amp;amp;nbsp;103.374 &amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp2 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048&amp;amp;nbsp;&amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F7&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-81.179 &amp;amp;nbsp;&amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F3&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-60.701&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Digitization points with and without Fiducials === &lt;br /&gt;
&lt;br /&gt;
We recommend that if electrodes are digitized, you should also digitize the three fiduciary points:''' Nasion''', '''and left and right preauricular points'''. We refer to these points as &amp;quot;fiducials&amp;quot;. We name them '''&amp;quot;FidNz&amp;quot;,''' '''&amp;quot;FidT9&amp;quot;,''' and '''&amp;quot;FidT10&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
If you do not digitize these points, BESA Research will simulate them, i.e. it will generate the points where it expects them to be, based on the fit of a sphere to the existing points, and on the names of surface points of known locations. &amp;quot;Known locations&amp;quot; means: the surface point name must be a 10-20 or 10-10 electrode name (e.g. &amp;quot;Cz&amp;quot; -- arbitrary labels, such as &amp;quot;E10&amp;quot; is not a known location). Therefore, BESA Research requires that at least 3 surface points with known labels are defined.&lt;br /&gt;
&lt;br /&gt;
In a file containing digitization points (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), the fiducials should be the first three sets of coordinates, i.e. the first three lines of the file. The remaining coordinates in the file can be electrode (or other surface point) coordinates, in any order. The assignment of electrode coordinates to data channels is achieved by matching the coordinate labels to data channel labels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Consequences of omitting fiducials'''&lt;br /&gt;
&lt;br /&gt;
When these files have been read into BESA Research, look at the head surface points in 3D using ''File/Head Surface Points'' ''and Sensors/View'' (or use the shortcut &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt;). You will see small differences in fiducial locations between the real and the simulated locations. You can expect very slight influences on the results of source modeling (the spherical head may be rotated slightly, although the head center and radius will be identical), and output of source locations in head coordinates will be different, because these coordinates are based on fiducial locations (see chapter ''“Working with Electrodes and Surface'' ''Locations/ Coordinate systems''”).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ASCII Import === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ASCII Import'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
When should the Import ASCII function be used? If you have data in BESA Research average referenced or multiplexed format, use the Open File function to read in a file directly. If you have data in a different ASCII format, BESA Research offers a flexible import function to import data from an array of numbers in an ASCII file.&lt;br /&gt;
&lt;br /&gt;
The array can be '''vectorized '''(one channel, all time points, per line) or '''multiplexed''' (one time point, all channels, per line). These alternatives are illustrated in the two example files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.asc'''&amp;lt;/span&amp;gt; and &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''multiplexed.asc'''&amp;lt;/span&amp;gt;, and in the tables below:&lt;br /&gt;
&lt;br /&gt;
'''Vectorized array:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|| channel 1, time 1&lt;br /&gt;
|| channel 1, time 2&lt;br /&gt;
|| channel 1, time 3&lt;br /&gt;
|| channel 1, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 2, time 1&lt;br /&gt;
|| channel 2, time 2&lt;br /&gt;
|| channel 2, time 3&lt;br /&gt;
|| channel 2, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 3, time 1&lt;br /&gt;
|| channel 3, time 2&lt;br /&gt;
|| channel 3, time 3&lt;br /&gt;
|| channel 3, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 4, time 1&lt;br /&gt;
|| channel 4, time 2&lt;br /&gt;
|| channel 4, time 3&lt;br /&gt;
|| channel 4, time 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiplexed array:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 1 &lt;br /&gt;
|| channel 2, time 1&lt;br /&gt;
|| channel 3, time 1&lt;br /&gt;
|| channel 4, time 1&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 2&lt;br /&gt;
|| channel 2, time 2&lt;br /&gt;
|| channel 3, time 2&lt;br /&gt;
|| channel 4, time 2&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 3&lt;br /&gt;
|| channel 2, time 3&lt;br /&gt;
|| channel 3, time 3&lt;br /&gt;
|| channel 4, time 3&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 4&lt;br /&gt;
|| channel 2, time 4&lt;br /&gt;
|| channel 3, time 4&lt;br /&gt;
|| channel 4, time 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA Research needs channel labels. If the labels are in the 10-20 or 10-10 system, BESA Research will assign the channels default coordinates. This is the minimum requirement to be able to map EEG.&lt;br /&gt;
&lt;br /&gt;
If you have 3D digitized coordinates, these can also be specified in ASCII files. This is described under the chapter “[[Electrodes_and_Surface_Locations#Example:_EEG_with_Digitized_Coordinates | Example: EEG with Digitized Coordinates]]”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. Vectorized data'''&lt;br /&gt;
&lt;br /&gt;
* The file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.asc'''&amp;lt;/span&amp;gt; contains the data. The file should be imported via ''File/Import ASCII File''.&lt;br /&gt;
* First you will be asked for a name for the binary target file. The name &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.fsg'''&amp;lt;/span&amp;gt; is suggested. You may accept this name by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; or choose an alternative name. Note that if the file already exists, the imported data will be appended to the file.&lt;br /&gt;
* Next, the ''ASCII File Properties dialog box'' will open. First select ''‘Vectorized’'', and make sure the subsequent entries are correct:&lt;br /&gt;
&lt;br /&gt;
:: Header Lines = 0 (i.e. in this example the numbers start on the first line)&lt;br /&gt;
:: Bins/Microvolt = 1.0 (i.e. a value 1 in the data represents 1 µV)&lt;br /&gt;
:: Sampling Rate = 320 Hz (When the dialog box is opened, BESA Research always chooses the setting it used previously)&lt;br /&gt;
:: Number of channels = 32 (the number of rows in the matrix)&lt;br /&gt;
:: Number of Samples = 640 (the number of columns in the matrix)&lt;br /&gt;
:: Prestimulus Time = 1000 ms (defines the zero time point 1 s after the beginning)&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to accept the settings.&lt;br /&gt;
* Next, the ''Channel and digitized head surface point information dialog box'' will open. In the ''‘Channel configuration’'' box, the label file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.ela'''&amp;lt;/span&amp;gt;, will be detected automatically. Automatic detection occurs when the label file has the same base name as the data file (in this case, vectorized). To the right of the file name is a summary of channel types: 32 channels found, 30 are EEG, 1 is intercranial, 1 is polygraphic.&lt;br /&gt;
&lt;br /&gt;
Note the green tick at the top left of the dialog box. This indicates that BESA Research thinks that it has sufficient information to read the file, and map and do source analysis on the data.&lt;br /&gt;
&lt;br /&gt;
* To see how channel types are specified in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.ela'''&amp;lt;/span&amp;gt;, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit '''&amp;lt;/span&amp;gt;button to view the file with the Notepad program. Here you will see that most channels have 10-20 electrode names. Channel 3 has the prefix ‘''POLY''’, specifying that this channel is polygraphic. Channel 31 has the prefix ‘''ICR''’, specifying that this channel is intercranial. Close Notepad, and click ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;’ in the dialog box.&lt;br /&gt;
* A final dialog box asks for a Segment Comment. This is a label that will be displayed in the resulting file. The label is particularly useful if you import several ASCII files into one target file. Each segment is then easily identified by its own label.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. Multiplexed data'''&lt;br /&gt;
&lt;br /&gt;
* This example is similar to Example 1. In this case, import the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''multiplexed.asc'''&amp;lt;/span&amp;gt;, and select ‘Multiplexed’ in the ''ASCII File Properties dialog box''. Other settings in the dialog box stay as they were.&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
# The numbers in the source files can be split into several lines per channel or per time point. Then you will have to enter the correct number of time points and channels in the dialog box. In the present examples, the lines are not split (the vectorized file has all 640 time points in each line, and the multiplexed file has all 32 channels in each line). In this case, BESA Research selects the correct numbers of time points and channels automatically.&lt;br /&gt;
# If you have digitized coordinates, these can be specified in the Channel and digitized head surface point information dialog box. Since the procedure is the same as when reading data, this is described elsewhere under “''Example: EEG with Digitized Coordinates''”.&lt;br /&gt;
&lt;br /&gt;
=== MEG ASCII === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the'' \Examples\Xtras\ MEG ASCII'' subdirectory of the BESA Research installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiplexed MEG ASCII file with labels in the header (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;''med.mul''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;)'''&lt;br /&gt;
&lt;br /&gt;
For reading MEG data, BESA Research expects&lt;br /&gt;
* Correct channel definitions, i.e. channels should be defined as MEG.&lt;br /&gt;
* Head surface points.&lt;br /&gt;
* Sensor coordinates, in '''the same coordinate system''' as the head surface points.&lt;br /&gt;
* Optionally, you can define the coordinates of the center of the head. This will be important if too few head surface points are available to specify where to place the spherical head used by BESA Research for source modeling, or if you want to use some external definition, e.g. from the MRI.&lt;br /&gt;
&lt;br /&gt;
As with digitized EEG coordinates, we use the ''Channel and digitized head surface point information'' ''dialog box'' to specify the files which need to be read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. File Open'''&lt;br /&gt;
* The file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.mul'''&amp;lt;/span&amp;gt;, contains MEG data in the ASCII multiplexed format. This format contains channel labels. The labels used are recognized by BESA Research as originating from the Neuromag system. They are therefore identified as MEG and do not need further identification.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.sfp'''&amp;lt;/span&amp;gt;, defines fiducials and head surface points. Coordinate labels are included in the file, so no'' sfn'' file is required.&lt;br /&gt;
* The cot file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.cot'''&amp;lt;/span&amp;gt;, defines the coordinates of the head center. If this were missing, BESA Research would compute the head center based on the sphere that best fits the head surface points.&lt;br /&gt;
* The ''pos'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.pos'''&amp;lt;/span&amp;gt;, defines the coordinates of the 122 sensors. For the Neuromag system there are 9 values per line, defining primary coil location, secondary coil location, and orientation cosines. The sequence of coordinates in the ''pos'' file '''must''' match the sequence of MEG channels! The file format and locations of the primary and secondary coils allow BESA Research to identify the sensor type as planar gradiometers. If the file had only six values per line, BESA Research would classify the sensors as magnetometers (one primary coil and the orientation cosines).&lt;br /&gt;
* Open the file, selecting current file type as ''‘*,m''??’. The ''Channel and digitized head surface point'' ''information dialog box'' will open, displaying the different auxiliary file names. The green tick indicates that BESA Research finds everything to be OK.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; button and then the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''' ‘V’ '''&amp;lt;/span&amp;gt;key to view the coordinates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. File Import'''&lt;br /&gt;
* The file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCIIimport.asc'''&amp;lt;/span&amp;gt;, contains MEG data in a multiplexed array, without a header. This needs to be imported using ''File/Import ASCII'' (see ''“Example: ASCII Import”).''&lt;br /&gt;
* On import you have to specify the file as ‘Multiplexed’, the number of time points (285), the number of channels (132), the bins/µV (or bins/fT) (=1), the time at which the stimulus occurred (50 ms), and the sampling rate (949.667 Hz).&lt;br /&gt;
* This format contains no channel labels. The labels in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''ME&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;GASCIIimport.ela'''&amp;lt;/span&amp;gt; are recognized by BESA Research as originating from the Neuromag system. They are therefore identified as MEG and do not need further identification.&lt;br /&gt;
* Since it recognizes the channels as MEG, the ''Channel and digitized head surface point information dialog box'' will open, displaying the different auxiliary file names as before. Since all necessary files with the same base name as the data file are supplied, they are read automatically.&lt;br /&gt;
* Press the ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK’'''&amp;lt;/span&amp;gt; button, enter a segment name, and then the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt; key to view the coordinates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3. File Open -- MEG information recorded elsewhere'''&lt;br /&gt;
&lt;br /&gt;
This example illustrates the case where the auxiliary files have a different base name from the data file: you must select the file name in the ''Channel and digitized head surface point information dialog box''.&lt;br /&gt;
&lt;br /&gt;
* Open the file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCIIelsewhere.mul'''&amp;lt;/span&amp;gt;. It is read as an MEG magnetometer file.&lt;br /&gt;
* In the ''Channel and digitized head surface point information dialog box'', specify&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.sfp'''&amp;lt;/span&amp;gt; for the head surface points, and&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.pos'''&amp;lt;/span&amp;gt; for the MEG sensors&amp;lt;/div&amp;gt;&lt;br /&gt;
* MEG coordinates will be correct. The sensor definition file specifies the sensors as planar gradiometers.&lt;br /&gt;
* Where the auxiliary files came from will be recorded in the database. If you open the file again, the auxiliary files will be found automatically, without asking any questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reading combined EEG and MEG from an ASCII file === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''Examples\Xtras\MEG+EEG'' subdirectory of the BESA Research installation folder.&lt;br /&gt;
&lt;br /&gt;
Here are two examples containing mixed MEG, EEG, and polygraphic channels:&lt;br /&gt;
* Open a file using the ''File/Open'' command&lt;br /&gt;
* Import a file using ''File/Import ASCII'' command&lt;br /&gt;
&lt;br /&gt;
In both cases&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file defines the channel labels. Based on the labels, BESA Research knows which channels are EEG and MEG. The remainder are classified as polygraphic channels.&lt;br /&gt;
* The &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file defines the MEG sensor coordinates. The number of values on a line of this file (=9) defines the MEG as gradiometers. The relative locations of primary and secondary coils identify the gradiometers as planar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Example with ''File/Open'''''&lt;br /&gt;
* Open the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.mul'''&amp;lt;/span&amp;gt;. The ''Channel and digitized head surface point information dialog box'' will open automatically (unless the file has already been read once and the information is in the database).&lt;br /&gt;
* You will see under ''‘internal data file information’'' that BESA Research finds 122 MEG sensors, and 162 channels in all.&lt;br /&gt;
* Under ‘''Channel configuration’'', you will see that as a result of reading the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.ela'''&amp;lt;/span&amp;gt;, 32 channels are defined as EEG, and 8 channels as polygraphic.&lt;br /&gt;
* Under ‘''Digitized head surface points’'' is the feedback that out of the 51 locations in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.sfp'''&amp;lt;/span&amp;gt;, all electrode locations have been defined.&lt;br /&gt;
* Under ‘''MEG sensors’'', the sensors have been identified as gradiometers.&lt;br /&gt;
* The green tick at the top right of the window indicates that BESA Research classifies everything as OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Example with ''File/Import ASCII'''''&lt;br /&gt;
* Import the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEGimport.asc'''&amp;lt;/span&amp;gt;. Select &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEGimport.fsg '''&amp;lt;/span&amp;gt;as the target file (see ''“Example: ASCII Import”'').&lt;br /&gt;
* Select 320 Hz sampling rate, and 500 ms pre-stimulus time. Other selections in the dialog box should be ‘Multiplexed’, 1 bin/microvolt (this is interpreted as 1 bin/fT for MEG), 162 channels and 320 samples.&lt;br /&gt;
* The ''Channel and digitized head surface point information dialog box'' will open as above.&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Electrodes_and_Surface_Locations</id>
		<title>Electrodes and Surface Locations</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Electrodes_and_Surface_Locations"/>
				<updated>2021-05-05T09:41:44Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 6.1 or higher&lt;br /&gt;
}}&lt;br /&gt;
= Working with Electrodes and Surface Locations =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Here you will find out how BESA Research works with electrode and MEG sensor coordinates and labels, and how head surface points can be used to improve source modeling and coregistration of source models with the MRI. In most cases, electrode positions are sufficiently defined by their labels. The section &amp;quot;''Electrode Conventions''&amp;quot; lists the standard position which BESA Research assigns to EEG channels. In some cases, especially for larger electrode arrays or for MEG measurements, additional information is required to add sufficient information for mapping and for source analysis. The additional information is supplied in additional, auxiliary files which are read by BESA Research and associated with the data files. The auxiliary files, and how they are supplied to BESA Research, are described in this chapter.&lt;br /&gt;
&lt;br /&gt;
Examples for using auxiliary files to define the 3D locations of electrodes are found in the [[Electrodes_and_Surface_Locations#Examples|Examples]] section .&lt;br /&gt;
&lt;br /&gt;
Descriptions of file formats that BESA Research uses are given in the online help chapter [[Working_With_Additional_Files|Working With Additional Files]].&lt;br /&gt;
&lt;br /&gt;
== Working with auxiliary files ==&lt;br /&gt;
&lt;br /&gt;
Data files come with varying amounts of prior information about electrode/sensor locations, depending on the recording system. BESA Research allows you to read auxiliary files that define additional information, such as channel labels, and coordinates of the electrodes, sensors, and other head surface points. The information is required for mapping and for source montages.&lt;br /&gt;
* '''Mapping.''' BESA Research uses spherical spline mapping. For this, electrode/sensor locations are projected onto a sphere. The minimum requirement is 10-10 or 10-20 labels: if only channel labels are available without additional information, BESA Research uses default spherical coordinates.&lt;br /&gt;
* '''Source modeling'''. Spherical coordinates of electrode locations are sufficient, but digitized locations are better. Digitized locations can be defined in the data file or in auxiliary files. BESA Research will use digitized head surface points (electrodes + additional points) to fit a sphere for the spherical model. Points anterior to the left and right preauricular points and below the plane formed by these points and the nasion are excluded when fitting the sphere.&lt;br /&gt;
&lt;br /&gt;
Files can also be written, for instance for&lt;br /&gt;
* '''Source modelling with MRI coregistration'''. BESA Research allows for the export of surface points in a special format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''sfh'''&amp;lt;/span&amp;gt; file) which can be read by the BESA MRI (or BrainVoyager) program. These are fitted to the head surface defined by BESA MRI (or BrainVoyager) in order to define rotation, translation, and deformation parameters required to coregister the coordinate systems (see &amp;quot;''Integration with MRI and fMRi''&amp;quot;).&lt;br /&gt;
* '''Export of coordinates.''' Electrode, other surface point locations, and MEG sensor coordinates and other surface point locations can be written to ASCII files so that they can be reread when reading other files into BESA Research (e.g. ASCII files), or used by other programs.&lt;br /&gt;
&lt;br /&gt;
Feedback and control over how these files are read is provided by&lt;br /&gt;
* '''the Channel and digitized head surface point information dialog box.''' This dialog is usually opened when you open a file for the first time. It allows you to specify the names of auxiliary files, and it makes initial checks on the files to see whether they are consistent with each other and with the data file. If the check is OK, you will see a green tick at the top right hand corner of the dialog box. If there are inconsistencies, the tick is replaced by a red exclamation mark. In this case, you will usually need to edit the auxiliary files or specify other files. The dialog box is not opened if the file is recognized to contain all the necessary information (files with the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''foc'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''fsg'''&amp;lt;/span&amp;gt; extensions), or if the program only finds a channel definition file (with extensions &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''ela, elp,'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''elb'''&amp;lt;/span&amp;gt;). The dialog box is not opened if the data file has been opened before. You can always open the dialog box manually by specifying ''&amp;quot; File / Head Surface Points and Sensors/Load Coordinate'' ''Files.''&lt;br /&gt;
* '''The log file''' (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*_LoadFile.log&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;)'''.''' Coordinating the information between the data file and its auxiliary files can be a complex procedure. To help you check whether the coordination is being done properly, if you select the menu entry ''&amp;quot; Options / File / Generate Log &amp;quot;'' during File Open, BESA Research writes a log file with the same base name as the data file, appending &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_LoadFile.log'''&amp;lt;/span&amp;gt;&amp;quot; to the base name, recording which files have been read, and some of the parameters that have been found. This file is created every time auxiliary files are read (e.g. on file open, when reading in channel configuration files, head surface point files, MEG sensor locations), or changed (&amp;quot;''Edit /'' ''Channel Configuration''&amp;quot;).&lt;br /&gt;
* '''The log window. '''If there are inconsistencies during the processing of auxiliary files and 3D coordinates, a logging window is opened showing the information that would be written to the log file. You can read what has been done to help diagnose the problems. Select '''OK''' to continue in spite of the problems, or''' Reset''' to reject. Typing '''Reset''' also deletes the database files associated with the current data file, thus allowing you to start reading this file from scratch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA Research remembers which auxiliary files are associated with the current file'''. When a data file is first opened, and BESA Research finds auxiliary files with the same base name as the data file, you will be asked if you want this file to be read. The decision you make will be recorded in the database for this data file. Next time the file is opened, the files will or will not be read, according to your previous decision. Similarly, when an auxiliary file is read using the menu, this is recorded in the database, and the file will be opened automatically next time the data file is opened. To override previous decisions, you must delete the database files (see the''' log window '''above) or change the entries in the Channel and digitized head surface point information dialog box (see the chapter ''&amp;quot;Electrode Conventions / Channel and digitized head surface point information dialog box''&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Coordinate systems ==&lt;br /&gt;
&lt;br /&gt;
We need to deal with four different coordinate systems. These differ in how the x, y, and z axes are defined, and in the units of measurement (e.g. mm, cm, m). The first three are illustrated in the following figure:&lt;br /&gt;
&lt;br /&gt;
[[File:ST_Electrodes_(1)_02.png|800px]]&lt;br /&gt;
&amp;lt;!-- [[Image:ST Electrodes (1).gif ]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Device coordinates.''' These are the coordinates used by the recording system. The axes may be anywhere in relation to the head. For instance, in the Polhemus digitizer, the axes go through the magnetic field transmitter which is located somewhere outside the head. The units of measurement may be millimeters, centimeters, or meters.&lt;br /&gt;
&lt;br /&gt;
'''Head coordinates'''. This coordinate system is defined by reference points on the head known as ''fiducials''. The reference points are normally the nasion (Nz, NAS), the left preauricular point (T9, LPA), and the right preauricular point (T10, RPA). The x axis is defined by the line joining T9 and T10, positive towards T10. The y axis is defined by the line through Nz that is perpendicular to the x axis (positive towards Nz). The z axis is perpendicular to the x and y axes, and goes up out of the head in the vicinity of Cz. The units of measurement may be millimeters, centimeters, or meters. In BESA Research these are labelled with the prefix 'Fid', e.g. 'FidT9', 'FidNz'.&lt;br /&gt;
&lt;br /&gt;
'''BESA Research coordinates.''' For dipole analyses the head model consists of a sphere. In the default situation where no digitized sensor information is available, the center of the sphere is defined by the crossing point between the lines joining T7 (=T3) and T8 (=T4) and Fpz and Oz.. The x axis is the T8-T7 line, positive at T8. The y axis is the Oz-Fpz line, positive at Fpz. The z-axis goes up out of the head through Cz. If digitized information is available, the axes are defined by the best fit between the idealized electrode locations and the real locations. The diameter of the sphere is also defined by the best fit. Units given in the display are in millimeters.&lt;br /&gt;
&lt;br /&gt;
The '''center of the spherical model''' is on average about 4 cm above the origin of the Head Coordinates. If digitized surface points are available, the sphere is fitted to these points. Using a cot file, it is possible to override the fit and define your own head center. In conjunction with BrainVoyager, you can use the MRI to seed the location of the head center (e.g. a fixed distance anterior to the posterior commissure) and save it as a cot file. Using MRI coregistration (see &amp;quot;''Integration with MRI and'' ''fMRi''&amp;quot;), the center is placed between the anterior (AC) and posterior (PC) commissures, at the half-way point between the anterior and posterior points (AP and PP). Without coregistration, the center corresponds to a point 17.5 mm behind AC in the standard MRI head.&lt;br /&gt;
&lt;br /&gt;
'''MRI coordinates.''' These are the coordinates used by BrainVoyager. These are defined by the MRI slices. Measurement units are millimeters.&lt;br /&gt;
&lt;br /&gt;
== The Channel and Digitized Head Surface Point Information Dialog Box ==&lt;br /&gt;
&lt;br /&gt;
Many data formats read by BESA Research require additional information about data channel, which are specified by additional, auxiliary files. This dialog box allows you to specify which auxiliary files are read in to supplement the information in the data file.&lt;br /&gt;
&lt;br /&gt;
The dialog box is opened automatically the first time a data file is opened, if&lt;br /&gt;
* auxiliary files other than a channel definition file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elb&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) are found&lt;br /&gt;
* no auxiliary files are found, and the data file was not written in compressed binary format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.foc&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.fsg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) by BESA Research &lt;br /&gt;
&lt;br /&gt;
When a data file is closed, the information about which auxiliary files have been read is stored in the database. When the file is opened for a second time the dialog box is not opened automatically, because the information is assumed to be correct – the files are read automatically.&lt;br /&gt;
&lt;br /&gt;
The dialog box can be opened manually by selecting &amp;quot;''File / Head Surface Points and Sensors / Load Coordinate Files''&amp;quot;, or using the shortcut &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''ctrl-L'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (2).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dialog box is divided into several sections:&lt;br /&gt;
&lt;br /&gt;
* '''Internal data file information.''' Here you can see the file name, the originating system (file format), the name of the database file, if any, and the channel information as specified by the data file alone.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (4).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Suggestions.''' This box makes suggestions about what needs to be filled in, e.g. &amp;quot;Please enter electrode thickness&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (5).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Main feedback (top right hand corner).''' A green tick indicates that the currently selected data files are consistent among themselves and with the data file. A red exclamation mark indicates an inconsistency. Check the feedback texts in the subsequent sections for more information:&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (8).gif|70px]] [[Image:ST Electrodes (7).gif|71px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Channel configuration file specification.''' If the channel labels and types defined in the data file (&amp;quot;Internal data file information&amp;quot;) need to be changed, enter a file name here (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elb&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If a channel definition file exists with the same basename as the data file, or if a channel definition file has been specified previously (database entry exists), it will be selected automatically. To the right of the file name, feedback is provided about the number of channels and channel types found. If the labels are consistent with the data file, to the right the text &amp;quot;Good&amp;quot; is shown. If they are inconsistent, e.g. the file contains the wrong number of channel definitions, the text &amp;quot;Bad&amp;quot; is shown.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (9).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Digitized head surface point specification.''' Here you may specify a file containing digitized electrode and other head surface points. Optionally, the information can be split into two files, containing the coordinates (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp, *.eps&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the coordinate names (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.sfn'''&amp;lt;/span&amp;gt;). Alternatively, both labels and names can be contained in the coordinate file. If the files specify electrode coordinates, there '''must''' be a coordinate name for each electrode. The sequence may be different. BESA Research will use the names to assign each coordinate to the electrodes. Additional head surface points can have any other names. It is recommended that the first three digitized coordinates are the fiducials (fiduciary points), labelled &amp;quot;FidNz&amp;quot;, &amp;quot;FidT9&amp;quot;, &amp;quot;FidT10&amp;quot;. If your electrode labels not follow the 10-10 or 10-20 standard (e.g. in high-density electrode recordings), it is recommended to tick the box '''&amp;quot;Electrode labels non-conforming to 10-10 standard&amp;quot;'''. This will prevent BESA Research from using electrodes for an optimal rotation of the coordinate system which should not be used (e.g. A1, A2 which have known locations in 10-10, but are sometimes used in a nomenclature outside of 10-10). The example below shows the sphere adaption for an example data set with and without taking this into account.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (12).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The right picture shows that when discarding the non-conforming electrodes, the fiducials are correctly placed along the x any y axes.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (10).gif ]] [[Image:ST Electrodes (11).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(In the special case of Neuromag files with electrode channels, the data file contains head surface points with the wrong labels. Here you may provide a label file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfn&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) without a corresponding digitized coordinate file.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Coregistration file.''' Here you may specify a file containing the coordinates of the head center (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.cot&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) or an ''MRI Coregistration File ''(&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). Head center redefinition is only necessary if you want to provide an external definition, e.g. from the MRI. The ''MRI Coregistration File ''is used if the data are to be coregistered with individual MRI. (see &amp;quot;''Integration with MRI and fMRi'' &amp;quot;). '''Note''' that if a head center file (cot file) with the same base name as the data file exists, it will be read automatically if the head center coordinates deviate by more than 1 mm from the internally calculated values. Changes are ignored if the radio button is set to &amp;quot;No&amp;quot;. This automated function allows you to change the head center during a session, using BrainVoyager's view of the MRI and the Source Module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (14).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''MEG sensor specification'''. If the file contains MEG channels, you may enter the name of a sensor coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pmg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). This field is grayed if there are no MEG channels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (15).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Artifact coefficients file.''' If the data are to be artifact corrected, your pre-prepared coefficient file may be defined here. See the chapter &amp;quot;''Artifact Correction''&amp;quot;. Selecting the file here is equivalent to loading the file using the menu entry &amp;quot;''Artifact / Load''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (17).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each of the selected files, make sure the radio button &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Yes&amp;quot;'''&amp;lt;/span&amp;gt; is selected on the left-hand side of the dialog box. If files have been selected automatically, and you do not wish them to be read, select the &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''No'''&amp;lt;/span&amp;gt;&amp;quot; radio button.&lt;br /&gt;
&lt;br /&gt;
If some of the settings are incorrect or the text &amp;quot;Bad&amp;quot; is shown, you may edit the auxiliary files (the file is opened with the NotePad program) or browse for another file by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse'''&amp;lt;/span&amp;gt; buttons.&lt;br /&gt;
&lt;br /&gt;
After you have entered the required information, and the green tick at the top right indicates consistency, press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to continue. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Cancel'''&amp;lt;/span&amp;gt; to ignore the current settings. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear DB'''&amp;lt;/span&amp;gt; to delete the database files. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear Events'''&amp;lt;/span&amp;gt; to delete the tag files (the part of the database that records events). Both &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear'''&amp;lt;/span&amp;gt; buttons close the currently-opened data file.&lt;br /&gt;
&lt;br /&gt;
== General Reading Rules for Data Files and Auxiliary Files ==&lt;br /&gt;
&lt;br /&gt;
Auxiliary files can complement the information in the data file. Here we specify what happens when a data file is opened:&lt;br /&gt;
&lt;br /&gt;
: 1. If the data file has been read previously, the database entry specifies which auxiliary files should be read. The file and the specified auxiliary files are opened and the data are displayed.&lt;br /&gt;
&lt;br /&gt;
: 2. If&lt;br /&gt;
&lt;br /&gt;
:: a) there is a channel definition file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.el?'''&amp;lt;/span&amp;gt;) with the same basename as the data file, and &lt;br /&gt;
&lt;br /&gt;
:: b) this file includes spherical coordinates for the EEG channels (including labels with entries in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; file), and&lt;br /&gt;
&lt;br /&gt;
:: C) there are no other auxiliary files with the same base name, the file will be opened and the data displayed. If files with the same basename are not found, BESA Research will look for files with the basename “default” (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;) in the data folder. If such files are not found, BESA Research will look for files with the basename “default” one folder above (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
: 3. If the data file has been written in binary format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.foc'''&amp;lt;/span&amp;gt;, &amp;lt;span &lt;br /&gt;
style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.fsg'''&amp;lt;/span&amp;gt;) by BESA Research (after Jan. 2000), the file will be read, and all information is assumed to be complete. The file is opened and the data are displayed.&lt;br /&gt;
&lt;br /&gt;
: 4. In all other cases, the ''Channel and digitized head surface point information dialog box'' will be opened for you to specify and check auxiliary files. Auxiliary files with the same base name as the data file will be specified in the text boxes for file names. If files with the same basename are not found, BESA Research will look for files with the basename “default” (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;) in the data directory. If such files are not found, BESA Research will look for files with the basename “default” one directory above (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;). Otherwise the text boxes will be left blank.&lt;br /&gt;
&lt;br /&gt;
: 5. Auxiliary files can be specified at a later time by selecting ''File/Head Surface Points'' and ''Sensors/Load'' ''Coordinate Files''. The ''Channel and digitized head surface point information dialog box'' will be opened.&lt;br /&gt;
&lt;br /&gt;
== Electrodes ==&lt;br /&gt;
&lt;br /&gt;
=== Electrode Conventions ===&lt;br /&gt;
&lt;br /&gt;
BESA Research adheres to the 10/20 and to the new 10/10 standard of the IEF (international EEG Federation). BESA Research will recognize the labels defined by these standards. The labels are stored in most EEG file headers. Otherwise, or in the case of erroneous labeling or sequencing of the recording channels, you may edit the channel labels and/or coordinates, or you may read an electrode file stored previously on disk. In addition to the 10/20 and 10/10 standard labels BESA Research recognizes the following labels: M1, M2 (left, right mastoids), SP1, SP2 (sphenoidal), CB1, CB2 (cerebellar), Chin, Neck, LO1, LO2 (lateral ocular), SO1, SO2 (supra-ocular), IO1, IO2 (infra-ocular). BESA Research will translate all the labels into spherical coordinates for spherical spline interpolation, mapping and source imaging. The following assignments are stored in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; in the BESA folder:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (19).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Electrode labels in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd '''&amp;lt;/span&amp;gt;and their spherical coordinates. 10-20 electrodes are shown in&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt; red and italic.''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The spherical coordinates are defined in degrees by the azimuth (from Cz, positive = right, negative = left hemisphere) and the latitude (counterclockwise from T7/T3 for left and from T8/T4 for right hemisphere) of each electrode. Please do not modify the existing labels or coordinates in this file, because this would adversely affect the interpolated (virtual) montages, the maps and the source montages and source images in BESA Research. However, you may add additional labels for scalp electrodes at the end of this file if needed (up to a total of 196). When you edit the electrode configuration or read in electrode files, BESA Research may replace the 10/20 standard labels T3, T4, T5, T6 by their new 10/10 equivalents T7, &lt;br /&gt;
&lt;br /&gt;
T8, P7, P8. However, in the initialization file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini '''&amp;lt;/span&amp;gt;you can reset to the old 10/20 standard by relabeling T7=T3, P7=T5, T8=T4, P8=T6 under the heading [Electrodes]. You may use the same feature to assign appropriate labels to the X1..X8 channels which exist in many systems, e.g. X1=EKG1 etc.&lt;br /&gt;
&lt;br /&gt;
=== Recommendations for electrode placement ===&lt;br /&gt;
&lt;br /&gt;
For source montages and source analysis two principles are important:&lt;br /&gt;
&lt;br /&gt;
# Covering of the lower head with inferior electrodes to record activity from the inferior surfaces of the brain, especially from the basal temporal lobe, from the temporal pole, from orbito-frontal cortex, and from basal occipital and cerebellar areas.&lt;br /&gt;
# Equal spacing of the electrodes over the whole head to cover all brain areas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following montage EEGxx, the number xx indicates the number of electrodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG25 - Minimum 10-20 configuration including inferior electrodes'''&lt;br /&gt;
&lt;br /&gt;
This covers the 19 standard 10-20 electrodes:&lt;br /&gt;
&lt;br /&gt;
Fp1, Fp2, F7, F3, Fz, F4, F8 ....&lt;br /&gt;
&lt;br /&gt;
plus 6 inferior electrodes on both sides:&lt;br /&gt;
&lt;br /&gt;
F11, A1, P11, F12, A2, P12&lt;br /&gt;
&lt;br /&gt;
with a recommended continuation of the 20% distances, i.e. use F11 instead of F9, P11 instead of P9, A1 instead of T9 to have a wider coverage of the inferior head. A1 / A2 may be replaced by T9 / T10 (or FT9 / FT10) for convenience and comfort.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (21).gif ]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 25 electrodes. Right: left temporal basal activity mapped with 25 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG33 - Additional 10-10 electrodes within the major squares'''&lt;br /&gt;
&lt;br /&gt;
To the above electrodes add the following 8 intermediate electrodes:&lt;br /&gt;
&lt;br /&gt;
FC5, FC1, FC2, FC6, &amp;amp;nbsp;&amp;amp;nbsp;CP5, CP1, CP2, CP6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (23).gif]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 33 electrodes. Right: left temporal basal activity mapped with 33 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG35 - Additional supraorbital electrodes for better EOG separation'''&lt;br /&gt;
&lt;br /&gt;
SO1, SO2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG37 - Wider inferior coverage at interlaced 20% distances'''&lt;br /&gt;
&lt;br /&gt;
Continue 20% down from F7, FC5, CP5, P7 etc. and use the following 8 inferior electrodes instead of 6:&lt;br /&gt;
&lt;br /&gt;
F11, FT9, TP9, P11, &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;F12, FT10, TP10, P12&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG41 – Improved frontal and occipital coverage'''&lt;br /&gt;
&lt;br /&gt;
Additional electrodes halfway between Fz and Fp1 / FP2 and Pz and O1 / O2:&lt;br /&gt;
&lt;br /&gt;
AF1, AF2, &amp;amp;nbsp;&amp;amp;nbsp;PO1, PO2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG43 – Inferior chain with 5 electrodes including A1 / A2'''&lt;br /&gt;
&lt;br /&gt;
F11, FT9, A1, TP9, P11, &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;F12, FT10, A2, TP10, P12&lt;br /&gt;
&lt;br /&gt;
EEG43 represents the widest coverage with relatively even spacing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (25).gif]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 43 electrodes. Right: left temporal polar activity mapped with 43 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG64-256'''&lt;br /&gt;
&lt;br /&gt;
With 64 or more channel caps, it is similarly recommended to use a sufficient number of inferior electrodes all around the head. At least 4 inferior temporal electrodes on each side and additional electrodes above or below the eyes (outside of the cap) are suggested.&lt;br /&gt;
&lt;br /&gt;
=== Editing the channel configuration ===&lt;br /&gt;
&lt;br /&gt;
Only use the channel configuration editing facility if the electrodes or the common reference have not been correctly defined by your digital EEG system, or if you want to define specific spherical coordinates for your scalp electrodes. It is your responsibility to check and provide the correct sequence of electrode labels in correspondence with the sequence of channels in the EEG data file. If these sequences do not match exactly, errors will occur in the computation of maps, source images and interpolated montages.&lt;br /&gt;
&lt;br /&gt;
We will use the example EEG file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg'''&amp;lt;/span&amp;gt; in the subdirectory ''Examples/EEG-Focus'' of the BESA Research directory to explain the editing of electrode labels and coordinates:&lt;br /&gt;
&lt;br /&gt;
1. Select ''File'', then click on ''Open'', or click on &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg '''&amp;lt;/span&amp;gt;if this file is contained in the list of currently selected EEG files.&lt;br /&gt;
&lt;br /&gt;
2. Select ''Edit'', then click ''Channel Configuration''. The dialog box shown below will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (27).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the upper left of the figure you see the dropdown menu after selecting the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File '''&amp;lt;/span&amp;gt;menu in the dialog box. This menu allows to edit a new ('''''New''''') or an existing ('''''Open''''') electrode file and to save the changes to the same ('''''Save''''') or a different ('''''Save As''''') file. Normally, it will not be necessary to use this menu. The control fields on the right will be sufficient. If you type ''''''Ok'''''', you will be given the option of saving the changes to a file.&lt;br /&gt;
&lt;br /&gt;
3. Click on &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Reload org. &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Labels'''&amp;lt;/span&amp;gt; to reread the original labels as stored in the file header of &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg'''&amp;lt;/span&amp;gt;. BESA Research quits editing and redisplays the EEG. Repeat step 2 and select &amp;quot;''Edit / Channel'' ''Configuration''&amp;quot; again. Note: The button &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Reload org. Labels'''&amp;lt;/span&amp;gt; is not available if there are no labels in the file header.&lt;br /&gt;
&lt;br /&gt;
4. Click on the empty space of the scroll bar below the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''scroll '''&amp;lt;/span&amp;gt;button and on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''down arrow'''&amp;lt;/span&amp;gt; of the '''scroll bar''' to display the remaining electrodes in the file.&lt;br /&gt;
&lt;br /&gt;
5. Click on electrode '''R''' (line 32), then on the button &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Delete Electrode'''&amp;lt;/span&amp;gt; to remove the associated channel, which does not contain any signal. Note that you may not omit intermediate channels, even if they do not exhibit signals, because the correct correspondence between the series of electrodes and the EEG channels will not be maintained. Use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;quot;Edit / Bad Channels&amp;quot;'''&amp;lt;/span&amp;gt; menu to disable artifactual or empty channels.&lt;br /&gt;
&lt;br /&gt;
6. Click on''' EOG''' (line 30) and change the entry to '''EOG1'''. Do not type &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;lt;Enter&amp;gt;,'''&amp;lt;/span&amp;gt; but click on the next or a different electrode box to accept the changes.&lt;br /&gt;
&lt;br /&gt;
7. '''Double click''' on '''EOG '''(line 31). This will highlight the entry. Simply type the new name '''EOG2''', and note that the old label is replaced when highlighted. Electrodes '''30 '''and '''31 '''are now defined as distinct electrodes. Next, we want to replace the label '''T10 '''by '''A2'''.&lt;br /&gt;
&lt;br /&gt;
8. Click on the label '''T10''' (line 24). Then click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''drop down'''&amp;lt;/span&amp;gt; arrow right of the highlighted label to obtain the list of default scalp electrodes (read from &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; and sorted alphabetically). Type '''A''' to jump to the electrodes beginning with letter A (see below). Type '''2''' or '''click''' on '''A2''' in the list. Click on the '''type '''box (Scalp channel) to close the list and display the new entry in line 24. Note that this is the most convenient way to edit an electrode label.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (28).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Exercise: repeat step 8 to replace '''T9''' by '''A1'''. Restore labels '''T10''' and '''T9''' in lines 24 and 21.&lt;br /&gt;
&lt;br /&gt;
10. Replace SO1 and SO2 (supra-orbital) by '''PSO1 '''and '''PSO2 '''and note that these electrodes are changed to the''' 'Polygraphy'''' type, because no coordinates are associated with these labels.&lt;br /&gt;
&lt;br /&gt;
11. After you click &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''OK''''&amp;lt;/span&amp;gt;, the box '''Write Channel Configuration File''' will appear and display a name for the current electrode file. By default, the BESA electrode file path and current file name will be used and supplemented by the extension &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''''.elb''''&amp;lt;/span&amp;gt;. The electrode file path may be set in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini'''&amp;lt;/span&amp;gt; file [Defaults] section under ElectrodeFilePath. If no electrode file path is specified in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini'''&amp;lt;/span&amp;gt; file, the default electrode file path ''Montages\Channels ''is used. Simply click '&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;' or type &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;lt;Enter&amp;gt; '''&amp;lt;/span&amp;gt;to save the changes to this file, or select a new file name and/or path, if you do not want to store the electrode file in the BESA Research electrode file directory.&lt;br /&gt;
&lt;br /&gt;
Note that by using the default 10/10 labels (see chapter &amp;quot;''Electrode conventions''&amp;quot;) you specify that the associated electrode is a scalp electrode. Hence, different labels must be used for polygraphic, intracranial or MEG channels. After you have entered a new non-scalp label, you may select the type of the electrode/channel amongst the different groups ('''Polygraphy, Intracranial, MEG Channel''') from the drop down list in the ''''''Type'''''' box. This will allow for using separate selection and scaling facilities of the channel group control push-buttons at the right of the screen ('''All, Scp, Pgr, Icr, MEG'''). If you have entered a new non-scalp label and select the type '''Scalp Channel''', or if you click on the ''''Advanced&amp;gt;&amp;gt;'''' field, boxes will appear to enter the spherical coordinates (azimuth and latitude) of this electrode (cf. Fig. 6.5). These features may be used to specify non-standard scalp electrodes. Please check the earlier sections of this chapter for electrode conventions. You may view the locations of the scalp electrodes on the head schemes in the mapping window. Select '''Show Electrodes in Maps''' in the &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''View / Options'''&amp;lt;/span&amp;gt;&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (29).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Hint:''' If you want to specify the spherical coordinates of an electrode which is close to a standard electrode, click on the ''''Advanced &amp;gt;&amp;gt;'''' field, enter the label of the standard electrode and append a single quotation mark. This will specify that the electrode is close to the labeled location but has different coordinates. The ''Scalp Channel'' type will not be replaced by '''Polygraphy.''' Then edit '''Azimuth''' and '''Latitude'''. This convention is used by BESA Research when reading electrode coordinate files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''(*.elp'''&amp;lt;/span&amp;gt;), e.g. from the BESA program. The coordinates are read and compared with the default coordinates to assign the closest label. Then a single quotation mark is appended to the label, and the coordinates are assigned as specified in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.elp'''&amp;lt;/span&amp;gt; file. For example, open &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''segm1.eeg'''&amp;lt;/span&amp;gt; in the ''Examples\EEG-Focus'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
Note that the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''segm1.elp '''&amp;lt;/span&amp;gt;is searched for automatically in the directory of the data file when opening the data file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Edit Common Scalp Reference'''&lt;br /&gt;
&lt;br /&gt;
There is a separate line at the bottom in the ''Channel Configuration dialog box'' to enter the label and coordinates of the '''Common Scalp Reference electrode'''. If this is specified and enabled (click on field '''Enabled'''), the information provided by the fact that all scalp electrodes were recorded against a common recording reference will be used for mapping, source imaging and virtual montages. This information will be lost if the common reference has not been specified or if a combination of electrodes has been used as reference during recording. Specify the '''Common Scalp Reference electrode''' only if all electrodes have been referenced to the same single electrode and if a standard 10/10 location has been used for the common recording reference.&lt;br /&gt;
&lt;br /&gt;
'''Note that BESA Research cannot process digital EEG data correctly if there is no common recording reference''', and if different recording references were used for the various scalp electrodes. For intracranial and polygraphic channels different references may be used. It is preferable to use the common reference also for electrode channels near the eyes, because these electrodes provide valuable information for mapping, source imaging and interpolated montages. The traditional bipolar channels (e.g. horizontal and vertical '''EOG''') may be '''reconstructed digitally''' using the ''Selected Channels'' group or user-defined montages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 3D Coordinates for Precise Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction - Working with Digitized 3D Coordinates ===&lt;br /&gt;
&lt;br /&gt;
Working with digitized electrode coordinates usually requires reading in additional (auxiliary) files. The procedure is described in the chapter &amp;quot;''Working with auxiliary files''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Data reading rules for EEG ===&lt;br /&gt;
&lt;br /&gt;
This section explains which additional files are read, or which files have to be read in order to provide the necessary information for mapping and source montages.&lt;br /&gt;
&lt;br /&gt;
Assume file name is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.xxx'''&amp;lt;/span&amp;gt;. datafile is the base name, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.xxx'''&amp;lt;/span&amp;gt; is the extension. Replace the text ''datafile'' by the base name of your own file, and the extension&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;'' xxx''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; by the extension of your own file.&lt;br /&gt;
&lt;br /&gt;
'''Channel definitions for EEG:'''&lt;br /&gt;
&lt;br /&gt;
* '''Labels have 10-10 names''': default locations will be used.&lt;br /&gt;
* '''Labels do not have 10-10 names''': Channels are interpreted as '''polygraphic'''. Mapping is not possible without one or more of the following additional files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Define channel names and types.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elb'''&amp;lt;/span&amp;gt; exist (i.e. files with basename d''efault ''one folder above the data file): Channel names and types will be replaced by those defined in this file, in order of occurrence. The ''ela'' file contains just labels and, optionally, types. The ''elp'' file contains spherical coordinates and can contain labels and types. The ''elb'' file contains the same information in binary format. See chapter &amp;quot;''[[Working_With_Additional_Files#Channel_definition_file_conventions_and_formats|Working with additional files / Channel Definition File Conventions]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define order in which electrodes were digitized.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfn'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; one folder above the data file): electrode names are supplied in the order in which coordinates were supplied in the ''sfp'' file. These names must match with the names supplied in the data file or defined in the ''ela/elp/elb'' file. BESA Research uses this to sort coordinates into the order of channels in the file. If fiducials exist, they should be defined on the first three lines. If they do not exist, BESA Research will simulate them (so that it can define the head coordinate system). See chapter ''&amp;quot;[[Working_With_Additional_Files#sfn_.28surface_point_name.29_file|Working with additional files / sfn (surface point name) file]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define electrode coordinates.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfp'''&amp;lt;/span&amp;gt; exists (i.e. file default.sfp one folder above the data file): electrode coordinates will be replaced/defined by the coordinates defined in this file. If &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; does not exist, labels can also be defined in this file. If fiducials exist, they should be defined on the first three lines. If they do not exist, BESA Research will simulate them. See chapter &amp;quot;''[[Working_With_Additional_Files#sfp_.28surface_point_coordinate.29_file|Working with additional files / sfp (surface point coordinate) file]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define coregistration information.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;sfh'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfh'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfh'''&amp;lt;/span&amp;gt; exists (i.e. file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.sfh '''&amp;lt;/span&amp;gt;one folder above the data file): head center and relative position of the unit sphere with respect to the head coordinate system is determined by the coregistration between EEG and MRI. See online help chapter ''&amp;quot;[[Integration_with_MRI_and_fMRI|Integration with MRI and fMRI]]&amp;quot;''.&lt;br /&gt;
&lt;br /&gt;
'''Define head center.''' No coregistration file exists (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, see above). File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.cot'''&amp;lt;/span&amp;gt; exists (i.e. file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.cot&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;one folder above the data file): head center as computed by fitting a sphere to the surface points is replaced by the head center coordinates contained in this file. See chapter ''&amp;quot;[[Working_With_Additional_Files#cot_.28Head_center.29_file|Working with additional files / cot (Head center) file]]&amp;quot;''.&lt;br /&gt;
&lt;br /&gt;
=== Data reading rules for MEG ===&lt;br /&gt;
&lt;br /&gt;
Assume file name is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''''datafile.xxx''''&amp;lt;/span&amp;gt;. '''datafile''' is the base name. '''xxx''' is the extension. Replace the text '''datafile''' by the base name of your own file, and the extension '''xxx''' by the extension of your own file.&lt;br /&gt;
&lt;br /&gt;
Here we consider cases a) MEG alone, b) MEG+EEG.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Automatic procedure:'''&lt;br /&gt;
&lt;br /&gt;
Labels have names defined in the files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd'''&amp;lt;/span&amp;gt;. Channels are interpreted as MEG. However, sensor locations and head surface point locations must be defined in additional files as described below. Mapping and source analysis are not possible without one or more of the following additional files.&lt;br /&gt;
&lt;br /&gt;
'''Define channel names and types.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elb'''&amp;lt;/span&amp;gt; exist (i.e. files with basename'' default'' one folder above the data file): Channel names and types will be replaced by those defined in this file, in order of occurrence. The'' ela''&amp;amp;nbsp;file contains just labels and (optionally) channel types. The ''elp'' file contains spherical coordinates and can contain labels and types. The'' elb'' file contains the equivalent information in binary format. See chapter “''Electrode file conventions'' ''and formats.”''&lt;br /&gt;
&lt;br /&gt;
'''MEG+EEG.''' Define order in which electrodes were digitized. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfn'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; one folder above the data file): electrode names are supplied in the order in which coordinates were supplied in the ''sfp'' file (or in the location descriptor in the data file: e.g. Neuromag). These names must match with the names supplied in the data file or defined in the ''ela/elp/elb'' file. BESA Research uses this to sort coordinates into the order of channels in the file. See chapter “''Working with additional files/ sfn (surface point name) file”.''&lt;br /&gt;
&lt;br /&gt;
'''MEG+EEG.''' Define head surface point/electrode coordinates. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfp'''&amp;lt;/span&amp;gt;'' ''exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfp'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; one folder above the data file): electrode coordinates will be replaced/defined by the coordinates defined in this file. If &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; does not exist, labels can also be defined in this file. See chapter “''Working with additional files/ sfp (surface point'' ''coordinate) file''”. The labels of electrode coordinates '''must '''match to those defined for the data channels. BESA Research will use the labels to associate coordinates with the correct channel.&lt;br /&gt;
&lt;br /&gt;
'''Define sensor coordinates'''. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.pos'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.pmg'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.pos(.pmg)'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.pos(.pmg)'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.pos(.pmg)'''&amp;lt;/span&amp;gt; one folder above the data file): coordinates are defined in this file. The convention is that'' pos'' files contain gradiometer coordinates and'' pmg'' files contain magnetometer coordinates. This is not necessary for the program to read in values properly: the program makes its decision about the sensor type on the basis of the number of coordinate values on one line in the file (6 = magnetometers, 9 = gradiometers). See chapter “''Working with additional files/ pos or pmg (MEG sensor coordinate) file”.''&lt;br /&gt;
&lt;br /&gt;
'''Define coregistration information.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfh'''&amp;lt;/span&amp;gt; exists, or file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.sfh&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfh'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfh'''&amp;lt;/span&amp;gt; one folder above the data file): head center and relative position of the unit sphere with respect to the head coordinate system is determined by the coregistration of the head coordinates with MRI. See (online) help chapter ''&amp;quot;Integration with MRI and fMRI&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
'''Define head center.''' No coregistration file exists (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, see above). File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.cot'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;one folder above the data file): head center as computed by fitting a sphere to the surface points is replaced by the head center coordinates contained in this file. See chapter ''&amp;quot;Working with additional files / cot (Head center) file&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reading MEG files in ASCII format ===&lt;br /&gt;
&lt;br /&gt;
'''BESA Research uses labeling or channel type definitions to decide whether channels are EEG or MEG. '''Based on the labels defined for the channels, or the type specified by the channel definition file, the program will try to find auxiliary files that define electrode coordinates or MEG sensors.&lt;br /&gt;
&lt;br /&gt;
BESA Research uses four files to make its decision:&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.ela/.elp'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;The channel type defined here overrides definitions in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ecd&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; (below).&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines electrode labels and default spherical coordinates based on the 10-20 and 10-10 naming system&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines labels and default spherical coordinates for the BTi whole-head system&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines labels and default spherical coordinates for the Neuromag whole-head system&lt;br /&gt;
&lt;br /&gt;
If the program finds a label in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;, the channel will automatically be defined as EEG. If not, if it finds a label in one of the other files, the channel will be defined as MEG. If it doesn't find the label anywhere, the channel will be defined as Polygraphic.&lt;br /&gt;
&lt;br /&gt;
The spherical coordinates defined in these files are sufficient for mapping the data. Auxiliary files defining the real sensor coordinates are required for source analysis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Defining default label and coordinate file for a new MEG system'''&lt;br /&gt;
&lt;br /&gt;
When preparing an MEG from a system other than BTi-WHS or Neuromag for import to BESA Research, you should edit either &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd '''&amp;lt;/span&amp;gt;to conform with your system. If sensor files (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos/*.pmg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) are always available for your files, the coordinates in the ''ecd ''files are irrelevant: all you need do is define the labels for your own MEG system or use the labels as already defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Files to prepare for reading in each data file'''&lt;br /&gt;
&lt;br /&gt;
Each auxiliary file should have the same base name as your data file.&lt;br /&gt;
&lt;br /&gt;
'''Define channel labels.''' There are several possibilities:&lt;br /&gt;
* Generate your data file according to the BESA'' avr'' ''format or the ASCII multiplexed format.'' Labels are listed in the second line of the file.&lt;br /&gt;
* Generate a ''label file'' (extension &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.ela'''&amp;lt;/span&amp;gt;) with one MEG channel label per line (matching with your ''ecd ''file as defined above) or with the type &amp;quot;MEG&amp;quot; and a label for each line.&lt;br /&gt;
&lt;br /&gt;
Label definitions are also possible using ''elp'' or ''elb'' files, but the above two solutions are recommended because they are the simplest.&lt;br /&gt;
&lt;br /&gt;
'''Define sensor coordinates.''' Generate a ''pos'' or ''pmg'' file. Make sure that the number of sensors matches with the number of MEG channel definitions in your data file.&lt;br /&gt;
&lt;br /&gt;
'''Define fiducials and other head surface points.''' Generate an ''sfp'' file. The first three lines define the fiducials. Subsequent lines define additional surface points.&lt;br /&gt;
&lt;br /&gt;
'''Define coordinates of the center of the head.''' Generate a ''cot'' file. If this file is absent, BESA Research generates the coordinates by fitting a sphere to the head surface points.&lt;br /&gt;
&lt;br /&gt;
Note that all coordinates should be within the same frame of reference, i.e. the same coordinate system. Units must be in meters, centimeters, or millimeters.&lt;br /&gt;
&lt;br /&gt;
==  Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Defining Channel Labels ===&lt;br /&gt;
&lt;br /&gt;
The files described in these examples can be found in the ''.\Examples\Xtras\EEG+Channel Labels'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
The simplest way to define electrode coordinates is to use BESA Research’s default settings (defined in the file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;). In this case, you only need to provide a list of channel labels. If a channel label is defined in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; (i.e. if the labels belong to the 10-20 or 10-10 system), BESA Research will recognize the channel as EEG, and will allocate 3D coordinates.&lt;br /&gt;
&lt;br /&gt;
Labels are not always supplied correctly in the data file. You can override the internal labels in several ways:&lt;br /&gt;
* Read the data file, and then use &amp;quot;''Edit / Channel Configuration''&amp;quot; to redefine the channels. The configuration is stored in a file with the name &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''basename.elb'''&amp;lt;/span&amp;gt; (for binary data) or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''basename.elp'''&amp;lt;/span&amp;gt; (for ASCII data), where basename is the base name (name without the extension) of your data file.&lt;br /&gt;
* Prepare a label file (with the extension ''ela'') containing a list of labels. This can also specify channel types (e.g. EEG, Polygraphic, Intracranial, MEG).&lt;br /&gt;
* Prepare a file (with the extension ''elp'') containing spherical coordinates of the channels. This is the method used with the previous version of BESA Research. If the file doesn’t contain labels, labels are allocated based on their proximity to the 10-20 or 10-10 definitions in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following examples illustrate the above three methods. The input files are all in ''BESA avr format, ''although these examples apply to all EEG data formats in which only EEG channels exist.&lt;br /&gt;
&lt;br /&gt;
If the data file contains polygraphic or other types of non-EEG channel, the types need to be defined. See the ''EEG+Polygraphic channels example.'' MEG is a special case, because the sensor coordinates need to be defined. See the ''MEG ASCII and the MEG+EEG'' ''examples''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. EEG file containing wrong labels – use ''Edit/Channel Configuration ''to redefine labels'''&lt;br /&gt;
* The'' avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.avr'''&amp;lt;/span&amp;gt;, contains the EEG labels. Channels 4 and 14 have been mislabeled – the labels need to be swapped.&lt;br /&gt;
* Open the file with '''''File/Open''''' (Select file type ''BESA avr''. Find the correct directory ''Xtras\EEG+Channel Labels'').&lt;br /&gt;
* The file should open correctly, displaying 32 channels of EEG.&lt;br /&gt;
* The channel coordinates can be viewed by typing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’ '''&amp;lt;/span&amp;gt;key (make sure the cursor is off). There will be a 3D display of the electrodes. Clicking on an electrode will display the label and the coordinates.&lt;br /&gt;
* In this file, channels 4 and 14 have been mislabeled as P3 and F3. In fact, the labels should be the other way around. We will now correct this:&lt;br /&gt;
* Select '''''Edit / Channel Configuration'''''.&lt;br /&gt;
* Type ‘F3’ into the label for channel 4, and ‘P3’ into the label for channel 14. Then type ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;’. The new channel configuration will be saved in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.elp'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* In the data display, the labels of channels 4 and 14 will now be displayed correctly.&lt;br /&gt;
* Close the file ('''''File/Close''''') and open it again. Note that the labels are still correct. This is because the new channel configuration file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.elp'''&amp;lt;/span&amp;gt;, is read automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. EEG file with no labels – channel labels in auxiliary file'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithoutLabels.avr'''&amp;lt;/span&amp;gt;, has no labels.&lt;br /&gt;
* EEG labels are defined in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithoutLabels.ela'''&amp;lt;/span&amp;gt;. This is read automatically when the file is opened.&lt;br /&gt;
* In this example, labels are correct. Each label in the ''ela'' file is on one line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp1''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp2''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F7''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F3''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''...''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3. EEG file with no labels – channel labels derived from spherical coordinates'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithSphericalCoords.avr'''&amp;lt;/span&amp;gt;, has no labels.&lt;br /&gt;
* Spherical coordinates are defined in the ''elp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithSphericalCoords.elp'''&amp;lt;/span&amp;gt;. This contains spherical coordinates (theta and phi) and no labels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-93 -72''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''92 74''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-97 -40''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-61 -49''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-46 -88''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''62 51''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* When the data file is opened, the ''elp'' file is read automatically, and BESA Research uses the tables in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; to assign channel labels. To indicate that it has assigned user defined coordinates and matched with the closest standard electrode, BESA appends an apostrophe (‘) to each label:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp1’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp2’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F7’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F3’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We advise to assign specific labels as well as spherical coordinates if you want to use your own spherical coordinate system, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''FP1u -90 -72''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 4. EEG file with no labels – channel labels not in basename.el?'''&lt;br /&gt;
* The ''avr ''file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGnoLabelsNoElaFile.avr'''&amp;lt;/span&amp;gt;, has no corresponding ''ela, elp'', or ''elb'' file, i.e. no file with the same base name and the ''el?'' extension.&lt;br /&gt;
* When you open the file, BESA Research will ask for a channel configuration file. The ''File Open'' ''dialog ''will select the ''directory .\Montages\Channels''. The idea is that standard (= frequently used) electrode configurations should be kept in this directory.&lt;br /&gt;
* Select the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''XtrasExample.ela'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* Close the data file and reopen it. The file will open with the correct labels. In the BESA window title you will see that the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGnoLabelsNoElaFile.elp'''&amp;lt;/span&amp;gt; has been read automatically. This file was created when &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''XtrasExample.ela'''&amp;lt;/span&amp;gt; was read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Mixed EEG and Polygraphic Data === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ EEG+Polygraphic'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
The data are in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEG+Polygraphic.avr'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The third channel is defined as polygraphic in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEG+Polygraphic.ela '''&amp;lt;/span&amp;gt;file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Fp1 &lt;br /&gt;
 Fp2 &lt;br /&gt;
POLY Test&lt;br /&gt;
 F3 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The prefix &amp;quot;''POLY''&amp;quot; specifies that the channel is polygraphic. Most other channels are interpreted as EEG because the labels are known in the 10-20 system.&lt;br /&gt;
&lt;br /&gt;
Similarly, channel 31 is defined as intercranial, using the prefix &amp;quot;''ICR''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that you can also define channels as EEG by specifying the ''&amp;quot;EEG&amp;quot; ''prefix (e.g. ''&amp;quot;EEG E1&amp;quot;. ''This is useful if there are many more channels than are defined in the 10-10 or 10-20 systems, and if the channel coordinates are defined.&lt;br /&gt;
&lt;br /&gt;
=== EEG with Digitized Coordinates === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the .''\Examples\Xtras\ EEG+Digitization Points ''subdirectory.&lt;br /&gt;
&lt;br /&gt;
In the previous examples, we have illustrated how to assign labels to channels using channel definition files. In those examples, only spherical coordinates were defined. Here we will show how to read digitized surface points into BESA Research, using the surface point (''sfp'') coordinate file and the surface point name (''sfn'') file.&lt;br /&gt;
&lt;br /&gt;
The principles of defining digitization coordinate files are:&lt;br /&gt;
* The labels in the ''sfp/sfn'' file combination are used to assign coordinates to electrodes. Thus, if a coordinate has the name ‘''Fz''’ it will be assigned to the channel with the label ‘''Fz''’.&lt;br /&gt;
* In consequence, digitization of surface points can be in a different order to the sequence of channels in the data file. Matching to channels is done by comparing the labels.&lt;br /&gt;
* We recommend that the fiducial points, '''nasion, left preauricular point, right preauricular point''' be digitized. If you do not digitize them, BESA Research will simulate these locations (see ''“Example: Digitization points with and without Fiducials”''). Fiducial points, labeled '''FidNz, FidT9, FidT10''' should be the first three coordinates in the ''sfp'' file.&lt;br /&gt;
* As with the channel definition files, it is easiest for BESA Research if you name the ''sfp/sfn'' files using the base name of the data file, e.g. if the data file is named &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.avr'''&amp;lt;/span&amp;gt;, name the'' sfp'' file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.sfp'''&amp;lt;/span&amp;gt; and the ''sfn'' file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.sfn'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* You specify the files to be read in the ''Channel and digitized head surface point information dialog box.''&lt;br /&gt;
&lt;br /&gt;
See ''“Example: Polhemus Digitizer Data” ''for a discussion of how to format the files originating from Polhemus and other digitizers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. EEG file containing labels, ''sfp'' file containing coordinates, ''sfn ''file containing coordinate names'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;, contains the channel labels. Therefore, we don’t need a channel definition file.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;, contains digitized coordinates of electrodes and of additional surface points. The labels in the file do not correspond to the electrode labels in the ''avr ''file.&lt;br /&gt;
* The ''sfn'' file contains the corrected labels (1 line for each corresponding line in the'' sfp'' file). Now it is possible to match up electrode labels with the labels in the ''avr ''file.&lt;br /&gt;
* Open the data file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;. The ''Channel and digitized head surface point information dialog box'' will open automatically.&lt;br /&gt;
* Note the green tick mark at the top right of the dialog box. This is feedback to say that coordinates of all 32 electrodes have been found.&lt;br /&gt;
* Look at the entry ‘''Digitized head surface points’''. Here you will see that the ''sfp'' and the ''sfn ''files have been read automatically (because of the common base name). There are 51 locations. Note that the digitizer file can contain many more locations than the electrodes. BESA Research uses the locations for fitting the sphere of the spherical head model in source analysis. BESA Research can export these locations for coregistration with the MRI.&lt;br /&gt;
* Define the electrode thickness as 6 mm (at the right of the ‘''Digitized head surface points’'' box. This is the distance of the digitized point on the electrode to the surface of the head.&lt;br /&gt;
* Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; in the dialog box and view the coordinates by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt; key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. EEG file without labels, channel labels in ''ela'' file, surface point coordinates and names in ''sfp'' file'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.avr'''&amp;lt;/span&amp;gt;, has no channel label. Therefore, a label file is required. Here, the label file is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.ela'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.sfp'''&amp;lt;/span&amp;gt;, contains digitized coordinates of electrodes and of additional surface points. The labels are defined correctly in the ''sfp ''file, i.e. for every EEG channel label there is a corresponding coordinate. Therefore, no ''sfn'' file is required.&lt;br /&gt;
* When you open the file, don’t forget to define the electrode thickness as 6 mm in the ''Channel and digitized head surface point information dialog box.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Polhemus Digitizer Data === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ EEG+Digitization Points'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
Data from the Polhemus (other digitizers too) may often not fit the format BESA Research requires for the surface point file. Note that Polhemus data can be exported directly into BESA-compatible ''sfp''-files using the LOCATOR software.&lt;br /&gt;
&lt;br /&gt;
BESA Research requires either&lt;br /&gt;
* just the cartesian coordinates (x, y, z) values -- one set of coordinates per line. In this case, labels must be defined in a parallel surface point name file, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0.5 &amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:0cm;margin-right:0cm;&amp;quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the cartesian coordinates plus a label. The label can be in front of or behind the coordinates on the line, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0.5&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68 &amp;amp;nbsp;Fz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:2.54cm;margin-right:0cm;&amp;quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz &amp;amp;nbsp;0.5 &amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68'' &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of a few lines of a (''sfp'') file that are not read correctly by BESA Research:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''Nz&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;87.721&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''T9 &amp;amp;nbsp;-79.131&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''T10&amp;amp;nbsp;&amp;amp;nbsp;67.253&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''1 &amp;amp;nbsp;-34.192 &amp;amp;nbsp;103.374&amp;amp;nbsp;&amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''2&amp;amp;nbsp;&amp;amp;nbsp;23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048 &amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''3&amp;amp;nbsp;&amp;amp;nbsp;-81.179&amp;amp;nbsp;&amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''4 &amp;amp;nbsp;-60.701&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What is wrong?&lt;br /&gt;
&lt;br /&gt;
* First, some of the points are just numbered. These numbers don't tell BESA Research which electrode channel to which the coordinates should be assigned – assignments should be via channel labels and not numbers.&lt;br /&gt;
* Second, Nz, T9, T10 define the fiducials. Instead, the labels FidNz, FidT9, FidT10 are required (prefix &amp;quot;Fid&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What should be done? Probably the best way is&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;a) keep only the coordinates in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp &amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0&amp;amp;nbsp;&amp;amp;nbsp;87.721 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-79.131 &amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''67.253 &amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-34.192&amp;amp;nbsp;&amp;amp;nbsp;103.374 &amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048&amp;amp;nbsp;&amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-81.179 &amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-60.701&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b) prepare a surface point name file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfn&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) containing the corresponding labels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidNz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT9''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT10''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp1''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp2''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F7''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F3''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keeping labels and coordinates separate means that the label file needs generating only once. The coordinate file is different for each subject.&lt;br /&gt;
&lt;br /&gt;
Alternatively, if your digitizer program attaches the labels correctly to the coordinates, then you can prepare the ''sfp'' file like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidNz&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;87.721 &amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''FidT9&amp;amp;nbsp;&amp;amp;nbsp;-79.131&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT10&amp;amp;nbsp;&amp;amp;nbsp;67.253&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp1&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-34.192&amp;amp;nbsp;&amp;amp;nbsp;103.374 &amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp2 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048&amp;amp;nbsp;&amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F7&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-81.179 &amp;amp;nbsp;&amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F3&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-60.701&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Digitization points with and without Fiducials === &lt;br /&gt;
&lt;br /&gt;
We recommend that if electrodes are digitized, you should also digitize the three fiduciary points:''' Nasion''', '''and left and right preauricular points'''. We refer to these points as &amp;quot;fiducials&amp;quot;. We name them '''&amp;quot;FidNz&amp;quot;,''' '''&amp;quot;FidT9&amp;quot;,''' and '''&amp;quot;FidT10&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
If you do not digitize these points, BESA Research will simulate them, i.e. it will generate the points where it expects them to be, based on the fit of a sphere to the existing points, and on the names of surface points of known locations. &amp;quot;Known locations&amp;quot; means: the surface point name must be a 10-20 or 10-10 electrode name (e.g. &amp;quot;Cz&amp;quot; -- arbitrary labels, such as &amp;quot;E10&amp;quot; is not a known location). Therefore, BESA Research requires that at least 3 surface points with known labels are defined.&lt;br /&gt;
&lt;br /&gt;
In a file containing digitization points (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), the fiducials should be the first three sets of coordinates, i.e. the first three lines of the file. The remaining coordinates in the file can be electrode (or other surface point) coordinates, in any order. The assignment of electrode coordinates to data channels is achieved by matching the coordinate labels to data channel labels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Consequences of omitting fiducials'''&lt;br /&gt;
&lt;br /&gt;
When these files have been read into BESA Research, look at the head surface points in 3D using ''File/Head Surface Points'' ''and Sensors/View'' (or use the shortcut &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt;). You will see small differences in fiducial locations between the real and the simulated locations. You can expect very slight influences on the results of source modeling (the spherical head may be rotated slightly, although the head center and radius will be identical), and output of source locations in head coordinates will be different, because these coordinates are based on fiducial locations (see chapter ''“Working with Electrodes and Surface'' ''Locations/ Coordinate systems''”).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== ASCII Import === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ASCII Import'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
When should the Import ASCII function be used? If you have data in BESA Research average referenced or multiplexed format, use the Open File function to read in a file directly. If you have data in a different ASCII format, BESA Research offers a flexible import function to import data from an array of numbers in an ASCII file.&lt;br /&gt;
&lt;br /&gt;
The array can be '''vectorized '''(one channel, all time points, per line) or '''multiplexed''' (one time point, all channels, per line). These alternatives are illustrated in the two example files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.asc'''&amp;lt;/span&amp;gt; and &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''multiplexed.asc'''&amp;lt;/span&amp;gt;, and in the tables below:&lt;br /&gt;
&lt;br /&gt;
'''Vectorized array:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|| channel 1, time 1&lt;br /&gt;
|| channel 1, time 2&lt;br /&gt;
|| channel 1, time 3&lt;br /&gt;
|| channel 1, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 2, time 1&lt;br /&gt;
|| channel 2, time 2&lt;br /&gt;
|| channel 2, time 3&lt;br /&gt;
|| channel 2, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 3, time 1&lt;br /&gt;
|| channel 3, time 2&lt;br /&gt;
|| channel 3, time 3&lt;br /&gt;
|| channel 3, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 4, time 1&lt;br /&gt;
|| channel 4, time 2&lt;br /&gt;
|| channel 4, time 3&lt;br /&gt;
|| channel 4, time 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiplexed array:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 1 &lt;br /&gt;
|| channel 2, time 1&lt;br /&gt;
|| channel 3, time 1&lt;br /&gt;
|| channel 4, time 1&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 2&lt;br /&gt;
|| channel 2, time 2&lt;br /&gt;
|| channel 3, time 2&lt;br /&gt;
|| channel 4, time 2&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 3&lt;br /&gt;
|| channel 2, time 3&lt;br /&gt;
|| channel 3, time 3&lt;br /&gt;
|| channel 4, time 3&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 4&lt;br /&gt;
|| channel 2, time 4&lt;br /&gt;
|| channel 3, time 4&lt;br /&gt;
|| channel 4, time 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA Research needs channel labels. If the labels are in the 10-20 or 10-10 system, BESA Research will assign the channels default coordinates. This is the minimum requirement to be able to map EEG.&lt;br /&gt;
&lt;br /&gt;
If you have 3D digitized coordinates, these can also be specified in ASCII files. This is described under the chapter “[[Electrodes_and_Surface_Locations#Example:_EEG_with_Digitized_Coordinates | Example: EEG with Digitized Coordinates]]”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. Vectorized data'''&lt;br /&gt;
&lt;br /&gt;
* The file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.asc'''&amp;lt;/span&amp;gt; contains the data. The file should be imported via ''File/Import ASCII File''.&lt;br /&gt;
* First you will be asked for a name for the binary target file. The name &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.fsg'''&amp;lt;/span&amp;gt; is suggested. You may accept this name by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; or choose an alternative name. Note that if the file already exists, the imported data will be appended to the file.&lt;br /&gt;
* Next, the ''ASCII File Properties dialog box'' will open. First select ''‘Vectorized’'', and make sure the subsequent entries are correct:&lt;br /&gt;
&lt;br /&gt;
:: Header Lines = 0 (i.e. in this example the numbers start on the first line)&lt;br /&gt;
:: Bins/Microvolt = 1.0 (i.e. a value 1 in the data represents 1 µV)&lt;br /&gt;
:: Sampling Rate = 320 Hz (When the dialog box is opened, BESA Research always chooses the setting it used previously)&lt;br /&gt;
:: Number of channels = 32 (the number of rows in the matrix)&lt;br /&gt;
:: Number of Samples = 640 (the number of columns in the matrix)&lt;br /&gt;
:: Prestimulus Time = 1000 ms (defines the zero time point 1 s after the beginning)&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to accept the settings.&lt;br /&gt;
* Next, the ''Channel and digitized head surface point information dialog box'' will open. In the ''‘Channel configuration’'' box, the label file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.ela'''&amp;lt;/span&amp;gt;, will be detected automatically. Automatic detection occurs when the label file has the same base name as the data file (in this case, vectorized). To the right of the file name is a summary of channel types: 32 channels found, 30 are EEG, 1 is intercranial, 1 is polygraphic.&lt;br /&gt;
&lt;br /&gt;
Note the green tick at the top left of the dialog box. This indicates that BESA Research thinks that it has sufficient information to read the file, and map and do source analysis on the data.&lt;br /&gt;
&lt;br /&gt;
* To see how channel types are specified in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.ela'''&amp;lt;/span&amp;gt;, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit '''&amp;lt;/span&amp;gt;button to view the file with the Notepad program. Here you will see that most channels have 10-20 electrode names. Channel 3 has the prefix ‘''POLY''’, specifying that this channel is polygraphic. Channel 31 has the prefix ‘''ICR''’, specifying that this channel is intercranial. Close Notepad, and click ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;’ in the dialog box.&lt;br /&gt;
* A final dialog box asks for a Segment Comment. This is a label that will be displayed in the resulting file. The label is particularly useful if you import several ASCII files into one target file. Each segment is then easily identified by its own label.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. Multiplexed data'''&lt;br /&gt;
&lt;br /&gt;
* This example is similar to Example 1. In this case, import the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''multiplexed.asc'''&amp;lt;/span&amp;gt;, and select ‘Multiplexed’ in the ''ASCII File Properties dialog box''. Other settings in the dialog box stay as they were.&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
# The numbers in the source files can be split into several lines per channel or per time point. Then you will have to enter the correct number of time points and channels in the dialog box. In the present examples, the lines are not split (the vectorized file has all 640 time points in each line, and the multiplexed file has all 32 channels in each line). In this case, BESA Research selects the correct numbers of time points and channels automatically.&lt;br /&gt;
# If you have digitized coordinates, these can be specified in the Channel and digitized head surface point information dialog box. Since the procedure is the same as when reading data, this is described elsewhere under “''Example: EEG with Digitized Coordinates''”.&lt;br /&gt;
&lt;br /&gt;
=== MEG ASCII === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the'' \Examples\Xtras\ MEG ASCII'' subdirectory of the BESA Research installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiplexed MEG ASCII file with labels in the header (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;''med.mul''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;)'''&lt;br /&gt;
&lt;br /&gt;
For reading MEG data, BESA Research expects&lt;br /&gt;
* Correct channel definitions, i.e. channels should be defined as MEG.&lt;br /&gt;
* Head surface points.&lt;br /&gt;
* Sensor coordinates, in '''the same coordinate system''' as the head surface points.&lt;br /&gt;
* Optionally, you can define the coordinates of the center of the head. This will be important if too few head surface points are available to specify where to place the spherical head used by BESA Research for source modeling, or if you want to use some external definition, e.g. from the MRI.&lt;br /&gt;
&lt;br /&gt;
As with digitized EEG coordinates, we use the ''Channel and digitized head surface point information'' ''dialog box'' to specify the files which need to be read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. File Open'''&lt;br /&gt;
* The file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.mul'''&amp;lt;/span&amp;gt;, contains MEG data in the ASCII multiplexed format. This format contains channel labels. The labels used are recognized by BESA Research as originating from the Neuromag system. They are therefore identified as MEG and do not need further identification.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.sfp'''&amp;lt;/span&amp;gt;, defines fiducials and head surface points. Coordinate labels are included in the file, so no'' sfn'' file is required.&lt;br /&gt;
* The cot file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.cot'''&amp;lt;/span&amp;gt;, defines the coordinates of the head center. If this were missing, BESA Research would compute the head center based on the sphere that best fits the head surface points.&lt;br /&gt;
* The ''pos'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.pos'''&amp;lt;/span&amp;gt;, defines the coordinates of the 122 sensors. For the Neuromag system there are 9 values per line, defining primary coil location, secondary coil location, and orientation cosines. The sequence of coordinates in the ''pos'' file '''must''' match the sequence of MEG channels! The file format and locations of the primary and secondary coils allow BESA Research to identify the sensor type as planar gradiometers. If the file had only six values per line, BESA Research would classify the sensors as magnetometers (one primary coil and the orientation cosines).&lt;br /&gt;
* Open the file, selecting current file type as ''‘*,m''??’. The ''Channel and digitized head surface point'' ''information dialog box'' will open, displaying the different auxiliary file names. The green tick indicates that BESA Research finds everything to be OK.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; button and then the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''' ‘V’ '''&amp;lt;/span&amp;gt;key to view the coordinates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. File Import'''&lt;br /&gt;
* The file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCIIimport.asc'''&amp;lt;/span&amp;gt;, contains MEG data in a multiplexed array, without a header. This needs to be imported using ''File/Import ASCII'' (see ''“Example: ASCII Import”).''&lt;br /&gt;
* On import you have to specify the file as ‘Multiplexed’, the number of time points (285), the number of channels (132), the bins/µV (or bins/fT) (=1), the time at which the stimulus occurred (50 ms), and the sampling rate (949.667 Hz).&lt;br /&gt;
* This format contains no channel labels. The labels in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''ME&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;GASCIIimport.ela'''&amp;lt;/span&amp;gt; are recognized by BESA Research as originating from the Neuromag system. They are therefore identified as MEG and do not need further identification.&lt;br /&gt;
* Since it recognizes the channels as MEG, the ''Channel and digitized head surface point information dialog box'' will open, displaying the different auxiliary file names as before. Since all necessary files with the same base name as the data file are supplied, they are read automatically.&lt;br /&gt;
* Press the ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK’'''&amp;lt;/span&amp;gt; button, enter a segment name, and then the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt; key to view the coordinates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3. File Open -- MEG information recorded elsewhere'''&lt;br /&gt;
&lt;br /&gt;
This example illustrates the case where the auxiliary files have a different base name from the data file: you must select the file name in the ''Channel and digitized head surface point information dialog box''.&lt;br /&gt;
&lt;br /&gt;
* Open the file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCIIelsewhere.mul'''&amp;lt;/span&amp;gt;. It is read as an MEG magnetometer file.&lt;br /&gt;
* In the ''Channel and digitized head surface point information dialog box'', specify&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.sfp'''&amp;lt;/span&amp;gt; for the head surface points, and&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.pos'''&amp;lt;/span&amp;gt; for the MEG sensors&amp;lt;/div&amp;gt;&lt;br /&gt;
* MEG coordinates will be correct. The sensor definition file specifies the sensors as planar gradiometers.&lt;br /&gt;
* Where the auxiliary files came from will be recorded in the database. If you open the file again, the auxiliary files will be found automatically, without asking any questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reading combined EEG and MEG from an ASCII file === &lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''Examples\Xtras\MEG+EEG'' subdirectory of the BESA Research installation folder.&lt;br /&gt;
&lt;br /&gt;
Here are two examples containing mixed MEG, EEG, and polygraphic channels:&lt;br /&gt;
* Open a file using the ''File/Open'' command&lt;br /&gt;
* Import a file using ''File/Import ASCII'' command&lt;br /&gt;
&lt;br /&gt;
In both cases&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file defines the channel labels. Based on the labels, BESA Research knows which channels are EEG and MEG. The remainder are classified as polygraphic channels.&lt;br /&gt;
* The &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file defines the MEG sensor coordinates. The number of values on a line of this file (=9) defines the MEG as gradiometers. The relative locations of primary and secondary coils identify the gradiometers as planar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Example with ''File/Open'''''&lt;br /&gt;
* Open the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.mul'''&amp;lt;/span&amp;gt;. The ''Channel and digitized head surface point information dialog box'' will open automatically (unless the file has already been read once and the information is in the database).&lt;br /&gt;
* You will see under ''‘internal data file information’'' that BESA Research finds 122 MEG sensors, and 162 channels in all.&lt;br /&gt;
* Under ‘''Channel configuration’'', you will see that as a result of reading the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.ela'''&amp;lt;/span&amp;gt;, 32 channels are defined as EEG, and 8 channels as polygraphic.&lt;br /&gt;
* Under ‘''Digitized head surface points’'' is the feedback that out of the 51 locations in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.sfp'''&amp;lt;/span&amp;gt;, all electrode locations have been defined.&lt;br /&gt;
* Under ‘''MEG sensors’'', the sensors have been identified as gradiometers.&lt;br /&gt;
* The green tick at the top right of the window indicates that BESA Research classifies everything as OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Example with ''File/Import ASCII'''''&lt;br /&gt;
* Import the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEGimport.asc'''&amp;lt;/span&amp;gt;. Select &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEGimport.fsg '''&amp;lt;/span&amp;gt;as the target file (see ''“Example: ASCII Import”'').&lt;br /&gt;
* Select 320 Hz sampling rate, and 500 ms pre-stimulus time. Other selections in the dialog box should be ‘Multiplexed’, 1 bin/microvolt (this is interpreted as 1 bin/fT for MEG), 162 channels and 320 samples.&lt;br /&gt;
* The ''Channel and digitized head surface point information dialog box'' will open as above.&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Electrodes_and_Surface_Locations</id>
		<title>Electrodes and Surface Locations</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Electrodes_and_Surface_Locations"/>
				<updated>2021-05-05T09:37:22Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Introduction - Electrodes and Surface Locations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 6.1 or higher&lt;br /&gt;
}}&lt;br /&gt;
= Working with Electrodes and Surface Locations =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Here you will find out how BESA Research works with electrode and MEG sensor coordinates and labels, and how head surface points can be used to improve source modeling and coregistration of source models with the MRI. In most cases, electrode positions are sufficiently defined by their labels. The section &amp;quot;''Electrode Conventions''&amp;quot; lists the standard position which BESA Research assigns to EEG channels. In some cases, especially for larger electrode arrays or for MEG measurements, additional information is required to add sufficient information for mapping and for source analysis. The additional information is supplied in additional, auxiliary files which are read by BESA Research and associated with the data files. The auxiliary files, and how they are supplied to BESA Research, are described in this chapter.&lt;br /&gt;
&lt;br /&gt;
Examples for using auxiliary files to define the 3D locations of electrodes are found in the chapter &amp;quot;''Special Topics / Working with Electrodes... / Examples''&amp;quot; in the online help.&lt;br /&gt;
&lt;br /&gt;
Descriptions of file formats that BESA Research uses are given in the online help chapter [[Working_With_Additional_Files|Working With Additional Files]].&lt;br /&gt;
&lt;br /&gt;
== Working with auxiliary files ==&lt;br /&gt;
&lt;br /&gt;
Data files come with varying amounts of prior information about electrode/sensor locations, depending on the recording system. BESA Research allows you to read auxiliary files that define additional information, such as channel labels, and coordinates of the electrodes, sensors, and other head surface points. The information is required for mapping and for source montages.&lt;br /&gt;
* '''Mapping.''' BESA Research uses spherical spline mapping. For this, electrode/sensor locations are projected onto a sphere. The minimum requirement is 10-10 or 10-20 labels: if only channel labels are available without additional information, BESA Research uses default spherical coordinates.&lt;br /&gt;
* '''Source modeling'''. Spherical coordinates of electrode locations are sufficient, but digitized locations are better. Digitized locations can be defined in the data file or in auxiliary files. BESA Research will use digitized head surface points (electrodes + additional points) to fit a sphere for the spherical model. Points anterior to the left and right preauricular points and below the plane formed by these points and the nasion are excluded when fitting the sphere.&lt;br /&gt;
&lt;br /&gt;
Files can also be written, for instance for&lt;br /&gt;
* '''Source modelling with MRI coregistration'''. BESA Research allows for the export of surface points in a special format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''sfh'''&amp;lt;/span&amp;gt; file) which can be read by the BESA MRI (or BrainVoyager) program. These are fitted to the head surface defined by BESA MRI (or BrainVoyager) in order to define rotation, translation, and deformation parameters required to coregister the coordinate systems (see &amp;quot;''Integration with MRI and fMRi''&amp;quot;).&lt;br /&gt;
* '''Export of coordinates.''' Electrode, other surface point locations, and MEG sensor coordinates and other surface point locations can be written to ASCII files so that they can be reread when reading other files into BESA Research (e.g. ASCII files), or used by other programs.&lt;br /&gt;
&lt;br /&gt;
Feedback and control over how these files are read is provided by&lt;br /&gt;
* '''the Channel and digitized head surface point information dialog box.''' This dialog is usually opened when you open a file for the first time. It allows you to specify the names of auxiliary files, and it makes initial checks on the files to see whether they are consistent with each other and with the data file. If the check is OK, you will see a green tick at the top right hand corner of the dialog box. If there are inconsistencies, the tick is replaced by a red exclamation mark. In this case, you will usually need to edit the auxiliary files or specify other files. The dialog box is not opened if the file is recognized to contain all the necessary information (files with the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''foc'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''fsg'''&amp;lt;/span&amp;gt; extensions), or if the program only finds a channel definition file (with extensions &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''ela, elp,'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''elb'''&amp;lt;/span&amp;gt;). The dialog box is not opened if the data file has been opened before. You can always open the dialog box manually by specifying ''&amp;quot; File / Head Surface Points and Sensors/Load Coordinate'' ''Files.''&lt;br /&gt;
* '''The log file''' (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*_LoadFile.log&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;)'''.''' Coordinating the information between the data file and its auxiliary files can be a complex procedure. To help you check whether the coordination is being done properly, if you select the menu entry ''&amp;quot; Options / File / Generate Log &amp;quot;'' during File Open, BESA Research writes a log file with the same base name as the data file, appending &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_LoadFile.log'''&amp;lt;/span&amp;gt;&amp;quot; to the base name, recording which files have been read, and some of the parameters that have been found. This file is created every time auxiliary files are read (e.g. on file open, when reading in channel configuration files, head surface point files, MEG sensor locations), or changed (&amp;quot;''Edit /'' ''Channel Configuration''&amp;quot;).&lt;br /&gt;
* '''The log window. '''If there are inconsistencies during the processing of auxiliary files and 3D coordinates, a logging window is opened showing the information that would be written to the log file. You can read what has been done to help diagnose the problems. Select '''OK''' to continue in spite of the problems, or''' Reset''' to reject. Typing '''Reset''' also deletes the database files associated with the current data file, thus allowing you to start reading this file from scratch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA Research remembers which auxiliary files are associated with the current file'''. When a data file is first opened, and BESA Research finds auxiliary files with the same base name as the data file, you will be asked if you want this file to be read. The decision you make will be recorded in the database for this data file. Next time the file is opened, the files will or will not be read, according to your previous decision. Similarly, when an auxiliary file is read using the menu, this is recorded in the database, and the file will be opened automatically next time the data file is opened. To override previous decisions, you must delete the database files (see the''' log window '''above) or change the entries in the Channel and digitized head surface point information dialog box (see the chapter ''&amp;quot;Electrode Conventions / Channel and digitized head surface point information dialog box''&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Coordinate systems ==&lt;br /&gt;
&lt;br /&gt;
We need to deal with four different coordinate systems. These differ in how the x, y, and z axes are defined, and in the units of measurement (e.g. mm, cm, m). The first three are illustrated in the following figure:&lt;br /&gt;
&lt;br /&gt;
[[File:ST_Electrodes_(1)_02.png|800px]]&lt;br /&gt;
&amp;lt;!-- [[Image:ST Electrodes (1).gif ]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Device coordinates.''' These are the coordinates used by the recording system. The axes may be anywhere in relation to the head. For instance, in the Polhemus digitizer, the axes go through the magnetic field transmitter which is located somewhere outside the head. The units of measurement may be millimeters, centimeters, or meters.&lt;br /&gt;
&lt;br /&gt;
'''Head coordinates'''. This coordinate system is defined by reference points on the head known as ''fiducials''. The reference points are normally the nasion (Nz, NAS), the left preauricular point (T9, LPA), and the right preauricular point (T10, RPA). The x axis is defined by the line joining T9 and T10, positive towards T10. The y axis is defined by the line through Nz that is perpendicular to the x axis (positive towards Nz). The z axis is perpendicular to the x and y axes, and goes up out of the head in the vicinity of Cz. The units of measurement may be millimeters, centimeters, or meters. In BESA Research these are labelled with the prefix 'Fid', e.g. 'FidT9', 'FidNz'.&lt;br /&gt;
&lt;br /&gt;
'''BESA Research coordinates.''' For dipole analyses the head model consists of a sphere. In the default situation where no digitized sensor information is available, the center of the sphere is defined by the crossing point between the lines joining T7 (=T3) and T8 (=T4) and Fpz and Oz.. The x axis is the T8-T7 line, positive at T8. The y axis is the Oz-Fpz line, positive at Fpz. The z-axis goes up out of the head through Cz. If digitized information is available, the axes are defined by the best fit between the idealized electrode locations and the real locations. The diameter of the sphere is also defined by the best fit. Units given in the display are in millimeters.&lt;br /&gt;
&lt;br /&gt;
The '''center of the spherical model''' is on average about 4 cm above the origin of the Head Coordinates. If digitized surface points are available, the sphere is fitted to these points. Using a cot file, it is possible to override the fit and define your own head center. In conjunction with BrainVoyager, you can use the MRI to seed the location of the head center (e.g. a fixed distance anterior to the posterior commissure) and save it as a cot file. Using MRI coregistration (see &amp;quot;''Integration with MRI and'' ''fMRi''&amp;quot;), the center is placed between the anterior (AC) and posterior (PC) commissures, at the half-way point between the anterior and posterior points (AP and PP). Without coregistration, the center corresponds to a point 17.5 mm behind AC in the standard MRI head.&lt;br /&gt;
&lt;br /&gt;
'''MRI coordinates.''' These are the coordinates used by BrainVoyager. These are defined by the MRI slices. Measurement units are millimeters.&lt;br /&gt;
&lt;br /&gt;
== The Channel and Digitized Head Surface Point Information Dialog Box ==&lt;br /&gt;
&lt;br /&gt;
Many data formats read by BESA Research require additional information about data channel, which are specified by additional, auxiliary files. This dialog box allows you to specify which auxiliary files are read in to supplement the information in the data file.&lt;br /&gt;
&lt;br /&gt;
The dialog box is opened automatically the first time a data file is opened, if&lt;br /&gt;
* auxiliary files other than a channel definition file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elb&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) are found&lt;br /&gt;
* no auxiliary files are found, and the data file was not written in compressed binary format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.foc&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.fsg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) by BESA Research &lt;br /&gt;
&lt;br /&gt;
When a data file is closed, the information about which auxiliary files have been read is stored in the database. When the file is opened for a second time the dialog box is not opened automatically, because the information is assumed to be correct – the files are read automatically.&lt;br /&gt;
&lt;br /&gt;
The dialog box can be opened manually by selecting &amp;quot;''File / Head Surface Points and Sensors / Load Coordinate Files''&amp;quot;, or using the shortcut &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''ctrl-L'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (2).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dialog box is divided into several sections:&lt;br /&gt;
&lt;br /&gt;
* '''Internal data file information.''' Here you can see the file name, the originating system (file format), the name of the database file, if any, and the channel information as specified by the data file alone.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (4).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Suggestions.''' This box makes suggestions about what needs to be filled in, e.g. &amp;quot;Please enter electrode thickness&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (5).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Main feedback (top right hand corner).''' A green tick indicates that the currently selected data files are consistent among themselves and with the data file. A red exclamation mark indicates an inconsistency. Check the feedback texts in the subsequent sections for more information:&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (8).gif|70px]] [[Image:ST Electrodes (7).gif|71px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Channel configuration file specification.''' If the channel labels and types defined in the data file (&amp;quot;Internal data file information&amp;quot;) need to be changed, enter a file name here (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elb&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If a channel definition file exists with the same basename as the data file, or if a channel definition file has been specified previously (database entry exists), it will be selected automatically. To the right of the file name, feedback is provided about the number of channels and channel types found. If the labels are consistent with the data file, to the right the text &amp;quot;Good&amp;quot; is shown. If they are inconsistent, e.g. the file contains the wrong number of channel definitions, the text &amp;quot;Bad&amp;quot; is shown.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (9).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Digitized head surface point specification.''' Here you may specify a file containing digitized electrode and other head surface points. Optionally, the information can be split into two files, containing the coordinates (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp, *.eps&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the coordinate names (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.sfn'''&amp;lt;/span&amp;gt;). Alternatively, both labels and names can be contained in the coordinate file. If the files specify electrode coordinates, there '''must''' be a coordinate name for each electrode. The sequence may be different. BESA Research will use the names to assign each coordinate to the electrodes. Additional head surface points can have any other names. It is recommended that the first three digitized coordinates are the fiducials (fiduciary points), labelled &amp;quot;FidNz&amp;quot;, &amp;quot;FidT9&amp;quot;, &amp;quot;FidT10&amp;quot;. If your electrode labels not follow the 10-10 or 10-20 standard (e.g. in high-density electrode recordings), it is recommended to tick the box '''&amp;quot;Electrode labels non-conforming to 10-10 standard&amp;quot;'''. This will prevent BESA Research from using electrodes for an optimal rotation of the coordinate system which should not be used (e.g. A1, A2 which have known locations in 10-10, but are sometimes used in a nomenclature outside of 10-10). The example below shows the sphere adaption for an example data set with and without taking this into account.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (12).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The right picture shows that when discarding the non-conforming electrodes, the fiducials are correctly placed along the x any y axes.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (10).gif ]] [[Image:ST Electrodes (11).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(In the special case of Neuromag files with electrode channels, the data file contains head surface points with the wrong labels. Here you may provide a label file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfn&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) without a corresponding digitized coordinate file.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Coregistration file.''' Here you may specify a file containing the coordinates of the head center (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.cot&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) or an ''MRI Coregistration File ''(&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). Head center redefinition is only necessary if you want to provide an external definition, e.g. from the MRI. The ''MRI Coregistration File ''is used if the data are to be coregistered with individual MRI. (see &amp;quot;''Integration with MRI and fMRi'' &amp;quot;). '''Note''' that if a head center file (cot file) with the same base name as the data file exists, it will be read automatically if the head center coordinates deviate by more than 1 mm from the internally calculated values. Changes are ignored if the radio button is set to &amp;quot;No&amp;quot;. This automated function allows you to change the head center during a session, using BrainVoyager's view of the MRI and the Source Module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (14).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''MEG sensor specification'''. If the file contains MEG channels, you may enter the name of a sensor coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pmg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). This field is grayed if there are no MEG channels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (15).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Artifact coefficients file.''' If the data are to be artifact corrected, your pre-prepared coefficient file may be defined here. See the chapter &amp;quot;''Artifact Correction''&amp;quot;. Selecting the file here is equivalent to loading the file using the menu entry &amp;quot;''Artifact / Load''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (17).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each of the selected files, make sure the radio button &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Yes&amp;quot;'''&amp;lt;/span&amp;gt; is selected on the left-hand side of the dialog box. If files have been selected automatically, and you do not wish them to be read, select the &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''No'''&amp;lt;/span&amp;gt;&amp;quot; radio button.&lt;br /&gt;
&lt;br /&gt;
If some of the settings are incorrect or the text &amp;quot;Bad&amp;quot; is shown, you may edit the auxiliary files (the file is opened with the NotePad program) or browse for another file by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse'''&amp;lt;/span&amp;gt; buttons.&lt;br /&gt;
&lt;br /&gt;
After you have entered the required information, and the green tick at the top right indicates consistency, press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to continue. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Cancel'''&amp;lt;/span&amp;gt; to ignore the current settings. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear DB'''&amp;lt;/span&amp;gt; to delete the database files. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear Events'''&amp;lt;/span&amp;gt; to delete the tag files (the part of the database that records events). Both &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear'''&amp;lt;/span&amp;gt; buttons close the currently-opened data file.&lt;br /&gt;
&lt;br /&gt;
== General Reading Rules for Data Files and Auxiliary Files ==&lt;br /&gt;
&lt;br /&gt;
Auxiliary files can complement the information in the data file. Here we specify what happens when a data file is opened:&lt;br /&gt;
&lt;br /&gt;
: 1. If the data file has been read previously, the database entry specifies which auxiliary files should be read. The file and the specified auxiliary files are opened and the data are displayed.&lt;br /&gt;
&lt;br /&gt;
: 2. If&lt;br /&gt;
&lt;br /&gt;
:: a) there is a channel definition file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.el?'''&amp;lt;/span&amp;gt;) with the same basename as the data file, and &lt;br /&gt;
&lt;br /&gt;
:: b) this file includes spherical coordinates for the EEG channels (including labels with entries in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; file), and&lt;br /&gt;
&lt;br /&gt;
:: C) there are no other auxiliary files with the same base name, the file will be opened and the data displayed. If files with the same basename are not found, BESA Research will look for files with the basename “default” (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;) in the data folder. If such files are not found, BESA Research will look for files with the basename “default” one folder above (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
: 3. If the data file has been written in binary format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.foc'''&amp;lt;/span&amp;gt;, &amp;lt;span &lt;br /&gt;
style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.fsg'''&amp;lt;/span&amp;gt;) by BESA Research (after Jan. 2000), the file will be read, and all information is assumed to be complete. The file is opened and the data are displayed.&lt;br /&gt;
&lt;br /&gt;
: 4. In all other cases, the ''Channel and digitized head surface point information dialog box'' will be opened for you to specify and check auxiliary files. Auxiliary files with the same base name as the data file will be specified in the text boxes for file names. If files with the same basename are not found, BESA Research will look for files with the basename “default” (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;) in the data directory. If such files are not found, BESA Research will look for files with the basename “default” one directory above (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;). Otherwise the text boxes will be left blank.&lt;br /&gt;
&lt;br /&gt;
: 5. Auxiliary files can be specified at a later time by selecting ''File/Head Surface Points'' and ''Sensors/Load'' ''Coordinate Files''. The ''Channel and digitized head surface point information dialog box'' will be opened.&lt;br /&gt;
&lt;br /&gt;
== Electrodes ==&lt;br /&gt;
&lt;br /&gt;
=== Electrode Conventions ===&lt;br /&gt;
&lt;br /&gt;
BESA Research adheres to the 10/20 and to the new 10/10 standard of the IEF (international EEG Federation). BESA Research will recognize the labels defined by these standards. The labels are stored in most EEG file headers. Otherwise, or in the case of erroneous labeling or sequencing of the recording channels, you may edit the channel labels and/or coordinates, or you may read an electrode file stored previously on disk. In addition to the 10/20 and 10/10 standard labels BESA Research recognizes the following labels: M1, M2 (left, right mastoids), SP1, SP2 (sphenoidal), CB1, CB2 (cerebellar), Chin, Neck, LO1, LO2 (lateral ocular), SO1, SO2 (supra-ocular), IO1, IO2 (infra-ocular). BESA Research will translate all the labels into spherical coordinates for spherical spline interpolation, mapping and source imaging. The following assignments are stored in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; in the BESA folder:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (19).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Electrode labels in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd '''&amp;lt;/span&amp;gt;and their spherical coordinates. 10-20 electrodes are shown in&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt; red and italic.''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The spherical coordinates are defined in degrees by the azimuth (from Cz, positive = right, negative = left hemisphere) and the latitude (counterclockwise from T7/T3 for left and from T8/T4 for right hemisphere) of each electrode. Please do not modify the existing labels or coordinates in this file, because this would adversely affect the interpolated (virtual) montages, the maps and the source montages and source images in BESA Research. However, you may add additional labels for scalp electrodes at the end of this file if needed (up to a total of 196). When you edit the electrode configuration or read in electrode files, BESA Research may replace the 10/20 standard labels T3, T4, T5, T6 by their new 10/10 equivalents T7, &lt;br /&gt;
&lt;br /&gt;
T8, P7, P8. However, in the initialization file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini '''&amp;lt;/span&amp;gt;you can reset to the old 10/20 standard by relabeling T7=T3, P7=T5, T8=T4, P8=T6 under the heading [Electrodes]. You may use the same feature to assign appropriate labels to the X1..X8 channels which exist in many systems, e.g. X1=EKG1 etc.&lt;br /&gt;
&lt;br /&gt;
=== Recommendations for electrode placement ===&lt;br /&gt;
&lt;br /&gt;
For source montages and source analysis two principles are important:&lt;br /&gt;
&lt;br /&gt;
# Covering of the lower head with inferior electrodes to record activity from the inferior surfaces of the brain, especially from the basal temporal lobe, from the temporal pole, from orbito-frontal cortex, and from basal occipital and cerebellar areas.&lt;br /&gt;
# Equal spacing of the electrodes over the whole head to cover all brain areas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following montage EEGxx, the number xx indicates the number of electrodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG25 - Minimum 10-20 configuration including inferior electrodes'''&lt;br /&gt;
&lt;br /&gt;
This covers the 19 standard 10-20 electrodes:&lt;br /&gt;
&lt;br /&gt;
Fp1, Fp2, F7, F3, Fz, F4, F8 ....&lt;br /&gt;
&lt;br /&gt;
plus 6 inferior electrodes on both sides:&lt;br /&gt;
&lt;br /&gt;
F11, A1, P11, F12, A2, P12&lt;br /&gt;
&lt;br /&gt;
with a recommended continuation of the 20% distances, i.e. use F11 instead of F9, P11 instead of P9, A1 instead of T9 to have a wider coverage of the inferior head. A1 / A2 may be replaced by T9 / T10 (or FT9 / FT10) for convenience and comfort.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (21).gif ]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 25 electrodes. Right: left temporal basal activity mapped with 25 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG33 - Additional 10-10 electrodes within the major squares'''&lt;br /&gt;
&lt;br /&gt;
To the above electrodes add the following 8 intermediate electrodes:&lt;br /&gt;
&lt;br /&gt;
FC5, FC1, FC2, FC6, &amp;amp;nbsp;&amp;amp;nbsp;CP5, CP1, CP2, CP6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (23).gif]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 33 electrodes. Right: left temporal basal activity mapped with 33 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG35 - Additional supraorbital electrodes for better EOG separation'''&lt;br /&gt;
&lt;br /&gt;
SO1, SO2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG37 - Wider inferior coverage at interlaced 20% distances'''&lt;br /&gt;
&lt;br /&gt;
Continue 20% down from F7, FC5, CP5, P7 etc. and use the following 8 inferior electrodes instead of 6:&lt;br /&gt;
&lt;br /&gt;
F11, FT9, TP9, P11, &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;F12, FT10, TP10, P12&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG41 – Improved frontal and occipital coverage'''&lt;br /&gt;
&lt;br /&gt;
Additional electrodes halfway between Fz and Fp1 / FP2 and Pz and O1 / O2:&lt;br /&gt;
&lt;br /&gt;
AF1, AF2, &amp;amp;nbsp;&amp;amp;nbsp;PO1, PO2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG43 – Inferior chain with 5 electrodes including A1 / A2'''&lt;br /&gt;
&lt;br /&gt;
F11, FT9, A1, TP9, P11, &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;F12, FT10, A2, TP10, P12&lt;br /&gt;
&lt;br /&gt;
EEG43 represents the widest coverage with relatively even spacing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (25).gif]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 43 electrodes. Right: left temporal polar activity mapped with 43 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG64-256'''&lt;br /&gt;
&lt;br /&gt;
With 64 or more channel caps, it is similarly recommended to use a sufficient number of inferior electrodes all around the head. At least 4 inferior temporal electrodes on each side and additional electrodes above or below the eyes (outside of the cap) are suggested.&lt;br /&gt;
&lt;br /&gt;
=== Editing the channel configuration ===&lt;br /&gt;
&lt;br /&gt;
Only use the channel configuration editing facility if the electrodes or the common reference have not been correctly defined by your digital EEG system, or if you want to define specific spherical coordinates for your scalp electrodes. It is your responsibility to check and provide the correct sequence of electrode labels in correspondence with the sequence of channels in the EEG data file. If these sequences do not match exactly, errors will occur in the computation of maps, source images and interpolated montages.&lt;br /&gt;
&lt;br /&gt;
We will use the example EEG file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg'''&amp;lt;/span&amp;gt; in the subdirectory ''Examples/EEG-Focus'' of the BESA Research directory to explain the editing of electrode labels and coordinates:&lt;br /&gt;
&lt;br /&gt;
1. Select ''File'', then click on ''Open'', or click on &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg '''&amp;lt;/span&amp;gt;if this file is contained in the list of currently selected EEG files.&lt;br /&gt;
&lt;br /&gt;
2. Select ''Edit'', then click ''Channel Configuration''. The dialog box shown below will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (27).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the upper left of the figure you see the dropdown menu after selecting the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File '''&amp;lt;/span&amp;gt;menu in the dialog box. This menu allows to edit a new ('''''New''''') or an existing ('''''Open''''') electrode file and to save the changes to the same ('''''Save''''') or a different ('''''Save As''''') file. Normally, it will not be necessary to use this menu. The control fields on the right will be sufficient. If you type ''''''Ok'''''', you will be given the option of saving the changes to a file.&lt;br /&gt;
&lt;br /&gt;
3. Click on &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Reload org. &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Labels'''&amp;lt;/span&amp;gt; to reread the original labels as stored in the file header of &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg'''&amp;lt;/span&amp;gt;. BESA Research quits editing and redisplays the EEG. Repeat step 2 and select &amp;quot;''Edit / Channel'' ''Configuration''&amp;quot; again. Note: The button &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Reload org. Labels'''&amp;lt;/span&amp;gt; is not available if there are no labels in the file header.&lt;br /&gt;
&lt;br /&gt;
4. Click on the empty space of the scroll bar below the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''scroll '''&amp;lt;/span&amp;gt;button and on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''down arrow'''&amp;lt;/span&amp;gt; of the '''scroll bar''' to display the remaining electrodes in the file.&lt;br /&gt;
&lt;br /&gt;
5. Click on electrode '''R''' (line 32), then on the button &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Delete Electrode'''&amp;lt;/span&amp;gt; to remove the associated channel, which does not contain any signal. Note that you may not omit intermediate channels, even if they do not exhibit signals, because the correct correspondence between the series of electrodes and the EEG channels will not be maintained. Use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;quot;Edit / Bad Channels&amp;quot;'''&amp;lt;/span&amp;gt; menu to disable artifactual or empty channels.&lt;br /&gt;
&lt;br /&gt;
6. Click on''' EOG''' (line 30) and change the entry to '''EOG1'''. Do not type &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;lt;Enter&amp;gt;,'''&amp;lt;/span&amp;gt; but click on the next or a different electrode box to accept the changes.&lt;br /&gt;
&lt;br /&gt;
7. '''Double click''' on '''EOG '''(line 31). This will highlight the entry. Simply type the new name '''EOG2''', and note that the old label is replaced when highlighted. Electrodes '''30 '''and '''31 '''are now defined as distinct electrodes. Next, we want to replace the label '''T10 '''by '''A2'''.&lt;br /&gt;
&lt;br /&gt;
8. Click on the label '''T10''' (line 24). Then click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''drop down'''&amp;lt;/span&amp;gt; arrow right of the highlighted label to obtain the list of default scalp electrodes (read from &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; and sorted alphabetically). Type '''A''' to jump to the electrodes beginning with letter A (see below). Type '''2''' or '''click''' on '''A2''' in the list. Click on the '''type '''box (Scalp channel) to close the list and display the new entry in line 24. Note that this is the most convenient way to edit an electrode label.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (28).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Exercise: repeat step 8 to replace '''T9''' by '''A1'''. Restore labels '''T10''' and '''T9''' in lines 24 and 21.&lt;br /&gt;
&lt;br /&gt;
10. Replace SO1 and SO2 (supra-orbital) by '''PSO1 '''and '''PSO2 '''and note that these electrodes are changed to the''' 'Polygraphy'''' type, because no coordinates are associated with these labels.&lt;br /&gt;
&lt;br /&gt;
11. After you click &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''OK''''&amp;lt;/span&amp;gt;, the box '''Write Channel Configuration File''' will appear and display a name for the current electrode file. By default, the BESA electrode file path and current file name will be used and supplemented by the extension &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''''.elb''''&amp;lt;/span&amp;gt;. The electrode file path may be set in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini'''&amp;lt;/span&amp;gt; file [Defaults] section under ElectrodeFilePath. If no electrode file path is specified in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini'''&amp;lt;/span&amp;gt; file, the default electrode file path ''Montages\Channels ''is used. Simply click '&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;' or type &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;lt;Enter&amp;gt; '''&amp;lt;/span&amp;gt;to save the changes to this file, or select a new file name and/or path, if you do not want to store the electrode file in the BESA Research electrode file directory.&lt;br /&gt;
&lt;br /&gt;
Note that by using the default 10/10 labels (see chapter &amp;quot;''Electrode conventions''&amp;quot;) you specify that the associated electrode is a scalp electrode. Hence, different labels must be used for polygraphic, intracranial or MEG channels. After you have entered a new non-scalp label, you may select the type of the electrode/channel amongst the different groups ('''Polygraphy, Intracranial, MEG Channel''') from the drop down list in the ''''''Type'''''' box. This will allow for using separate selection and scaling facilities of the channel group control push-buttons at the right of the screen ('''All, Scp, Pgr, Icr, MEG'''). If you have entered a new non-scalp label and select the type '''Scalp Channel''', or if you click on the ''''Advanced&amp;gt;&amp;gt;'''' field, boxes will appear to enter the spherical coordinates (azimuth and latitude) of this electrode (cf. Fig. 6.5). These features may be used to specify non-standard scalp electrodes. Please check the earlier sections of this chapter for electrode conventions. You may view the locations of the scalp electrodes on the head schemes in the mapping window. Select '''Show Electrodes in Maps''' in the &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''View / Options'''&amp;lt;/span&amp;gt;&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (29).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Hint:''' If you want to specify the spherical coordinates of an electrode which is close to a standard electrode, click on the ''''Advanced &amp;gt;&amp;gt;'''' field, enter the label of the standard electrode and append a single quotation mark. This will specify that the electrode is close to the labeled location but has different coordinates. The ''Scalp Channel'' type will not be replaced by '''Polygraphy.''' Then edit '''Azimuth''' and '''Latitude'''. This convention is used by BESA Research when reading electrode coordinate files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''(*.elp'''&amp;lt;/span&amp;gt;), e.g. from the BESA program. The coordinates are read and compared with the default coordinates to assign the closest label. Then a single quotation mark is appended to the label, and the coordinates are assigned as specified in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.elp'''&amp;lt;/span&amp;gt; file. For example, open &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''segm1.eeg'''&amp;lt;/span&amp;gt; in the ''Examples\EEG-Focus'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
Note that the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''segm1.elp '''&amp;lt;/span&amp;gt;is searched for automatically in the directory of the data file when opening the data file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Edit Common Scalp Reference'''&lt;br /&gt;
&lt;br /&gt;
There is a separate line at the bottom in the ''Channel Configuration dialog box'' to enter the label and coordinates of the '''Common Scalp Reference electrode'''. If this is specified and enabled (click on field '''Enabled'''), the information provided by the fact that all scalp electrodes were recorded against a common recording reference will be used for mapping, source imaging and virtual montages. This information will be lost if the common reference has not been specified or if a combination of electrodes has been used as reference during recording. Specify the '''Common Scalp Reference electrode''' only if all electrodes have been referenced to the same single electrode and if a standard 10/10 location has been used for the common recording reference.&lt;br /&gt;
&lt;br /&gt;
'''Note that BESA Research cannot process digital EEG data correctly if there is no common recording reference''', and if different recording references were used for the various scalp electrodes. For intracranial and polygraphic channels different references may be used. It is preferable to use the common reference also for electrode channels near the eyes, because these electrodes provide valuable information for mapping, source imaging and interpolated montages. The traditional bipolar channels (e.g. horizontal and vertical '''EOG''') may be '''reconstructed digitally''' using the ''Selected Channels'' group or user-defined montages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 3D Coordinates for Precise Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction - Working with Digitized 3D Coordinates ===&lt;br /&gt;
&lt;br /&gt;
Working with digitized electrode coordinates usually requires reading in additional (auxiliary) files. The procedure is described in the chapter &amp;quot;''Working with auxiliary files''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Data reading rules for EEG ===&lt;br /&gt;
&lt;br /&gt;
This section explains which additional files are read, or which files have to be read in order to provide the necessary information for mapping and source montages.&lt;br /&gt;
&lt;br /&gt;
Assume file name is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.xxx'''&amp;lt;/span&amp;gt;. datafile is the base name, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.xxx'''&amp;lt;/span&amp;gt; is the extension. Replace the text ''datafile'' by the base name of your own file, and the extension&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;'' xxx''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; by the extension of your own file.&lt;br /&gt;
&lt;br /&gt;
'''Channel definitions for EEG:'''&lt;br /&gt;
&lt;br /&gt;
* '''Labels have 10-10 names''': default locations will be used.&lt;br /&gt;
* '''Labels do not have 10-10 names''': Channels are interpreted as '''polygraphic'''. Mapping is not possible without one or more of the following additional files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Define channel names and types.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elb'''&amp;lt;/span&amp;gt; exist (i.e. files with basename d''efault ''one folder above the data file): Channel names and types will be replaced by those defined in this file, in order of occurrence. The ''ela'' file contains just labels and, optionally, types. The ''elp'' file contains spherical coordinates and can contain labels and types. The ''elb'' file contains the same information in binary format. See chapter &amp;quot;''[[Working_With_Additional_Files#Channel_definition_file_conventions_and_formats|Working with additional files / Channel Definition File Conventions]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define order in which electrodes were digitized.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfn'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; one folder above the data file): electrode names are supplied in the order in which coordinates were supplied in the ''sfp'' file. These names must match with the names supplied in the data file or defined in the ''ela/elp/elb'' file. BESA Research uses this to sort coordinates into the order of channels in the file. If fiducials exist, they should be defined on the first three lines. If they do not exist, BESA Research will simulate them (so that it can define the head coordinate system). See chapter ''&amp;quot;[[Working_With_Additional_Files#sfn_.28surface_point_name.29_file|Working with additional files / sfn (surface point name) file]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define electrode coordinates.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfp'''&amp;lt;/span&amp;gt; exists (i.e. file default.sfp one folder above the data file): electrode coordinates will be replaced/defined by the coordinates defined in this file. If &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; does not exist, labels can also be defined in this file. If fiducials exist, they should be defined on the first three lines. If they do not exist, BESA Research will simulate them. See chapter &amp;quot;''[[Working_With_Additional_Files#sfp_.28surface_point_coordinate.29_file|Working with additional files / sfp (surface point coordinate) file]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define coregistration information.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;sfh'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfh'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfh'''&amp;lt;/span&amp;gt; exists (i.e. file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.sfh '''&amp;lt;/span&amp;gt;one folder above the data file): head center and relative position of the unit sphere with respect to the head coordinate system is determined by the coregistration between EEG and MRI. See online help chapter ''&amp;quot;[[Integration_with_MRI_and_fMRI|Integration with MRI and fMRI]]&amp;quot;''.&lt;br /&gt;
&lt;br /&gt;
'''Define head center.''' No coregistration file exists (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, see above). File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.cot'''&amp;lt;/span&amp;gt; exists (i.e. file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.cot&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;one folder above the data file): head center as computed by fitting a sphere to the surface points is replaced by the head center coordinates contained in this file. See chapter ''&amp;quot;[[Working_With_Additional_Files#cot_.28Head_center.29_file|Working with additional files / cot (Head center) file]]&amp;quot;''.&lt;br /&gt;
&lt;br /&gt;
=== Data reading rules for MEG ===&lt;br /&gt;
&lt;br /&gt;
Assume file name is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''''datafile.xxx''''&amp;lt;/span&amp;gt;. '''datafile''' is the base name. '''xxx''' is the extension. Replace the text '''datafile''' by the base name of your own file, and the extension '''xxx''' by the extension of your own file.&lt;br /&gt;
&lt;br /&gt;
Here we consider cases a) MEG alone, b) MEG+EEG.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Automatic procedure:'''&lt;br /&gt;
&lt;br /&gt;
Labels have names defined in the files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd'''&amp;lt;/span&amp;gt;. Channels are interpreted as MEG. However, sensor locations and head surface point locations must be defined in additional files as described below. Mapping and source analysis are not possible without one or more of the following additional files.&lt;br /&gt;
&lt;br /&gt;
'''Define channel names and types.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elb'''&amp;lt;/span&amp;gt; exist (i.e. files with basename'' default'' one folder above the data file): Channel names and types will be replaced by those defined in this file, in order of occurrence. The'' ela''&amp;amp;nbsp;file contains just labels and (optionally) channel types. The ''elp'' file contains spherical coordinates and can contain labels and types. The'' elb'' file contains the equivalent information in binary format. See chapter “''Electrode file conventions'' ''and formats.”''&lt;br /&gt;
&lt;br /&gt;
'''MEG+EEG.''' Define order in which electrodes were digitized. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfn'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; one folder above the data file): electrode names are supplied in the order in which coordinates were supplied in the ''sfp'' file (or in the location descriptor in the data file: e.g. Neuromag). These names must match with the names supplied in the data file or defined in the ''ela/elp/elb'' file. BESA Research uses this to sort coordinates into the order of channels in the file. See chapter “''Working with additional files/ sfn (surface point name) file”.''&lt;br /&gt;
&lt;br /&gt;
'''MEG+EEG.''' Define head surface point/electrode coordinates. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfp'''&amp;lt;/span&amp;gt;'' ''exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfp'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; one folder above the data file): electrode coordinates will be replaced/defined by the coordinates defined in this file. If &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; does not exist, labels can also be defined in this file. See chapter “''Working with additional files/ sfp (surface point'' ''coordinate) file''”. The labels of electrode coordinates '''must '''match to those defined for the data channels. BESA Research will use the labels to associate coordinates with the correct channel.&lt;br /&gt;
&lt;br /&gt;
'''Define sensor coordinates'''. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.pos'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.pmg'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.pos(.pmg)'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.pos(.pmg)'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.pos(.pmg)'''&amp;lt;/span&amp;gt; one folder above the data file): coordinates are defined in this file. The convention is that'' pos'' files contain gradiometer coordinates and'' pmg'' files contain magnetometer coordinates. This is not necessary for the program to read in values properly: the program makes its decision about the sensor type on the basis of the number of coordinate values on one line in the file (6 = magnetometers, 9 = gradiometers). See chapter “''Working with additional files/ pos or pmg (MEG sensor coordinate) file”.''&lt;br /&gt;
&lt;br /&gt;
'''Define coregistration information.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfh'''&amp;lt;/span&amp;gt; exists, or file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.sfh&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfh'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfh'''&amp;lt;/span&amp;gt; one folder above the data file): head center and relative position of the unit sphere with respect to the head coordinate system is determined by the coregistration of the head coordinates with MRI. See (online) help chapter ''&amp;quot;Integration with MRI and fMRI&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
'''Define head center.''' No coregistration file exists (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, see above). File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.cot'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;one folder above the data file): head center as computed by fitting a sphere to the surface points is replaced by the head center coordinates contained in this file. See chapter ''&amp;quot;Working with additional files / cot (Head center) file&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reading MEG files in ASCII format ===&lt;br /&gt;
&lt;br /&gt;
'''BESA Research uses labeling or channel type definitions to decide whether channels are EEG or MEG. '''Based on the labels defined for the channels, or the type specified by the channel definition file, the program will try to find auxiliary files that define electrode coordinates or MEG sensors.&lt;br /&gt;
&lt;br /&gt;
BESA Research uses four files to make its decision:&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.ela/.elp'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;The channel type defined here overrides definitions in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ecd&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; (below).&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines electrode labels and default spherical coordinates based on the 10-20 and 10-10 naming system&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines labels and default spherical coordinates for the BTi whole-head system&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines labels and default spherical coordinates for the Neuromag whole-head system&lt;br /&gt;
&lt;br /&gt;
If the program finds a label in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;, the channel will automatically be defined as EEG. If not, if it finds a label in one of the other files, the channel will be defined as MEG. If it doesn't find the label anywhere, the channel will be defined as Polygraphic.&lt;br /&gt;
&lt;br /&gt;
The spherical coordinates defined in these files are sufficient for mapping the data. Auxiliary files defining the real sensor coordinates are required for source analysis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Defining default label and coordinate file for a new MEG system'''&lt;br /&gt;
&lt;br /&gt;
When preparing an MEG from a system other than BTi-WHS or Neuromag for import to BESA Research, you should edit either &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd '''&amp;lt;/span&amp;gt;to conform with your system. If sensor files (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos/*.pmg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) are always available for your files, the coordinates in the ''ecd ''files are irrelevant: all you need do is define the labels for your own MEG system or use the labels as already defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Files to prepare for reading in each data file'''&lt;br /&gt;
&lt;br /&gt;
Each auxiliary file should have the same base name as your data file.&lt;br /&gt;
&lt;br /&gt;
'''Define channel labels.''' There are several possibilities:&lt;br /&gt;
* Generate your data file according to the BESA'' avr'' ''format or the ASCII multiplexed format.'' Labels are listed in the second line of the file.&lt;br /&gt;
* Generate a ''label file'' (extension &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.ela'''&amp;lt;/span&amp;gt;) with one MEG channel label per line (matching with your ''ecd ''file as defined above) or with the type &amp;quot;MEG&amp;quot; and a label for each line.&lt;br /&gt;
&lt;br /&gt;
Label definitions are also possible using ''elp'' or ''elb'' files, but the above two solutions are recommended because they are the simplest.&lt;br /&gt;
&lt;br /&gt;
'''Define sensor coordinates.''' Generate a ''pos'' or ''pmg'' file. Make sure that the number of sensors matches with the number of MEG channel definitions in your data file.&lt;br /&gt;
&lt;br /&gt;
'''Define fiducials and other head surface points.''' Generate an ''sfp'' file. The first three lines define the fiducials. Subsequent lines define additional surface points.&lt;br /&gt;
&lt;br /&gt;
'''Define coordinates of the center of the head.''' Generate a ''cot'' file. If this file is absent, BESA Research generates the coordinates by fitting a sphere to the head surface points.&lt;br /&gt;
&lt;br /&gt;
Note that all coordinates should be within the same frame of reference, i.e. the same coordinate system. Units must be in meters, centimeters, or millimeters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example: Defining Channel Labels ==&lt;br /&gt;
&lt;br /&gt;
The files described in these examples can be found in the ''.\Examples\Xtras\EEG+Channel Labels'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
The simplest way to define electrode coordinates is to use BESA Research’s default settings (defined in the file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;). In this case, you only need to provide a list of channel labels. If a channel label is defined in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; (i.e. if the labels belong to the 10-20 or 10-10 system), BESA Research will recognize the channel as EEG, and will allocate 3D coordinates.&lt;br /&gt;
&lt;br /&gt;
Labels are not always supplied correctly in the data file. You can override the internal labels in several ways:&lt;br /&gt;
* Read the data file, and then use &amp;quot;''Edit / Channel Configuration''&amp;quot; to redefine the channels. The configuration is stored in a file with the name &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''basename.elb'''&amp;lt;/span&amp;gt; (for binary data) or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''basename.elp'''&amp;lt;/span&amp;gt; (for ASCII data), where basename is the base name (name without the extension) of your data file.&lt;br /&gt;
* Prepare a label file (with the extension ''ela'') containing a list of labels. This can also specify channel types (e.g. EEG, Polygraphic, Intracranial, MEG).&lt;br /&gt;
* Prepare a file (with the extension ''elp'') containing spherical coordinates of the channels. This is the method used with the previous version of BESA Research. If the file doesn’t contain labels, labels are allocated based on their proximity to the 10-20 or 10-10 definitions in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following examples illustrate the above three methods. The input files are all in ''BESA avr format, ''although these examples apply to all EEG data formats in which only EEG channels exist.&lt;br /&gt;
&lt;br /&gt;
If the data file contains polygraphic or other types of non-EEG channel, the types need to be defined. See the ''EEG+Polygraphic channels example.'' MEG is a special case, because the sensor coordinates need to be defined. See the ''MEG ASCII and the MEG+EEG'' ''examples''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. EEG file containing wrong labels – use ''Edit/Channel Configuration ''to redefine labels'''&lt;br /&gt;
* The'' avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.avr'''&amp;lt;/span&amp;gt;, contains the EEG labels. Channels 4 and 14 have been mislabeled – the labels need to be swapped.&lt;br /&gt;
* Open the file with '''''File/Open''''' (Select file type ''BESA avr''. Find the correct directory ''Xtras\EEG+Channel Labels'').&lt;br /&gt;
* The file should open correctly, displaying 32 channels of EEG.&lt;br /&gt;
* The channel coordinates can be viewed by typing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’ '''&amp;lt;/span&amp;gt;key (make sure the cursor is off). There will be a 3D display of the electrodes. Clicking on an electrode will display the label and the coordinates.&lt;br /&gt;
* In this file, channels 4 and 14 have been mislabeled as P3 and F3. In fact, the labels should be the other way around. We will now correct this:&lt;br /&gt;
* Select '''''Edit / Channel Configuration'''''.&lt;br /&gt;
* Type ‘F3’ into the label for channel 4, and ‘P3’ into the label for channel 14. Then type ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;’. The new channel configuration will be saved in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.elp'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* In the data display, the labels of channels 4 and 14 will now be displayed correctly.&lt;br /&gt;
* Close the file ('''''File/Close''''') and open it again. Note that the labels are still correct. This is because the new channel configuration file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.elp'''&amp;lt;/span&amp;gt;, is read automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. EEG file with no labels – channel labels in auxiliary file'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithoutLabels.avr'''&amp;lt;/span&amp;gt;, has no labels.&lt;br /&gt;
* EEG labels are defined in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithoutLabels.ela'''&amp;lt;/span&amp;gt;. This is read automatically when the file is opened.&lt;br /&gt;
* In this example, labels are correct. Each label in the ''ela'' file is on one line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp1''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp2''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F7''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F3''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''...''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3. EEG file with no labels – channel labels derived from spherical coordinates'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithSphericalCoords.avr'''&amp;lt;/span&amp;gt;, has no labels.&lt;br /&gt;
* Spherical coordinates are defined in the ''elp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithSphericalCoords.elp'''&amp;lt;/span&amp;gt;. This contains spherical coordinates (theta and phi) and no labels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-93 -72''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''92 74''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-97 -40''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-61 -49''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-46 -88''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''62 51''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* When the data file is opened, the ''elp'' file is read automatically, and BESA Research uses the tables in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; to assign channel labels. To indicate that it has assigned user defined coordinates and matched with the closest standard electrode, BESA appends an apostrophe (‘) to each label:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp1’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp2’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F7’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F3’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We advise to assign specific labels as well as spherical coordinates if you want to use your own spherical coordinate system, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''FP1u -90 -72''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 4. EEG file with no labels – channel labels not in basename.el?'''&lt;br /&gt;
* The ''avr ''file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGnoLabelsNoElaFile.avr'''&amp;lt;/span&amp;gt;, has no corresponding ''ela, elp'', or ''elb'' file, i.e. no file with the same base name and the ''el?'' extension.&lt;br /&gt;
* When you open the file, BESA Research will ask for a channel configuration file. The ''File Open'' ''dialog ''will select the ''directory .\Montages\Channels''. The idea is that standard (= frequently used) electrode configurations should be kept in this directory.&lt;br /&gt;
* Select the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''XtrasExample.ela'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* Close the data file and reopen it. The file will open with the correct labels. In the BESA window title you will see that the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGnoLabelsNoElaFile.elp'''&amp;lt;/span&amp;gt; has been read automatically. This file was created when &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''XtrasExample.ela'''&amp;lt;/span&amp;gt; was read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example: Mixed EEG and Polygraphic Data ==&lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ EEG+Polygraphic'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
The data are in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEG+Polygraphic.avr'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The third channel is defined as polygraphic in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEG+Polygraphic.ela '''&amp;lt;/span&amp;gt;file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Fp1 &lt;br /&gt;
 Fp2 &lt;br /&gt;
POLY Test&lt;br /&gt;
 F3 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The prefix &amp;quot;''POLY''&amp;quot; specifies that the channel is polygraphic. Most other channels are interpreted as EEG because the labels are known in the 10-20 system.&lt;br /&gt;
&lt;br /&gt;
Similarly, channel 31 is defined as intercranial, using the prefix &amp;quot;''ICR''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that you can also define channels as EEG by specifying the ''&amp;quot;EEG&amp;quot; ''prefix (e.g. ''&amp;quot;EEG E1&amp;quot;. ''This is useful if there are many more channels than are defined in the 10-10 or 10-20 systems, and if the channel coordinates are defined.&lt;br /&gt;
&lt;br /&gt;
== Example: EEG with Digitized Coordinates ==&lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the .''\Examples\Xtras\ EEG+Digitization Points ''subdirectory.&lt;br /&gt;
&lt;br /&gt;
In the previous examples, we have illustrated how to assign labels to channels using channel definition files. In those examples, only spherical coordinates were defined. Here we will show how to read digitized surface points into BESA Research, using the surface point (''sfp'') coordinate file and the surface point name (''sfn'') file.&lt;br /&gt;
&lt;br /&gt;
The principles of defining digitization coordinate files are:&lt;br /&gt;
* The labels in the ''sfp/sfn'' file combination are used to assign coordinates to electrodes. Thus, if a coordinate has the name ‘''Fz''’ it will be assigned to the channel with the label ‘''Fz''’.&lt;br /&gt;
* In consequence, digitization of surface points can be in a different order to the sequence of channels in the data file. Matching to channels is done by comparing the labels.&lt;br /&gt;
* We recommend that the fiducial points, '''nasion, left preauricular point, right preauricular point''' be digitized. If you do not digitize them, BESA Research will simulate these locations (see ''“Example: Digitization points with and without Fiducials”''). Fiducial points, labeled '''FidNz, FidT9, FidT10''' should be the first three coordinates in the ''sfp'' file.&lt;br /&gt;
* As with the channel definition files, it is easiest for BESA Research if you name the ''sfp/sfn'' files using the base name of the data file, e.g. if the data file is named &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.avr'''&amp;lt;/span&amp;gt;, name the'' sfp'' file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.sfp'''&amp;lt;/span&amp;gt; and the ''sfn'' file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.sfn'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* You specify the files to be read in the ''Channel and digitized head surface point information dialog box.''&lt;br /&gt;
&lt;br /&gt;
See ''“Example: Polhemus Digitizer Data” ''for a discussion of how to format the files originating from Polhemus and other digitizers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. EEG file containing labels, ''sfp'' file containing coordinates, ''sfn ''file containing coordinate names'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;, contains the channel labels. Therefore, we don’t need a channel definition file.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;, contains digitized coordinates of electrodes and of additional surface points. The labels in the file do not correspond to the electrode labels in the ''avr ''file.&lt;br /&gt;
* The ''sfn'' file contains the corrected labels (1 line for each corresponding line in the'' sfp'' file). Now it is possible to match up electrode labels with the labels in the ''avr ''file.&lt;br /&gt;
* Open the data file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;. The ''Channel and digitized head surface point information dialog box'' will open automatically.&lt;br /&gt;
* Note the green tick mark at the top right of the dialog box. This is feedback to say that coordinates of all 32 electrodes have been found.&lt;br /&gt;
* Look at the entry ‘''Digitized head surface points’''. Here you will see that the ''sfp'' and the ''sfn ''files have been read automatically (because of the common base name). There are 51 locations. Note that the digitizer file can contain many more locations than the electrodes. BESA Research uses the locations for fitting the sphere of the spherical head model in source analysis. BESA Research can export these locations for coregistration with the MRI.&lt;br /&gt;
* Define the electrode thickness as 6 mm (at the right of the ‘''Digitized head surface points’'' box. This is the distance of the digitized point on the electrode to the surface of the head.&lt;br /&gt;
* Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; in the dialog box and view the coordinates by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt; key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. EEG file without labels, channel labels in ''ela'' file, surface point coordinates and names in ''sfp'' file'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.avr'''&amp;lt;/span&amp;gt;, has no channel label. Therefore, a label file is required. Here, the label file is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.ela'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.sfp'''&amp;lt;/span&amp;gt;, contains digitized coordinates of electrodes and of additional surface points. The labels are defined correctly in the ''sfp ''file, i.e. for every EEG channel label there is a corresponding coordinate. Therefore, no ''sfn'' file is required.&lt;br /&gt;
* When you open the file, don’t forget to define the electrode thickness as 6 mm in the ''Channel and digitized head surface point information dialog box.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example: Polhemus Digitizer Data ==&lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ EEG+Digitization Points'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
Data from the Polhemus (other digitizers too) may often not fit the format BESA Research requires for the surface point file. Note that Polhemus data can be exported directly into BESA-compatible ''sfp''-files using the LOCATOR software.&lt;br /&gt;
&lt;br /&gt;
BESA Research requires either&lt;br /&gt;
* just the cartesian coordinates (x, y, z) values -- one set of coordinates per line. In this case, labels must be defined in a parallel surface point name file, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0.5 &amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:0cm;margin-right:0cm;&amp;quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the cartesian coordinates plus a label. The label can be in front of or behind the coordinates on the line, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0.5&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68 &amp;amp;nbsp;Fz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:2.54cm;margin-right:0cm;&amp;quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz &amp;amp;nbsp;0.5 &amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68'' &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of a few lines of a (''sfp'') file that are not read correctly by BESA Research:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''Nz&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;87.721&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''T9 &amp;amp;nbsp;-79.131&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''T10&amp;amp;nbsp;&amp;amp;nbsp;67.253&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''1 &amp;amp;nbsp;-34.192 &amp;amp;nbsp;103.374&amp;amp;nbsp;&amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''2&amp;amp;nbsp;&amp;amp;nbsp;23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048 &amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''3&amp;amp;nbsp;&amp;amp;nbsp;-81.179&amp;amp;nbsp;&amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''4 &amp;amp;nbsp;-60.701&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What is wrong?&lt;br /&gt;
&lt;br /&gt;
* First, some of the points are just numbered. These numbers don't tell BESA Research which electrode channel to which the coordinates should be assigned – assignments should be via channel labels and not numbers.&lt;br /&gt;
* Second, Nz, T9, T10 define the fiducials. Instead, the labels FidNz, FidT9, FidT10 are required (prefix &amp;quot;Fid&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What should be done? Probably the best way is&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;a) keep only the coordinates in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp &amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0&amp;amp;nbsp;&amp;amp;nbsp;87.721 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-79.131 &amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''67.253 &amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-34.192&amp;amp;nbsp;&amp;amp;nbsp;103.374 &amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048&amp;amp;nbsp;&amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-81.179 &amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-60.701&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b) prepare a surface point name file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfn&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) containing the corresponding labels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidNz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT9''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT10''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp1''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp2''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F7''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F3''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keeping labels and coordinates separate means that the label file needs generating only once. The coordinate file is different for each subject.&lt;br /&gt;
&lt;br /&gt;
Alternatively, if your digitizer program attaches the labels correctly to the coordinates, then you can prepare the ''sfp'' file like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidNz&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;87.721 &amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''FidT9&amp;amp;nbsp;&amp;amp;nbsp;-79.131&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT10&amp;amp;nbsp;&amp;amp;nbsp;67.253&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp1&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-34.192&amp;amp;nbsp;&amp;amp;nbsp;103.374 &amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp2 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048&amp;amp;nbsp;&amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F7&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-81.179 &amp;amp;nbsp;&amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F3&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-60.701&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example: Digitization points with and without Fiducials ==&lt;br /&gt;
&lt;br /&gt;
We recommend that if electrodes are digitized, you should also digitize the three fiduciary points:''' Nasion''', '''and left and right preauricular points'''. We refer to these points as &amp;quot;fiducials&amp;quot;. We name them '''&amp;quot;FidNz&amp;quot;,''' '''&amp;quot;FidT9&amp;quot;,''' and '''&amp;quot;FidT10&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
If you do not digitize these points, BESA Research will simulate them, i.e. it will generate the points where it expects them to be, based on the fit of a sphere to the existing points, and on the names of surface points of known locations. &amp;quot;Known locations&amp;quot; means: the surface point name must be a 10-20 or 10-10 electrode name (e.g. &amp;quot;Cz&amp;quot; -- arbitrary labels, such as &amp;quot;E10&amp;quot; is not a known location). Therefore, BESA Research requires that at least 3 surface points with known labels are defined.&lt;br /&gt;
&lt;br /&gt;
In a file containing digitization points (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), the fiducials should be the first three sets of coordinates, i.e. the first three lines of the file. The remaining coordinates in the file can be electrode (or other surface point) coordinates, in any order. The assignment of electrode coordinates to data channels is achieved by matching the coordinate labels to data channel labels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Consequences of omitting fiducials'''&lt;br /&gt;
&lt;br /&gt;
When these files have been read into BESA Research, look at the head surface points in 3D using ''File/Head Surface Points'' ''and Sensors/View'' (or use the shortcut &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt;). You will see small differences in fiducial locations between the real and the simulated locations. You can expect very slight influences on the results of source modeling (the spherical head may be rotated slightly, although the head center and radius will be identical), and output of source locations in head coordinates will be different, because these coordinates are based on fiducial locations (see chapter ''“Working with Electrodes and Surface'' ''Locations/ Coordinate systems''”).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example: ASCII Import ==&lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ASCII Import'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
When should the Import ASCII function be used? If you have data in BESA Research average referenced or multiplexed format, use the Open File function to read in a file directly. If you have data in a different ASCII format, BESA Research offers a flexible import function to import data from an array of numbers in an ASCII file.&lt;br /&gt;
&lt;br /&gt;
The array can be '''vectorized '''(one channel, all time points, per line) or '''multiplexed''' (one time point, all channels, per line). These alternatives are illustrated in the two example files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.asc'''&amp;lt;/span&amp;gt; and &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''multiplexed.asc'''&amp;lt;/span&amp;gt;, and in the tables below:&lt;br /&gt;
&lt;br /&gt;
'''Vectorized array:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|| channel 1, time 1&lt;br /&gt;
|| channel 1, time 2&lt;br /&gt;
|| channel 1, time 3&lt;br /&gt;
|| channel 1, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 2, time 1&lt;br /&gt;
|| channel 2, time 2&lt;br /&gt;
|| channel 2, time 3&lt;br /&gt;
|| channel 2, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 3, time 1&lt;br /&gt;
|| channel 3, time 2&lt;br /&gt;
|| channel 3, time 3&lt;br /&gt;
|| channel 3, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 4, time 1&lt;br /&gt;
|| channel 4, time 2&lt;br /&gt;
|| channel 4, time 3&lt;br /&gt;
|| channel 4, time 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiplexed array:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 1 &lt;br /&gt;
|| channel 2, time 1&lt;br /&gt;
|| channel 3, time 1&lt;br /&gt;
|| channel 4, time 1&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 2&lt;br /&gt;
|| channel 2, time 2&lt;br /&gt;
|| channel 3, time 2&lt;br /&gt;
|| channel 4, time 2&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 3&lt;br /&gt;
|| channel 2, time 3&lt;br /&gt;
|| channel 3, time 3&lt;br /&gt;
|| channel 4, time 3&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 4&lt;br /&gt;
|| channel 2, time 4&lt;br /&gt;
|| channel 3, time 4&lt;br /&gt;
|| channel 4, time 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA Research needs channel labels. If the labels are in the 10-20 or 10-10 system, BESA Research will assign the channels default coordinates. This is the minimum requirement to be able to map EEG.&lt;br /&gt;
&lt;br /&gt;
If you have 3D digitized coordinates, these can also be specified in ASCII files. This is described under the chapter “[[Electrodes_and_Surface_Locations#Example:_EEG_with_Digitized_Coordinates | Example: EEG with Digitized Coordinates]]”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. Vectorized data'''&lt;br /&gt;
&lt;br /&gt;
* The file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.asc'''&amp;lt;/span&amp;gt; contains the data. The file should be imported via ''File/Import ASCII File''.&lt;br /&gt;
* First you will be asked for a name for the binary target file. The name &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.fsg'''&amp;lt;/span&amp;gt; is suggested. You may accept this name by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; or choose an alternative name. Note that if the file already exists, the imported data will be appended to the file.&lt;br /&gt;
* Next, the ''ASCII File Properties dialog box'' will open. First select ''‘Vectorized’'', and make sure the subsequent entries are correct:&lt;br /&gt;
&lt;br /&gt;
:: Header Lines = 0 (i.e. in this example the numbers start on the first line)&lt;br /&gt;
:: Bins/Microvolt = 1.0 (i.e. a value 1 in the data represents 1 µV)&lt;br /&gt;
:: Sampling Rate = 320 Hz (When the dialog box is opened, BESA Research always chooses the setting it used previously)&lt;br /&gt;
:: Number of channels = 32 (the number of rows in the matrix)&lt;br /&gt;
:: Number of Samples = 640 (the number of columns in the matrix)&lt;br /&gt;
:: Prestimulus Time = 1000 ms (defines the zero time point 1 s after the beginning)&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to accept the settings.&lt;br /&gt;
* Next, the ''Channel and digitized head surface point information dialog box'' will open. In the ''‘Channel configuration’'' box, the label file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.ela'''&amp;lt;/span&amp;gt;, will be detected automatically. Automatic detection occurs when the label file has the same base name as the data file (in this case, vectorized). To the right of the file name is a summary of channel types: 32 channels found, 30 are EEG, 1 is intercranial, 1 is polygraphic.&lt;br /&gt;
&lt;br /&gt;
Note the green tick at the top left of the dialog box. This indicates that BESA Research thinks that it has sufficient information to read the file, and map and do source analysis on the data.&lt;br /&gt;
&lt;br /&gt;
* To see how channel types are specified in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.ela'''&amp;lt;/span&amp;gt;, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit '''&amp;lt;/span&amp;gt;button to view the file with the Notepad program. Here you will see that most channels have 10-20 electrode names. Channel 3 has the prefix ‘''POLY''’, specifying that this channel is polygraphic. Channel 31 has the prefix ‘''ICR''’, specifying that this channel is intercranial. Close Notepad, and click ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;’ in the dialog box.&lt;br /&gt;
* A final dialog box asks for a Segment Comment. This is a label that will be displayed in the resulting file. The label is particularly useful if you import several ASCII files into one target file. Each segment is then easily identified by its own label.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. Multiplexed data'''&lt;br /&gt;
&lt;br /&gt;
* This example is similar to Example 1. In this case, import the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''multiplexed.asc'''&amp;lt;/span&amp;gt;, and select ‘Multiplexed’ in the ''ASCII File Properties dialog box''. Other settings in the dialog box stay as they were.&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
# The numbers in the source files can be split into several lines per channel or per time point. Then you will have to enter the correct number of time points and channels in the dialog box. In the present examples, the lines are not split (the vectorized file has all 640 time points in each line, and the multiplexed file has all 32 channels in each line). In this case, BESA Research selects the correct numbers of time points and channels automatically.&lt;br /&gt;
# If you have digitized coordinates, these can be specified in the Channel and digitized head surface point information dialog box. Since the procedure is the same as when reading data, this is described elsewhere under “''Example: EEG with Digitized Coordinates''”.&lt;br /&gt;
&lt;br /&gt;
== Example: MEG ASCII ==&lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the'' \Examples\Xtras\ MEG ASCII'' subdirectory of the BESA Research installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiplexed MEG ASCII file with labels in the header (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;''med.mul''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;)'''&lt;br /&gt;
&lt;br /&gt;
For reading MEG data, BESA Research expects&lt;br /&gt;
* Correct channel definitions, i.e. channels should be defined as MEG.&lt;br /&gt;
* Head surface points.&lt;br /&gt;
* Sensor coordinates, in '''the same coordinate system''' as the head surface points.&lt;br /&gt;
* Optionally, you can define the coordinates of the center of the head. This will be important if too few head surface points are available to specify where to place the spherical head used by BESA Research for source modeling, or if you want to use some external definition, e.g. from the MRI.&lt;br /&gt;
&lt;br /&gt;
As with digitized EEG coordinates, we use the ''Channel and digitized head surface point information'' ''dialog box'' to specify the files which need to be read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. File Open'''&lt;br /&gt;
* The file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.mul'''&amp;lt;/span&amp;gt;, contains MEG data in the ASCII multiplexed format. This format contains channel labels. The labels used are recognized by BESA Research as originating from the Neuromag system. They are therefore identified as MEG and do not need further identification.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.sfp'''&amp;lt;/span&amp;gt;, defines fiducials and head surface points. Coordinate labels are included in the file, so no'' sfn'' file is required.&lt;br /&gt;
* The cot file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.cot'''&amp;lt;/span&amp;gt;, defines the coordinates of the head center. If this were missing, BESA Research would compute the head center based on the sphere that best fits the head surface points.&lt;br /&gt;
* The ''pos'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.pos'''&amp;lt;/span&amp;gt;, defines the coordinates of the 122 sensors. For the Neuromag system there are 9 values per line, defining primary coil location, secondary coil location, and orientation cosines. The sequence of coordinates in the ''pos'' file '''must''' match the sequence of MEG channels! The file format and locations of the primary and secondary coils allow BESA Research to identify the sensor type as planar gradiometers. If the file had only six values per line, BESA Research would classify the sensors as magnetometers (one primary coil and the orientation cosines).&lt;br /&gt;
* Open the file, selecting current file type as ''‘*,m''??’. The ''Channel and digitized head surface point'' ''information dialog box'' will open, displaying the different auxiliary file names. The green tick indicates that BESA Research finds everything to be OK.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; button and then the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''' ‘V’ '''&amp;lt;/span&amp;gt;key to view the coordinates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. File Import'''&lt;br /&gt;
* The file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCIIimport.asc'''&amp;lt;/span&amp;gt;, contains MEG data in a multiplexed array, without a header. This needs to be imported using ''File/Import ASCII'' (see ''“Example: ASCII Import”).''&lt;br /&gt;
* On import you have to specify the file as ‘Multiplexed’, the number of time points (285), the number of channels (132), the bins/µV (or bins/fT) (=1), the time at which the stimulus occurred (50 ms), and the sampling rate (949.667 Hz).&lt;br /&gt;
* This format contains no channel labels. The labels in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''ME&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;GASCIIimport.ela'''&amp;lt;/span&amp;gt; are recognized by BESA Research as originating from the Neuromag system. They are therefore identified as MEG and do not need further identification.&lt;br /&gt;
* Since it recognizes the channels as MEG, the ''Channel and digitized head surface point information dialog box'' will open, displaying the different auxiliary file names as before. Since all necessary files with the same base name as the data file are supplied, they are read automatically.&lt;br /&gt;
* Press the ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK’'''&amp;lt;/span&amp;gt; button, enter a segment name, and then the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt; key to view the coordinates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3. File Open -- MEG information recorded elsewhere'''&lt;br /&gt;
&lt;br /&gt;
This example illustrates the case where the auxiliary files have a different base name from the data file: you must select the file name in the ''Channel and digitized head surface point information dialog box''.&lt;br /&gt;
&lt;br /&gt;
* Open the file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCIIelsewhere.mul'''&amp;lt;/span&amp;gt;. It is read as an MEG magnetometer file.&lt;br /&gt;
* In the ''Channel and digitized head surface point information dialog box'', specify&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.sfp'''&amp;lt;/span&amp;gt; for the head surface points, and&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.pos'''&amp;lt;/span&amp;gt; for the MEG sensors&amp;lt;/div&amp;gt;&lt;br /&gt;
* MEG coordinates will be correct. The sensor definition file specifies the sensors as planar gradiometers.&lt;br /&gt;
* Where the auxiliary files came from will be recorded in the database. If you open the file again, the auxiliary files will be found automatically, without asking any questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example: Reading combined EEG and MEG from an ASCII file ==&lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''Examples\Xtras\MEG+EEG'' subdirectory of the BESA Research installation folder.&lt;br /&gt;
&lt;br /&gt;
Here are two examples containing mixed MEG, EEG, and polygraphic channels:&lt;br /&gt;
* Open a file using the ''File/Open'' command&lt;br /&gt;
* Import a file using ''File/Import ASCII'' command&lt;br /&gt;
&lt;br /&gt;
In both cases&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file defines the channel labels. Based on the labels, BESA Research knows which channels are EEG and MEG. The remainder are classified as polygraphic channels.&lt;br /&gt;
* The &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file defines the MEG sensor coordinates. The number of values on a line of this file (=9) defines the MEG as gradiometers. The relative locations of primary and secondary coils identify the gradiometers as planar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Example with ''File/Open'''''&lt;br /&gt;
* Open the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.mul'''&amp;lt;/span&amp;gt;. The ''Channel and digitized head surface point information dialog box'' will open automatically (unless the file has already been read once and the information is in the database).&lt;br /&gt;
* You will see under ''‘internal data file information’'' that BESA Research finds 122 MEG sensors, and 162 channels in all.&lt;br /&gt;
* Under ‘''Channel configuration’'', you will see that as a result of reading the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.ela'''&amp;lt;/span&amp;gt;, 32 channels are defined as EEG, and 8 channels as polygraphic.&lt;br /&gt;
* Under ‘''Digitized head surface points’'' is the feedback that out of the 51 locations in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.sfp'''&amp;lt;/span&amp;gt;, all electrode locations have been defined.&lt;br /&gt;
* Under ‘''MEG sensors’'', the sensors have been identified as gradiometers.&lt;br /&gt;
* The green tick at the top right of the window indicates that BESA Research classifies everything as OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Example with ''File/Import ASCII'''''&lt;br /&gt;
* Import the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEGimport.asc'''&amp;lt;/span&amp;gt;. Select &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEGimport.fsg '''&amp;lt;/span&amp;gt;as the target file (see ''“Example: ASCII Import”'').&lt;br /&gt;
* Select 320 Hz sampling rate, and 500 ms pre-stimulus time. Other selections in the dialog box should be ‘Multiplexed’, 1 bin/microvolt (this is interpreted as 1 bin/fT for MEG), 162 channels and 320 samples.&lt;br /&gt;
* The ''Channel and digitized head surface point information dialog box'' will open as above.&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Electrodes_and_Surface_Locations</id>
		<title>Electrodes and Surface Locations</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Electrodes_and_Surface_Locations"/>
				<updated>2021-05-05T09:21:53Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 6.1 or higher&lt;br /&gt;
}}&lt;br /&gt;
= Working with Electrodes and Surface Locations =&lt;br /&gt;
&lt;br /&gt;
== Introduction - Electrodes and Surface Locations ==&lt;br /&gt;
&lt;br /&gt;
Here you will find out how BESA Research works with electrode and MEG sensor coordinates and labels, and how head surface points can be used to improve source modeling and coregistration of source models with the MRI. In most cases, electrode positions are sufficiently defined by their labels. The section &amp;quot;''Electrode Conventions''&amp;quot; lists the standard position which BESA Research assigns to EEG channels. In some cases, especially for larger electrode arrays or for MEG measurements, additional information is required to add sufficient information for mapping and for source analysis. The additional information is supplied in additional, auxiliary files which are read by BESA Research and associated with the data files. The auxiliary files, and how they are supplied to BESA Research, are described in this chapter.&lt;br /&gt;
&lt;br /&gt;
Examples for using auxiliary files to define the 3D locations of electrodes are found in the chapter &amp;quot;''Special Topics / Working with Electrodes... / Examples''&amp;quot; in the online help.&lt;br /&gt;
&lt;br /&gt;
Descriptions of file formats that BESA Research uses are given in the online help chapter &amp;quot;''Special Topics'' ''/ Working with additional files''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Working with auxiliary files ==&lt;br /&gt;
&lt;br /&gt;
Data files come with varying amounts of prior information about electrode/sensor locations, depending on the recording system. BESA Research allows you to read auxiliary files that define additional information, such as channel labels, and coordinates of the electrodes, sensors, and other head surface points. The information is required for mapping and for source montages.&lt;br /&gt;
* '''Mapping.''' BESA Research uses spherical spline mapping. For this, electrode/sensor locations are projected onto a sphere. The minimum requirement is 10-10 or 10-20 labels: if only channel labels are available without additional information, BESA Research uses default spherical coordinates.&lt;br /&gt;
* '''Source modeling'''. Spherical coordinates of electrode locations are sufficient, but digitized locations are better. Digitized locations can be defined in the data file or in auxiliary files. BESA Research will use digitized head surface points (electrodes + additional points) to fit a sphere for the spherical model. Points anterior to the left and right preauricular points and below the plane formed by these points and the nasion are excluded when fitting the sphere.&lt;br /&gt;
&lt;br /&gt;
Files can also be written, for instance for&lt;br /&gt;
* '''Source modelling with MRI coregistration'''. BESA Research allows for the export of surface points in a special format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''sfh'''&amp;lt;/span&amp;gt; file) which can be read by the BESA MRI (or BrainVoyager) program. These are fitted to the head surface defined by BESA MRI (or BrainVoyager) in order to define rotation, translation, and deformation parameters required to coregister the coordinate systems (see &amp;quot;''Integration with MRI and fMRi''&amp;quot;).&lt;br /&gt;
* '''Export of coordinates.''' Electrode, other surface point locations, and MEG sensor coordinates and other surface point locations can be written to ASCII files so that they can be reread when reading other files into BESA Research (e.g. ASCII files), or used by other programs.&lt;br /&gt;
&lt;br /&gt;
Feedback and control over how these files are read is provided by&lt;br /&gt;
* '''the Channel and digitized head surface point information dialog box.''' This dialog is usually opened when you open a file for the first time. It allows you to specify the names of auxiliary files, and it makes initial checks on the files to see whether they are consistent with each other and with the data file. If the check is OK, you will see a green tick at the top right hand corner of the dialog box. If there are inconsistencies, the tick is replaced by a red exclamation mark. In this case, you will usually need to edit the auxiliary files or specify other files. The dialog box is not opened if the file is recognized to contain all the necessary information (files with the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''foc'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''fsg'''&amp;lt;/span&amp;gt; extensions), or if the program only finds a channel definition file (with extensions &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''ela, elp,'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''elb'''&amp;lt;/span&amp;gt;). The dialog box is not opened if the data file has been opened before. You can always open the dialog box manually by specifying ''&amp;quot; File / Head Surface Points and Sensors/Load Coordinate'' ''Files.''&lt;br /&gt;
* '''The log file''' (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*_LoadFile.log&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;)'''.''' Coordinating the information between the data file and its auxiliary files can be a complex procedure. To help you check whether the coordination is being done properly, if you select the menu entry ''&amp;quot; Options / File / Generate Log &amp;quot;'' during File Open, BESA Research writes a log file with the same base name as the data file, appending &amp;quot;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''_LoadFile.log'''&amp;lt;/span&amp;gt;&amp;quot; to the base name, recording which files have been read, and some of the parameters that have been found. This file is created every time auxiliary files are read (e.g. on file open, when reading in channel configuration files, head surface point files, MEG sensor locations), or changed (&amp;quot;''Edit /'' ''Channel Configuration''&amp;quot;).&lt;br /&gt;
* '''The log window. '''If there are inconsistencies during the processing of auxiliary files and 3D coordinates, a logging window is opened showing the information that would be written to the log file. You can read what has been done to help diagnose the problems. Select '''OK''' to continue in spite of the problems, or''' Reset''' to reject. Typing '''Reset''' also deletes the database files associated with the current data file, thus allowing you to start reading this file from scratch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''BESA Research remembers which auxiliary files are associated with the current file'''. When a data file is first opened, and BESA Research finds auxiliary files with the same base name as the data file, you will be asked if you want this file to be read. The decision you make will be recorded in the database for this data file. Next time the file is opened, the files will or will not be read, according to your previous decision. Similarly, when an auxiliary file is read using the menu, this is recorded in the database, and the file will be opened automatically next time the data file is opened. To override previous decisions, you must delete the database files (see the''' log window '''above) or change the entries in the Channel and digitized head surface point information dialog box (see the chapter ''&amp;quot;Electrode Conventions / Channel and digitized head surface point information dialog box''&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Coordinate systems ==&lt;br /&gt;
&lt;br /&gt;
We need to deal with four different coordinate systems. These differ in how the x, y, and z axes are defined, and in the units of measurement (e.g. mm, cm, m). The first three are illustrated in the following figure:&lt;br /&gt;
&lt;br /&gt;
[[File:ST_Electrodes_(1)_02.png|800px]]&lt;br /&gt;
&amp;lt;!-- [[Image:ST Electrodes (1).gif ]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Device coordinates.''' These are the coordinates used by the recording system. The axes may be anywhere in relation to the head. For instance, in the Polhemus digitizer, the axes go through the magnetic field transmitter which is located somewhere outside the head. The units of measurement may be millimeters, centimeters, or meters.&lt;br /&gt;
&lt;br /&gt;
'''Head coordinates'''. This coordinate system is defined by reference points on the head known as ''fiducials''. The reference points are normally the nasion (Nz, NAS), the left preauricular point (T9, LPA), and the right preauricular point (T10, RPA). The x axis is defined by the line joining T9 and T10, positive towards T10. The y axis is defined by the line through Nz that is perpendicular to the x axis (positive towards Nz). The z axis is perpendicular to the x and y axes, and goes up out of the head in the vicinity of Cz. The units of measurement may be millimeters, centimeters, or meters. In BESA Research these are labelled with the prefix 'Fid', e.g. 'FidT9', 'FidNz'.&lt;br /&gt;
&lt;br /&gt;
'''BESA Research coordinates.''' For dipole analyses the head model consists of a sphere. In the default situation where no digitized sensor information is available, the center of the sphere is defined by the crossing point between the lines joining T7 (=T3) and T8 (=T4) and Fpz and Oz.. The x axis is the T8-T7 line, positive at T8. The y axis is the Oz-Fpz line, positive at Fpz. The z-axis goes up out of the head through Cz. If digitized information is available, the axes are defined by the best fit between the idealized electrode locations and the real locations. The diameter of the sphere is also defined by the best fit. Units given in the display are in millimeters.&lt;br /&gt;
&lt;br /&gt;
The '''center of the spherical model''' is on average about 4 cm above the origin of the Head Coordinates. If digitized surface points are available, the sphere is fitted to these points. Using a cot file, it is possible to override the fit and define your own head center. In conjunction with BrainVoyager, you can use the MRI to seed the location of the head center (e.g. a fixed distance anterior to the posterior commissure) and save it as a cot file. Using MRI coregistration (see &amp;quot;''Integration with MRI and'' ''fMRi''&amp;quot;), the center is placed between the anterior (AC) and posterior (PC) commissures, at the half-way point between the anterior and posterior points (AP and PP). Without coregistration, the center corresponds to a point 17.5 mm behind AC in the standard MRI head.&lt;br /&gt;
&lt;br /&gt;
'''MRI coordinates.''' These are the coordinates used by BrainVoyager. These are defined by the MRI slices. Measurement units are millimeters.&lt;br /&gt;
&lt;br /&gt;
== The Channel and Digitized Head Surface Point Information Dialog Box ==&lt;br /&gt;
&lt;br /&gt;
Many data formats read by BESA Research require additional information about data channel, which are specified by additional, auxiliary files. This dialog box allows you to specify which auxiliary files are read in to supplement the information in the data file.&lt;br /&gt;
&lt;br /&gt;
The dialog box is opened automatically the first time a data file is opened, if&lt;br /&gt;
* auxiliary files other than a channel definition file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elb&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) are found&lt;br /&gt;
* no auxiliary files are found, and the data file was not written in compressed binary format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.foc&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.fsg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) by BESA Research &lt;br /&gt;
&lt;br /&gt;
When a data file is closed, the information about which auxiliary files have been read is stored in the database. When the file is opened for a second time the dialog box is not opened automatically, because the information is assumed to be correct – the files are read automatically.&lt;br /&gt;
&lt;br /&gt;
The dialog box can be opened manually by selecting &amp;quot;''File / Head Surface Points and Sensors / Load Coordinate Files''&amp;quot;, or using the shortcut &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''ctrl-L'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (2).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The dialog box is divided into several sections:&lt;br /&gt;
&lt;br /&gt;
* '''Internal data file information.''' Here you can see the file name, the originating system (file format), the name of the database file, if any, and the channel information as specified by the data file alone.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (4).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Suggestions.''' This box makes suggestions about what needs to be filled in, e.g. &amp;quot;Please enter electrode thickness&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (5).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Main feedback (top right hand corner).''' A green tick indicates that the currently selected data files are consistent among themselves and with the data file. A red exclamation mark indicates an inconsistency. Check the feedback texts in the subsequent sections for more information:&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (8).gif|70px]] [[Image:ST Electrodes (7).gif|71px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Channel configuration file specification.''' If the channel labels and types defined in the data file (&amp;quot;Internal data file information&amp;quot;) need to be changed, enter a file name here (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.elb&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). If a channel definition file exists with the same basename as the data file, or if a channel definition file has been specified previously (database entry exists), it will be selected automatically. To the right of the file name, feedback is provided about the number of channels and channel types found. If the labels are consistent with the data file, to the right the text &amp;quot;Good&amp;quot; is shown. If they are inconsistent, e.g. the file contains the wrong number of channel definitions, the text &amp;quot;Bad&amp;quot; is shown.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (9).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Digitized head surface point specification.''' Here you may specify a file containing digitized electrode and other head surface points. Optionally, the information can be split into two files, containing the coordinates (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp, *.eps&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) and the coordinate names (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.sfn'''&amp;lt;/span&amp;gt;). Alternatively, both labels and names can be contained in the coordinate file. If the files specify electrode coordinates, there '''must''' be a coordinate name for each electrode. The sequence may be different. BESA Research will use the names to assign each coordinate to the electrodes. Additional head surface points can have any other names. It is recommended that the first three digitized coordinates are the fiducials (fiduciary points), labelled &amp;quot;FidNz&amp;quot;, &amp;quot;FidT9&amp;quot;, &amp;quot;FidT10&amp;quot;. If your electrode labels not follow the 10-10 or 10-20 standard (e.g. in high-density electrode recordings), it is recommended to tick the box '''&amp;quot;Electrode labels non-conforming to 10-10 standard&amp;quot;'''. This will prevent BESA Research from using electrodes for an optimal rotation of the coordinate system which should not be used (e.g. A1, A2 which have known locations in 10-10, but are sometimes used in a nomenclature outside of 10-10). The example below shows the sphere adaption for an example data set with and without taking this into account.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (12).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The right picture shows that when discarding the non-conforming electrodes, the fiducials are correctly placed along the x any y axes.&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (10).gif ]] [[Image:ST Electrodes (11).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(In the special case of Neuromag files with electrode channels, the data file contains head surface points with the wrong labels. Here you may provide a label file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfn&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) without a corresponding digitized coordinate file.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Coregistration file.''' Here you may specify a file containing the coordinates of the head center (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.cot&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) or an ''MRI Coregistration File ''(&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). Head center redefinition is only necessary if you want to provide an external definition, e.g. from the MRI. The ''MRI Coregistration File ''is used if the data are to be coregistered with individual MRI. (see &amp;quot;''Integration with MRI and fMRi'' &amp;quot;). '''Note''' that if a head center file (cot file) with the same base name as the data file exists, it will be read automatically if the head center coordinates deviate by more than 1 mm from the internally calculated values. Changes are ignored if the radio button is set to &amp;quot;No&amp;quot;. This automated function allows you to change the head center during a session, using BrainVoyager's view of the MRI and the Source Module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (14).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''MEG sensor specification'''. If the file contains MEG channels, you may enter the name of a sensor coordinate file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pmg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;). This field is grayed if there are no MEG channels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (15).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Artifact coefficients file.''' If the data are to be artifact corrected, your pre-prepared coefficient file may be defined here. See the chapter &amp;quot;''Artifact Correction''&amp;quot;. Selecting the file here is equivalent to loading the file using the menu entry &amp;quot;''Artifact / Load''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (17).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each of the selected files, make sure the radio button &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Yes&amp;quot;'''&amp;lt;/span&amp;gt; is selected on the left-hand side of the dialog box. If files have been selected automatically, and you do not wish them to be read, select the &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''No'''&amp;lt;/span&amp;gt;&amp;quot; radio button.&lt;br /&gt;
&lt;br /&gt;
If some of the settings are incorrect or the text &amp;quot;Bad&amp;quot; is shown, you may edit the auxiliary files (the file is opened with the NotePad program) or browse for another file by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Browse'''&amp;lt;/span&amp;gt; buttons.&lt;br /&gt;
&lt;br /&gt;
After you have entered the required information, and the green tick at the top right indicates consistency, press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to continue. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Cancel'''&amp;lt;/span&amp;gt; to ignore the current settings. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear DB'''&amp;lt;/span&amp;gt; to delete the database files. Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear Events'''&amp;lt;/span&amp;gt; to delete the tag files (the part of the database that records events). Both &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Clear'''&amp;lt;/span&amp;gt; buttons close the currently-opened data file.&lt;br /&gt;
&lt;br /&gt;
== General Reading Rules for Data Files and Auxiliary Files ==&lt;br /&gt;
&lt;br /&gt;
Auxiliary files can complement the information in the data file. Here we specify what happens when a data file is opened:&lt;br /&gt;
&lt;br /&gt;
: 1. If the data file has been read previously, the database entry specifies which auxiliary files should be read. The file and the specified auxiliary files are opened and the data are displayed.&lt;br /&gt;
&lt;br /&gt;
: 2. If&lt;br /&gt;
&lt;br /&gt;
:: a) there is a channel definition file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.el?'''&amp;lt;/span&amp;gt;) with the same basename as the data file, and &lt;br /&gt;
&lt;br /&gt;
:: b) this file includes spherical coordinates for the EEG channels (including labels with entries in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; file), and&lt;br /&gt;
&lt;br /&gt;
:: C) there are no other auxiliary files with the same base name, the file will be opened and the data displayed. If files with the same basename are not found, BESA Research will look for files with the basename “default” (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;) in the data folder. If such files are not found, BESA Research will look for files with the basename “default” one folder above (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
: 3. If the data file has been written in binary format (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.foc'''&amp;lt;/span&amp;gt;, &amp;lt;span &lt;br /&gt;
style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''*.fsg'''&amp;lt;/span&amp;gt;) by BESA Research (after Jan. 2000), the file will be read, and all information is assumed to be complete. The file is opened and the data are displayed.&lt;br /&gt;
&lt;br /&gt;
: 4. In all other cases, the ''Channel and digitized head surface point information dialog box'' will be opened for you to specify and check auxiliary files. Auxiliary files with the same base name as the data file will be specified in the text boxes for file names. If files with the same basename are not found, BESA Research will look for files with the basename “default” (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;) in the data directory. If such files are not found, BESA Research will look for files with the basename “default” one directory above (e.g. &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;). Otherwise the text boxes will be left blank.&lt;br /&gt;
&lt;br /&gt;
: 5. Auxiliary files can be specified at a later time by selecting ''File/Head Surface Points'' and ''Sensors/Load'' ''Coordinate Files''. The ''Channel and digitized head surface point information dialog box'' will be opened.&lt;br /&gt;
&lt;br /&gt;
== Electrodes ==&lt;br /&gt;
&lt;br /&gt;
=== Electrode Conventions ===&lt;br /&gt;
&lt;br /&gt;
BESA Research adheres to the 10/20 and to the new 10/10 standard of the IEF (international EEG Federation). BESA Research will recognize the labels defined by these standards. The labels are stored in most EEG file headers. Otherwise, or in the case of erroneous labeling or sequencing of the recording channels, you may edit the channel labels and/or coordinates, or you may read an electrode file stored previously on disk. In addition to the 10/20 and 10/10 standard labels BESA Research recognizes the following labels: M1, M2 (left, right mastoids), SP1, SP2 (sphenoidal), CB1, CB2 (cerebellar), Chin, Neck, LO1, LO2 (lateral ocular), SO1, SO2 (supra-ocular), IO1, IO2 (infra-ocular). BESA Research will translate all the labels into spherical coordinates for spherical spline interpolation, mapping and source imaging. The following assignments are stored in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; in the BESA folder:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (19).gif ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Electrode labels in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd '''&amp;lt;/span&amp;gt;and their spherical coordinates. 10-20 electrodes are shown in&amp;lt;span style=&amp;quot;color:#ff0000;&amp;quot;&amp;gt; red and italic.''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The spherical coordinates are defined in degrees by the azimuth (from Cz, positive = right, negative = left hemisphere) and the latitude (counterclockwise from T7/T3 for left and from T8/T4 for right hemisphere) of each electrode. Please do not modify the existing labels or coordinates in this file, because this would adversely affect the interpolated (virtual) montages, the maps and the source montages and source images in BESA Research. However, you may add additional labels for scalp electrodes at the end of this file if needed (up to a total of 196). When you edit the electrode configuration or read in electrode files, BESA Research may replace the 10/20 standard labels T3, T4, T5, T6 by their new 10/10 equivalents T7, &lt;br /&gt;
&lt;br /&gt;
T8, P7, P8. However, in the initialization file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini '''&amp;lt;/span&amp;gt;you can reset to the old 10/20 standard by relabeling T7=T3, P7=T5, T8=T4, P8=T6 under the heading [Electrodes]. You may use the same feature to assign appropriate labels to the X1..X8 channels which exist in many systems, e.g. X1=EKG1 etc.&lt;br /&gt;
&lt;br /&gt;
=== Recommendations for electrode placement ===&lt;br /&gt;
&lt;br /&gt;
For source montages and source analysis two principles are important:&lt;br /&gt;
&lt;br /&gt;
# Covering of the lower head with inferior electrodes to record activity from the inferior surfaces of the brain, especially from the basal temporal lobe, from the temporal pole, from orbito-frontal cortex, and from basal occipital and cerebellar areas.&lt;br /&gt;
# Equal spacing of the electrodes over the whole head to cover all brain areas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following montage EEGxx, the number xx indicates the number of electrodes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG25 - Minimum 10-20 configuration including inferior electrodes'''&lt;br /&gt;
&lt;br /&gt;
This covers the 19 standard 10-20 electrodes:&lt;br /&gt;
&lt;br /&gt;
Fp1, Fp2, F7, F3, Fz, F4, F8 ....&lt;br /&gt;
&lt;br /&gt;
plus 6 inferior electrodes on both sides:&lt;br /&gt;
&lt;br /&gt;
F11, A1, P11, F12, A2, P12&lt;br /&gt;
&lt;br /&gt;
with a recommended continuation of the 20% distances, i.e. use F11 instead of F9, P11 instead of P9, A1 instead of T9 to have a wider coverage of the inferior head. A1 / A2 may be replaced by T9 / T10 (or FT9 / FT10) for convenience and comfort.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (21).gif ]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 25 electrodes. Right: left temporal basal activity mapped with 25 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG33 - Additional 10-10 electrodes within the major squares'''&lt;br /&gt;
&lt;br /&gt;
To the above electrodes add the following 8 intermediate electrodes:&lt;br /&gt;
&lt;br /&gt;
FC5, FC1, FC2, FC6, &amp;amp;nbsp;&amp;amp;nbsp;CP5, CP1, CP2, CP6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (23).gif]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 33 electrodes. Right: left temporal basal activity mapped with 33 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG35 - Additional supraorbital electrodes for better EOG separation'''&lt;br /&gt;
&lt;br /&gt;
SO1, SO2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG37 - Wider inferior coverage at interlaced 20% distances'''&lt;br /&gt;
&lt;br /&gt;
Continue 20% down from F7, FC5, CP5, P7 etc. and use the following 8 inferior electrodes instead of 6:&lt;br /&gt;
&lt;br /&gt;
F11, FT9, TP9, P11, &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;F12, FT10, TP10, P12&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG41 – Improved frontal and occipital coverage'''&lt;br /&gt;
&lt;br /&gt;
Additional electrodes halfway between Fz and Fp1 / FP2 and Pz and O1 / O2:&lt;br /&gt;
&lt;br /&gt;
AF1, AF2, &amp;amp;nbsp;&amp;amp;nbsp;PO1, PO2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG43 – Inferior chain with 5 electrodes including A1 / A2'''&lt;br /&gt;
&lt;br /&gt;
F11, FT9, A1, TP9, P11, &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;F12, FT10, A2, TP10, P12&lt;br /&gt;
&lt;br /&gt;
EEG43 represents the widest coverage with relatively even spacing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (25).gif]]&lt;br /&gt;
&lt;br /&gt;
''Left: recommended configuration for 43 electrodes. Right: left temporal polar activity mapped with 43 electrodes.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''EEG64-256'''&lt;br /&gt;
&lt;br /&gt;
With 64 or more channel caps, it is similarly recommended to use a sufficient number of inferior electrodes all around the head. At least 4 inferior temporal electrodes on each side and additional electrodes above or below the eyes (outside of the cap) are suggested.&lt;br /&gt;
&lt;br /&gt;
=== Editing the channel configuration ===&lt;br /&gt;
&lt;br /&gt;
Only use the channel configuration editing facility if the electrodes or the common reference have not been correctly defined by your digital EEG system, or if you want to define specific spherical coordinates for your scalp electrodes. It is your responsibility to check and provide the correct sequence of electrode labels in correspondence with the sequence of channels in the EEG data file. If these sequences do not match exactly, errors will occur in the computation of maps, source images and interpolated montages.&lt;br /&gt;
&lt;br /&gt;
We will use the example EEG file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg'''&amp;lt;/span&amp;gt; in the subdirectory ''Examples/EEG-Focus'' of the BESA Research directory to explain the editing of electrode labels and coordinates:&lt;br /&gt;
&lt;br /&gt;
1. Select ''File'', then click on ''Open'', or click on &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg '''&amp;lt;/span&amp;gt;if this file is contained in the list of currently selected EEG files.&lt;br /&gt;
&lt;br /&gt;
2. Select ''Edit'', then click ''Channel Configuration''. The dialog box shown below will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (27).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the upper left of the figure you see the dropdown menu after selecting the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''File '''&amp;lt;/span&amp;gt;menu in the dialog box. This menu allows to edit a new ('''''New''''') or an existing ('''''Open''''') electrode file and to save the changes to the same ('''''Save''''') or a different ('''''Save As''''') file. Normally, it will not be necessary to use this menu. The control fields on the right will be sufficient. If you type ''''''Ok'''''', you will be given the option of saving the changes to a file.&lt;br /&gt;
&lt;br /&gt;
3. Click on &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Reload org. &amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;Labels'''&amp;lt;/span&amp;gt; to reread the original labels as stored in the file header of &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''eeg2.eeg'''&amp;lt;/span&amp;gt;. BESA Research quits editing and redisplays the EEG. Repeat step 2 and select &amp;quot;''Edit / Channel'' ''Configuration''&amp;quot; again. Note: The button &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Reload org. Labels'''&amp;lt;/span&amp;gt; is not available if there are no labels in the file header.&lt;br /&gt;
&lt;br /&gt;
4. Click on the empty space of the scroll bar below the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''scroll '''&amp;lt;/span&amp;gt;button and on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''down arrow'''&amp;lt;/span&amp;gt; of the '''scroll bar''' to display the remaining electrodes in the file.&lt;br /&gt;
&lt;br /&gt;
5. Click on electrode '''R''' (line 32), then on the button &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Delete Electrode'''&amp;lt;/span&amp;gt; to remove the associated channel, which does not contain any signal. Note that you may not omit intermediate channels, even if they do not exhibit signals, because the correct correspondence between the series of electrodes and the EEG channels will not be maintained. Use the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;quot;Edit / Bad Channels&amp;quot;'''&amp;lt;/span&amp;gt; menu to disable artifactual or empty channels.&lt;br /&gt;
&lt;br /&gt;
6. Click on''' EOG''' (line 30) and change the entry to '''EOG1'''. Do not type &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;lt;Enter&amp;gt;,'''&amp;lt;/span&amp;gt; but click on the next or a different electrode box to accept the changes.&lt;br /&gt;
&lt;br /&gt;
7. '''Double click''' on '''EOG '''(line 31). This will highlight the entry. Simply type the new name '''EOG2''', and note that the old label is replaced when highlighted. Electrodes '''30 '''and '''31 '''are now defined as distinct electrodes. Next, we want to replace the label '''T10 '''by '''A2'''.&lt;br /&gt;
&lt;br /&gt;
8. Click on the label '''T10''' (line 24). Then click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''drop down'''&amp;lt;/span&amp;gt; arrow right of the highlighted label to obtain the list of default scalp electrodes (read from &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; and sorted alphabetically). Type '''A''' to jump to the electrodes beginning with letter A (see below). Type '''2''' or '''click''' on '''A2''' in the list. Click on the '''type '''box (Scalp channel) to close the list and display the new entry in line 24. Note that this is the most convenient way to edit an electrode label.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (28).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9. Exercise: repeat step 8 to replace '''T9''' by '''A1'''. Restore labels '''T10''' and '''T9''' in lines 24 and 21.&lt;br /&gt;
&lt;br /&gt;
10. Replace SO1 and SO2 (supra-orbital) by '''PSO1 '''and '''PSO2 '''and note that these electrodes are changed to the''' 'Polygraphy'''' type, because no coordinates are associated with these labels.&lt;br /&gt;
&lt;br /&gt;
11. After you click &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''''OK''''&amp;lt;/span&amp;gt;, the box '''Write Channel Configuration File''' will appear and display a name for the current electrode file. By default, the BESA electrode file path and current file name will be used and supplemented by the extension &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''''.elb''''&amp;lt;/span&amp;gt;. The electrode file path may be set in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini'''&amp;lt;/span&amp;gt; file [Defaults] section under ElectrodeFilePath. If no electrode file path is specified in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''BESA.ini'''&amp;lt;/span&amp;gt; file, the default electrode file path ''Montages\Channels ''is used. Simply click '&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;' or type &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''&amp;lt;Enter&amp;gt; '''&amp;lt;/span&amp;gt;to save the changes to this file, or select a new file name and/or path, if you do not want to store the electrode file in the BESA Research electrode file directory.&lt;br /&gt;
&lt;br /&gt;
Note that by using the default 10/10 labels (see chapter &amp;quot;''Electrode conventions''&amp;quot;) you specify that the associated electrode is a scalp electrode. Hence, different labels must be used for polygraphic, intracranial or MEG channels. After you have entered a new non-scalp label, you may select the type of the electrode/channel amongst the different groups ('''Polygraphy, Intracranial, MEG Channel''') from the drop down list in the ''''''Type'''''' box. This will allow for using separate selection and scaling facilities of the channel group control push-buttons at the right of the screen ('''All, Scp, Pgr, Icr, MEG'''). If you have entered a new non-scalp label and select the type '''Scalp Channel''', or if you click on the ''''Advanced&amp;gt;&amp;gt;'''' field, boxes will appear to enter the spherical coordinates (azimuth and latitude) of this electrode (cf. Fig. 6.5). These features may be used to specify non-standard scalp electrodes. Please check the earlier sections of this chapter for electrode conventions. You may view the locations of the scalp electrodes on the head schemes in the mapping window. Select '''Show Electrodes in Maps''' in the &amp;quot;&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''View / Options'''&amp;lt;/span&amp;gt;&amp;quot; menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:ST Electrodes (29).gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Hint:''' If you want to specify the spherical coordinates of an electrode which is close to a standard electrode, click on the ''''Advanced &amp;gt;&amp;gt;'''' field, enter the label of the standard electrode and append a single quotation mark. This will specify that the electrode is close to the labeled location but has different coordinates. The ''Scalp Channel'' type will not be replaced by '''Polygraphy.''' Then edit '''Azimuth''' and '''Latitude'''. This convention is used by BESA Research when reading electrode coordinate files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''(*.elp'''&amp;lt;/span&amp;gt;), e.g. from the BESA program. The coordinates are read and compared with the default coordinates to assign the closest label. Then a single quotation mark is appended to the label, and the coordinates are assigned as specified in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.elp'''&amp;lt;/span&amp;gt; file. For example, open &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''segm1.eeg'''&amp;lt;/span&amp;gt; in the ''Examples\EEG-Focus'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
Note that the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''segm1.elp '''&amp;lt;/span&amp;gt;is searched for automatically in the directory of the data file when opening the data file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Edit Common Scalp Reference'''&lt;br /&gt;
&lt;br /&gt;
There is a separate line at the bottom in the ''Channel Configuration dialog box'' to enter the label and coordinates of the '''Common Scalp Reference electrode'''. If this is specified and enabled (click on field '''Enabled'''), the information provided by the fact that all scalp electrodes were recorded against a common recording reference will be used for mapping, source imaging and virtual montages. This information will be lost if the common reference has not been specified or if a combination of electrodes has been used as reference during recording. Specify the '''Common Scalp Reference electrode''' only if all electrodes have been referenced to the same single electrode and if a standard 10/10 location has been used for the common recording reference.&lt;br /&gt;
&lt;br /&gt;
'''Note that BESA Research cannot process digital EEG data correctly if there is no common recording reference''', and if different recording references were used for the various scalp electrodes. For intracranial and polygraphic channels different references may be used. It is preferable to use the common reference also for electrode channels near the eyes, because these electrodes provide valuable information for mapping, source imaging and interpolated montages. The traditional bipolar channels (e.g. horizontal and vertical '''EOG''') may be '''reconstructed digitally''' using the ''Selected Channels'' group or user-defined montages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 3D Coordinates for Precise Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction - Working with Digitized 3D Coordinates ===&lt;br /&gt;
&lt;br /&gt;
Working with digitized electrode coordinates usually requires reading in additional (auxiliary) files. The procedure is described in the chapter &amp;quot;''Working with auxiliary files''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Data reading rules for EEG ===&lt;br /&gt;
&lt;br /&gt;
This section explains which additional files are read, or which files have to be read in order to provide the necessary information for mapping and source montages.&lt;br /&gt;
&lt;br /&gt;
Assume file name is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.xxx'''&amp;lt;/span&amp;gt;. datafile is the base name, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.xxx'''&amp;lt;/span&amp;gt; is the extension. Replace the text ''datafile'' by the base name of your own file, and the extension&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;'' xxx''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; by the extension of your own file.&lt;br /&gt;
&lt;br /&gt;
'''Channel definitions for EEG:'''&lt;br /&gt;
&lt;br /&gt;
* '''Labels have 10-10 names''': default locations will be used.&lt;br /&gt;
* '''Labels do not have 10-10 names''': Channels are interpreted as '''polygraphic'''. Mapping is not possible without one or more of the following additional files.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Define channel names and types.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elb'''&amp;lt;/span&amp;gt; exist (i.e. files with basename d''efault ''one folder above the data file): Channel names and types will be replaced by those defined in this file, in order of occurrence. The ''ela'' file contains just labels and, optionally, types. The ''elp'' file contains spherical coordinates and can contain labels and types. The ''elb'' file contains the same information in binary format. See chapter &amp;quot;''[[Working_With_Additional_Files#Channel_definition_file_conventions_and_formats|Working with additional files / Channel Definition File Conventions]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define order in which electrodes were digitized.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfn'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; one folder above the data file): electrode names are supplied in the order in which coordinates were supplied in the ''sfp'' file. These names must match with the names supplied in the data file or defined in the ''ela/elp/elb'' file. BESA Research uses this to sort coordinates into the order of channels in the file. If fiducials exist, they should be defined on the first three lines. If they do not exist, BESA Research will simulate them (so that it can define the head coordinate system). See chapter ''&amp;quot;[[Working_With_Additional_Files#sfn_.28surface_point_name.29_file|Working with additional files / sfn (surface point name) file]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define electrode coordinates.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfp'''&amp;lt;/span&amp;gt; exists (i.e. file default.sfp one folder above the data file): electrode coordinates will be replaced/defined by the coordinates defined in this file. If &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; does not exist, labels can also be defined in this file. If fiducials exist, they should be defined on the first three lines. If they do not exist, BESA Research will simulate them. See chapter &amp;quot;''[[Working_With_Additional_Files#sfp_.28surface_point_coordinate.29_file|Working with additional files / sfp (surface point coordinate) file]]''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
'''Define coregistration information.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;sfh'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfh'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfh'''&amp;lt;/span&amp;gt; exists (i.e. file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.sfh '''&amp;lt;/span&amp;gt;one folder above the data file): head center and relative position of the unit sphere with respect to the head coordinate system is determined by the coregistration between EEG and MRI. See online help chapter ''&amp;quot;[[Integration_with_MRI_and_fMRI|Integration with MRI and fMRI]]&amp;quot;''.&lt;br /&gt;
&lt;br /&gt;
'''Define head center.''' No coregistration file exists (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, see above). File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.cot'''&amp;lt;/span&amp;gt; exists (i.e. file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.cot&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;one folder above the data file): head center as computed by fitting a sphere to the surface points is replaced by the head center coordinates contained in this file. See chapter ''&amp;quot;[[Working_With_Additional_Files#cot_.28Head_center.29_file|Working with additional files / cot (Head center) file]]&amp;quot;''.&lt;br /&gt;
&lt;br /&gt;
=== Data reading rules for MEG ===&lt;br /&gt;
&lt;br /&gt;
Assume file name is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''''datafile.xxx''''&amp;lt;/span&amp;gt;. '''datafile''' is the base name. '''xxx''' is the extension. Replace the text '''datafile''' by the base name of your own file, and the extension '''xxx''' by the extension of your own file.&lt;br /&gt;
&lt;br /&gt;
Here we consider cases a) MEG alone, b) MEG+EEG.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Automatic procedure:'''&lt;br /&gt;
&lt;br /&gt;
Labels have names defined in the files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd'''&amp;lt;/span&amp;gt;. Channels are interpreted as MEG. However, sensor locations and head surface point locations must be defined in additional files as described below. Mapping and source analysis are not possible without one or more of the following additional files.&lt;br /&gt;
&lt;br /&gt;
'''Define channel names and types.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.elb'''&amp;lt;/span&amp;gt; exist, or files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.ela'''&amp;lt;/span&amp;gt;, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elp'''&amp;lt;/span&amp;gt;, or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.elb'''&amp;lt;/span&amp;gt; exist (i.e. files with basename'' default'' one folder above the data file): Channel names and types will be replaced by those defined in this file, in order of occurrence. The'' ela''&amp;amp;nbsp;file contains just labels and (optionally) channel types. The ''elp'' file contains spherical coordinates and can contain labels and types. The'' elb'' file contains the equivalent information in binary format. See chapter “''Electrode file conventions'' ''and formats.”''&lt;br /&gt;
&lt;br /&gt;
'''MEG+EEG.''' Define order in which electrodes were digitized. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfn'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfn'''&amp;lt;/span&amp;gt; one folder above the data file): electrode names are supplied in the order in which coordinates were supplied in the ''sfp'' file (or in the location descriptor in the data file: e.g. Neuromag). These names must match with the names supplied in the data file or defined in the ''ela/elp/elb'' file. BESA Research uses this to sort coordinates into the order of channels in the file. See chapter “''Working with additional files/ sfn (surface point name) file”.''&lt;br /&gt;
&lt;br /&gt;
'''MEG+EEG.''' Define head surface point/electrode coordinates. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfp'''&amp;lt;/span&amp;gt;'' ''exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfp'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfp'''&amp;lt;/span&amp;gt; one folder above the data file): electrode coordinates will be replaced/defined by the coordinates defined in this file. If &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfn'''&amp;lt;/span&amp;gt; does not exist, labels can also be defined in this file. See chapter “''Working with additional files/ sfp (surface point'' ''coordinate) file''”. The labels of electrode coordinates '''must '''match to those defined for the data channels. BESA Research will use the labels to associate coordinates with the correct channel.&lt;br /&gt;
&lt;br /&gt;
'''Define sensor coordinates'''. File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.pos'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.pmg'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.pos(.pmg)'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.pos(.pmg)'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.pos(.pmg)'''&amp;lt;/span&amp;gt; one folder above the data file): coordinates are defined in this file. The convention is that'' pos'' files contain gradiometer coordinates and'' pmg'' files contain magnetometer coordinates. This is not necessary for the program to read in values properly: the program makes its decision about the sensor type on the basis of the number of coordinate values on one line in the file (6 = magnetometers, 9 = gradiometers). See chapter “''Working with additional files/ pos or pmg (MEG sensor coordinate) file”.''&lt;br /&gt;
&lt;br /&gt;
'''Define coregistration information.''' File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.sfh'''&amp;lt;/span&amp;gt; exists, or file&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;''' default.sfh&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.sfh'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.sfh'''&amp;lt;/span&amp;gt; one folder above the data file): head center and relative position of the unit sphere with respect to the head coordinate system is determined by the coregistration of the head coordinates with MRI. See (online) help chapter ''&amp;quot;Integration with MRI and fMRI&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
'''Define head center.''' No coregistration file exists (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfh&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;, see above). File &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''datafile.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot'''&amp;lt;/span&amp;gt; exists, or file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''..\default.cot'''&amp;lt;/span&amp;gt; exists (i.e. file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.cot&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt; '''&amp;lt;/span&amp;gt;one folder above the data file): head center as computed by fitting a sphere to the surface points is replaced by the head center coordinates contained in this file. See chapter ''&amp;quot;Working with additional files / cot (Head center) file&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Reading MEG files in ASCII format ===&lt;br /&gt;
&lt;br /&gt;
'''BESA Research uses labeling or channel type definitions to decide whether channels are EEG or MEG. '''Based on the labels defined for the channels, or the type specified by the channel definition file, the program will try to find auxiliary files that define electrode coordinates or MEG sensors.&lt;br /&gt;
&lt;br /&gt;
BESA Research uses four files to make its decision:&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.ela/.elp'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;The channel type defined here overrides definitions in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ecd&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; (below).&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines electrode labels and default spherical coordinates based on the 10-20 and 10-10 naming system&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines labels and default spherical coordinates for the BTi whole-head system&lt;br /&gt;
* &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;defines labels and default spherical coordinates for the Neuromag whole-head system&lt;br /&gt;
&lt;br /&gt;
If the program finds a label in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;, the channel will automatically be defined as EEG. If not, if it finds a label in one of the other files, the channel will be defined as MEG. If it doesn't find the label anywhere, the channel will be defined as Polygraphic.&lt;br /&gt;
&lt;br /&gt;
The spherical coordinates defined in these files are sufficient for mapping the data. Auxiliary files defining the real sensor coordinates are required for source analysis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Defining default label and coordinate file for a new MEG system'''&lt;br /&gt;
&lt;br /&gt;
When preparing an MEG from a system other than BTi-WHS or Neuromag for import to BESA Research, you should edit either &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''bti.ecd'''&amp;lt;/span&amp;gt; or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''nmag.ecd '''&amp;lt;/span&amp;gt;to conform with your system. If sensor files (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos/*.pmg&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) are always available for your files, the coordinates in the ''ecd ''files are irrelevant: all you need do is define the labels for your own MEG system or use the labels as already defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Files to prepare for reading in each data file'''&lt;br /&gt;
&lt;br /&gt;
Each auxiliary file should have the same base name as your data file.&lt;br /&gt;
&lt;br /&gt;
'''Define channel labels.''' There are several possibilities:&lt;br /&gt;
* Generate your data file according to the BESA'' avr'' ''format or the ASCII multiplexed format.'' Labels are listed in the second line of the file.&lt;br /&gt;
* Generate a ''label file'' (extension &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''.ela'''&amp;lt;/span&amp;gt;) with one MEG channel label per line (matching with your ''ecd ''file as defined above) or with the type &amp;quot;MEG&amp;quot; and a label for each line.&lt;br /&gt;
&lt;br /&gt;
Label definitions are also possible using ''elp'' or ''elb'' files, but the above two solutions are recommended because they are the simplest.&lt;br /&gt;
&lt;br /&gt;
'''Define sensor coordinates.''' Generate a ''pos'' or ''pmg'' file. Make sure that the number of sensors matches with the number of MEG channel definitions in your data file.&lt;br /&gt;
&lt;br /&gt;
'''Define fiducials and other head surface points.''' Generate an ''sfp'' file. The first three lines define the fiducials. Subsequent lines define additional surface points.&lt;br /&gt;
&lt;br /&gt;
'''Define coordinates of the center of the head.''' Generate a ''cot'' file. If this file is absent, BESA Research generates the coordinates by fitting a sphere to the head surface points.&lt;br /&gt;
&lt;br /&gt;
Note that all coordinates should be within the same frame of reference, i.e. the same coordinate system. Units must be in meters, centimeters, or millimeters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example: Defining Channel Labels ==&lt;br /&gt;
&lt;br /&gt;
The files described in these examples can be found in the ''.\Examples\Xtras\EEG+Channel Labels'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
The simplest way to define electrode coordinates is to use BESA Research’s default settings (defined in the file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;). In this case, you only need to provide a list of channel labels. If a channel label is defined in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; (i.e. if the labels belong to the 10-20 or 10-10 system), BESA Research will recognize the channel as EEG, and will allocate 3D coordinates.&lt;br /&gt;
&lt;br /&gt;
Labels are not always supplied correctly in the data file. You can override the internal labels in several ways:&lt;br /&gt;
* Read the data file, and then use &amp;quot;''Edit / Channel Configuration''&amp;quot; to redefine the channels. The configuration is stored in a file with the name &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''basename.elb'''&amp;lt;/span&amp;gt; (for binary data) or &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''basename.elp'''&amp;lt;/span&amp;gt; (for ASCII data), where basename is the base name (name without the extension) of your data file.&lt;br /&gt;
* Prepare a label file (with the extension ''ela'') containing a list of labels. This can also specify channel types (e.g. EEG, Polygraphic, Intracranial, MEG).&lt;br /&gt;
* Prepare a file (with the extension ''elp'') containing spherical coordinates of the channels. This is the method used with the previous version of BESA Research. If the file doesn’t contain labels, labels are allocated based on their proximity to the 10-20 or 10-10 definitions in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following examples illustrate the above three methods. The input files are all in ''BESA avr format, ''although these examples apply to all EEG data formats in which only EEG channels exist.&lt;br /&gt;
&lt;br /&gt;
If the data file contains polygraphic or other types of non-EEG channel, the types need to be defined. See the ''EEG+Polygraphic channels example.'' MEG is a special case, because the sensor coordinates need to be defined. See the ''MEG ASCII and the MEG+EEG'' ''examples''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. EEG file containing wrong labels – use ''Edit/Channel Configuration ''to redefine labels'''&lt;br /&gt;
* The'' avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.avr'''&amp;lt;/span&amp;gt;, contains the EEG labels. Channels 4 and 14 have been mislabeled – the labels need to be swapped.&lt;br /&gt;
* Open the file with '''''File/Open''''' (Select file type ''BESA avr''. Find the correct directory ''Xtras\EEG+Channel Labels'').&lt;br /&gt;
* The file should open correctly, displaying 32 channels of EEG.&lt;br /&gt;
* The channel coordinates can be viewed by typing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’ '''&amp;lt;/span&amp;gt;key (make sure the cursor is off). There will be a 3D display of the electrodes. Clicking on an electrode will display the label and the coordinates.&lt;br /&gt;
* In this file, channels 4 and 14 have been mislabeled as P3 and F3. In fact, the labels should be the other way around. We will now correct this:&lt;br /&gt;
* Select '''''Edit / Channel Configuration'''''.&lt;br /&gt;
* Type ‘F3’ into the label for channel 4, and ‘P3’ into the label for channel 14. Then type ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;’. The new channel configuration will be saved in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.elp'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* In the data display, the labels of channels 4 and 14 will now be displayed correctly.&lt;br /&gt;
* Close the file ('''''File/Close''''') and open it again. Note that the labels are still correct. This is because the new channel configuration file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithLabels.elp'''&amp;lt;/span&amp;gt;, is read automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. EEG file with no labels – channel labels in auxiliary file'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithoutLabels.avr'''&amp;lt;/span&amp;gt;, has no labels.&lt;br /&gt;
* EEG labels are defined in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithoutLabels.ela'''&amp;lt;/span&amp;gt;. This is read automatically when the file is opened.&lt;br /&gt;
* In this example, labels are correct. Each label in the ''ela'' file is on one line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp1''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp2''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F7''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F3''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''...''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3. EEG file with no labels – channel labels derived from spherical coordinates'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithSphericalCoords.avr'''&amp;lt;/span&amp;gt;, has no labels.&lt;br /&gt;
* Spherical coordinates are defined in the ''elp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGwithSphericalCoords.elp'''&amp;lt;/span&amp;gt;. This contains spherical coordinates (theta and phi) and no labels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-93 -72''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''92 74''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-97 -40''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-61 -49''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''-46 -88''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''62 51''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* When the data file is opened, the ''elp'' file is read automatically, and BESA Research uses the tables in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''default.ecd'''&amp;lt;/span&amp;gt; to assign channel labels. To indicate that it has assigned user defined coordinates and matched with the closest standard electrode, BESA appends an apostrophe (‘) to each label:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp1’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fp2’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F7’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''F3’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz’''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* We advise to assign specific labels as well as spherical coordinates if you want to use your own spherical coordinate system, e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.3cm;margin-right:0cm;&amp;quot;&amp;gt;''FP1u -90 -72''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 4. EEG file with no labels – channel labels not in basename.el?'''&lt;br /&gt;
* The ''avr ''file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGnoLabelsNoElaFile.avr'''&amp;lt;/span&amp;gt;, has no corresponding ''ela, elp'', or ''elb'' file, i.e. no file with the same base name and the ''el?'' extension.&lt;br /&gt;
* When you open the file, BESA Research will ask for a channel configuration file. The ''File Open'' ''dialog ''will select the ''directory .\Montages\Channels''. The idea is that standard (= frequently used) electrode configurations should be kept in this directory.&lt;br /&gt;
* Select the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''XtrasExample.ela'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* Close the data file and reopen it. The file will open with the correct labels. In the BESA window title you will see that the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGnoLabelsNoElaFile.elp'''&amp;lt;/span&amp;gt; has been read automatically. This file was created when &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''XtrasExample.ela'''&amp;lt;/span&amp;gt; was read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example: Mixed EEG and Polygraphic Data ==&lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ EEG+Polygraphic'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
The data are in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEG+Polygraphic.avr'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The third channel is defined as polygraphic in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEG+Polygraphic.ela '''&amp;lt;/span&amp;gt;file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Fp1 &lt;br /&gt;
 Fp2 &lt;br /&gt;
POLY Test&lt;br /&gt;
 F3 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The prefix &amp;quot;''POLY''&amp;quot; specifies that the channel is polygraphic. Most other channels are interpreted as EEG because the labels are known in the 10-20 system.&lt;br /&gt;
&lt;br /&gt;
Similarly, channel 31 is defined as intercranial, using the prefix &amp;quot;''ICR''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that you can also define channels as EEG by specifying the ''&amp;quot;EEG&amp;quot; ''prefix (e.g. ''&amp;quot;EEG E1&amp;quot;. ''This is useful if there are many more channels than are defined in the 10-10 or 10-20 systems, and if the channel coordinates are defined.&lt;br /&gt;
&lt;br /&gt;
== Example: EEG with Digitized Coordinates ==&lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the .''\Examples\Xtras\ EEG+Digitization Points ''subdirectory.&lt;br /&gt;
&lt;br /&gt;
In the previous examples, we have illustrated how to assign labels to channels using channel definition files. In those examples, only spherical coordinates were defined. Here we will show how to read digitized surface points into BESA Research, using the surface point (''sfp'') coordinate file and the surface point name (''sfn'') file.&lt;br /&gt;
&lt;br /&gt;
The principles of defining digitization coordinate files are:&lt;br /&gt;
* The labels in the ''sfp/sfn'' file combination are used to assign coordinates to electrodes. Thus, if a coordinate has the name ‘''Fz''’ it will be assigned to the channel with the label ‘''Fz''’.&lt;br /&gt;
* In consequence, digitization of surface points can be in a different order to the sequence of channels in the data file. Matching to channels is done by comparing the labels.&lt;br /&gt;
* We recommend that the fiducial points, '''nasion, left preauricular point, right preauricular point''' be digitized. If you do not digitize them, BESA Research will simulate these locations (see ''“Example: Digitization points with and without Fiducials”''). Fiducial points, labeled '''FidNz, FidT9, FidT10''' should be the first three coordinates in the ''sfp'' file.&lt;br /&gt;
* As with the channel definition files, it is easiest for BESA Research if you name the ''sfp/sfn'' files using the base name of the data file, e.g. if the data file is named &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.avr'''&amp;lt;/span&amp;gt;, name the'' sfp'' file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.sfp'''&amp;lt;/span&amp;gt; and the ''sfn'' file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''doodah.sfn'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* You specify the files to be read in the ''Channel and digitized head surface point information dialog box.''&lt;br /&gt;
&lt;br /&gt;
See ''“Example: Polhemus Digitizer Data” ''for a discussion of how to format the files originating from Polhemus and other digitizers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. EEG file containing labels, ''sfp'' file containing coordinates, ''sfn ''file containing coordinate names'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;, contains the channel labels. Therefore, we don’t need a channel definition file.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;, contains digitized coordinates of electrodes and of additional surface points. The labels in the file do not correspond to the electrode labels in the ''avr ''file.&lt;br /&gt;
* The ''sfn'' file contains the corrected labels (1 line for each corresponding line in the'' sfp'' file). Now it is possible to match up electrode labels with the labels in the ''avr ''file.&lt;br /&gt;
* Open the data file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized1.avr'''&amp;lt;/span&amp;gt;. The ''Channel and digitized head surface point information dialog box'' will open automatically.&lt;br /&gt;
* Note the green tick mark at the top right of the dialog box. This is feedback to say that coordinates of all 32 electrodes have been found.&lt;br /&gt;
* Look at the entry ‘''Digitized head surface points’''. Here you will see that the ''sfp'' and the ''sfn ''files have been read automatically (because of the common base name). There are 51 locations. Note that the digitizer file can contain many more locations than the electrodes. BESA Research uses the locations for fitting the sphere of the spherical head model in source analysis. BESA Research can export these locations for coregistration with the MRI.&lt;br /&gt;
* Define the electrode thickness as 6 mm (at the right of the ‘''Digitized head surface points’'' box. This is the distance of the digitized point on the electrode to the surface of the head.&lt;br /&gt;
* Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; in the dialog box and view the coordinates by pressing the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt; key.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. EEG file without labels, channel labels in ''ela'' file, surface point coordinates and names in ''sfp'' file'''&lt;br /&gt;
* The ''avr'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.avr'''&amp;lt;/span&amp;gt;, has no channel label. Therefore, a label file is required. Here, the label file is &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.ela'''&amp;lt;/span&amp;gt;.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''EEGdigitized2.sfp'''&amp;lt;/span&amp;gt;, contains digitized coordinates of electrodes and of additional surface points. The labels are defined correctly in the ''sfp ''file, i.e. for every EEG channel label there is a corresponding coordinate. Therefore, no ''sfn'' file is required.&lt;br /&gt;
* When you open the file, don’t forget to define the electrode thickness as 6 mm in the ''Channel and digitized head surface point information dialog box.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example: Polhemus Digitizer Data ==&lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ EEG+Digitization Points'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
Data from the Polhemus (other digitizers too) may often not fit the format BESA Research requires for the surface point file. Note that Polhemus data can be exported directly into BESA-compatible ''sfp''-files using the LOCATOR software.&lt;br /&gt;
&lt;br /&gt;
BESA Research requires either&lt;br /&gt;
* just the cartesian coordinates (x, y, z) values -- one set of coordinates per line. In this case, labels must be defined in a parallel surface point name file, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0.5 &amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:0cm;margin-right:0cm;&amp;quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* the cartesian coordinates plus a label. The label can be in front of or behind the coordinates on the line, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0.5&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68 &amp;amp;nbsp;Fz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:2.54cm;margin-right:0cm;&amp;quot;&amp;gt;or&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''Fz &amp;amp;nbsp;0.5 &amp;amp;nbsp;3.75 &amp;amp;nbsp;12.68'' &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of a few lines of a (''sfp'') file that are not read correctly by BESA Research:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''Nz&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;87.721&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''T9 &amp;amp;nbsp;-79.131&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''T10&amp;amp;nbsp;&amp;amp;nbsp;67.253&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''1 &amp;amp;nbsp;-34.192 &amp;amp;nbsp;103.374&amp;amp;nbsp;&amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''2&amp;amp;nbsp;&amp;amp;nbsp;23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048 &amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''3&amp;amp;nbsp;&amp;amp;nbsp;-81.179&amp;amp;nbsp;&amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''4 &amp;amp;nbsp;-60.701&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What is wrong?&lt;br /&gt;
&lt;br /&gt;
* First, some of the points are just numbered. These numbers don't tell BESA Research which electrode channel to which the coordinates should be assigned – assignments should be via channel labels and not numbers.&lt;br /&gt;
* Second, Nz, T9, T10 define the fiducials. Instead, the labels FidNz, FidT9, FidT10 are required (prefix &amp;quot;Fid&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What should be done? Probably the best way is&lt;br /&gt;
&lt;br /&gt;
&amp;amp;nbsp;a) keep only the coordinates in the &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp &amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''0&amp;amp;nbsp;&amp;amp;nbsp;87.721 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-79.131 &amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''67.253 &amp;amp;nbsp;0 &amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-34.192&amp;amp;nbsp;&amp;amp;nbsp;103.374 &amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048&amp;amp;nbsp;&amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-81.179 &amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''-60.701&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
b) prepare a surface point name file (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfn&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;) containing the corresponding labels:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidNz''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT9''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT10''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp1''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp2''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F7''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F3''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Keeping labels and coordinates separate means that the label file needs generating only once. The coordinate file is different for each subject.&lt;br /&gt;
&lt;br /&gt;
Alternatively, if your digitizer program attaches the labels correctly to the coordinates, then you can prepare the ''sfp'' file like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidNz&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;87.721 &amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;''FidT9&amp;amp;nbsp;&amp;amp;nbsp;-79.131&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''FidT10&amp;amp;nbsp;&amp;amp;nbsp;67.253&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;0''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp1&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-34.192&amp;amp;nbsp;&amp;amp;nbsp;103.374 &amp;amp;nbsp;31.868''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''Fp2 &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;23.642&amp;amp;nbsp;&amp;amp;nbsp;103.048&amp;amp;nbsp;&amp;amp;nbsp;30.351''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F7&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-81.179 &amp;amp;nbsp;&amp;amp;nbsp;62.913&amp;amp;nbsp;&amp;amp;nbsp;27.596''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;'''F3&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;-60.701&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;79.631&amp;amp;nbsp;&amp;amp;nbsp;78.273''&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example: Digitization points with and without Fiducials ==&lt;br /&gt;
&lt;br /&gt;
We recommend that if electrodes are digitized, you should also digitize the three fiduciary points:''' Nasion''', '''and left and right preauricular points'''. We refer to these points as &amp;quot;fiducials&amp;quot;. We name them '''&amp;quot;FidNz&amp;quot;,''' '''&amp;quot;FidT9&amp;quot;,''' and '''&amp;quot;FidT10&amp;quot;.'''&lt;br /&gt;
&lt;br /&gt;
If you do not digitize these points, BESA Research will simulate them, i.e. it will generate the points where it expects them to be, based on the fit of a sphere to the existing points, and on the names of surface points of known locations. &amp;quot;Known locations&amp;quot; means: the surface point name must be a 10-20 or 10-10 electrode name (e.g. &amp;quot;Cz&amp;quot; -- arbitrary labels, such as &amp;quot;E10&amp;quot; is not a known location). Therefore, BESA Research requires that at least 3 surface points with known labels are defined.&lt;br /&gt;
&lt;br /&gt;
In a file containing digitization points (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.sfp&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt;), the fiducials should be the first three sets of coordinates, i.e. the first three lines of the file. The remaining coordinates in the file can be electrode (or other surface point) coordinates, in any order. The assignment of electrode coordinates to data channels is achieved by matching the coordinate labels to data channel labels.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Consequences of omitting fiducials'''&lt;br /&gt;
&lt;br /&gt;
When these files have been read into BESA Research, look at the head surface points in 3D using ''File/Head Surface Points'' ''and Sensors/View'' (or use the shortcut &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt;). You will see small differences in fiducial locations between the real and the simulated locations. You can expect very slight influences on the results of source modeling (the spherical head may be rotated slightly, although the head center and radius will be identical), and output of source locations in head coordinates will be different, because these coordinates are based on fiducial locations (see chapter ''“Working with Electrodes and Surface'' ''Locations/ Coordinate systems''”).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example: ASCII Import ==&lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''.\Examples\Xtras\ASCII Import'' subdirectory.&lt;br /&gt;
&lt;br /&gt;
When should the Import ASCII function be used? If you have data in BESA Research average referenced or multiplexed format, use the Open File function to read in a file directly. If you have data in a different ASCII format, BESA Research offers a flexible import function to import data from an array of numbers in an ASCII file.&lt;br /&gt;
&lt;br /&gt;
The array can be '''vectorized '''(one channel, all time points, per line) or '''multiplexed''' (one time point, all channels, per line). These alternatives are illustrated in the two example files &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.asc'''&amp;lt;/span&amp;gt; and &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''multiplexed.asc'''&amp;lt;/span&amp;gt;, and in the tables below:&lt;br /&gt;
&lt;br /&gt;
'''Vectorized array:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|| channel 1, time 1&lt;br /&gt;
|| channel 1, time 2&lt;br /&gt;
|| channel 1, time 3&lt;br /&gt;
|| channel 1, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 2, time 1&lt;br /&gt;
|| channel 2, time 2&lt;br /&gt;
|| channel 2, time 3&lt;br /&gt;
|| channel 2, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 3, time 1&lt;br /&gt;
|| channel 3, time 2&lt;br /&gt;
|| channel 3, time 3&lt;br /&gt;
|| channel 3, time 4&lt;br /&gt;
|-&lt;br /&gt;
|| channel 4, time 1&lt;br /&gt;
|| channel 4, time 2&lt;br /&gt;
|| channel 4, time 3&lt;br /&gt;
|| channel 4, time 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiplexed array:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 1 &lt;br /&gt;
|| channel 2, time 1&lt;br /&gt;
|| channel 3, time 1&lt;br /&gt;
|| channel 4, time 1&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 2&lt;br /&gt;
|| channel 2, time 2&lt;br /&gt;
|| channel 3, time 2&lt;br /&gt;
|| channel 4, time 2&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 3&lt;br /&gt;
|| channel 2, time 3&lt;br /&gt;
|| channel 3, time 3&lt;br /&gt;
|| channel 4, time 3&lt;br /&gt;
|- &lt;br /&gt;
|| channel 1, time 4&lt;br /&gt;
|| channel 2, time 4&lt;br /&gt;
|| channel 3, time 4&lt;br /&gt;
|| channel 4, time 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BESA Research needs channel labels. If the labels are in the 10-20 or 10-10 system, BESA Research will assign the channels default coordinates. This is the minimum requirement to be able to map EEG.&lt;br /&gt;
&lt;br /&gt;
If you have 3D digitized coordinates, these can also be specified in ASCII files. This is described under the chapter “[[Electrodes_and_Surface_Locations#Example:_EEG_with_Digitized_Coordinates | Example: EEG with Digitized Coordinates]]”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. Vectorized data'''&lt;br /&gt;
&lt;br /&gt;
* The file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.asc'''&amp;lt;/span&amp;gt; contains the data. The file should be imported via ''File/Import ASCII File''.&lt;br /&gt;
* First you will be asked for a name for the binary target file. The name &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.fsg'''&amp;lt;/span&amp;gt; is suggested. You may accept this name by pressing &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; or choose an alternative name. Note that if the file already exists, the imported data will be appended to the file.&lt;br /&gt;
* Next, the ''ASCII File Properties dialog box'' will open. First select ''‘Vectorized’'', and make sure the subsequent entries are correct:&lt;br /&gt;
&lt;br /&gt;
:: Header Lines = 0 (i.e. in this example the numbers start on the first line)&lt;br /&gt;
:: Bins/Microvolt = 1.0 (i.e. a value 1 in the data represents 1 µV)&lt;br /&gt;
:: Sampling Rate = 320 Hz (When the dialog box is opened, BESA Research always chooses the setting it used previously)&lt;br /&gt;
:: Number of channels = 32 (the number of rows in the matrix)&lt;br /&gt;
:: Number of Samples = 640 (the number of columns in the matrix)&lt;br /&gt;
:: Prestimulus Time = 1000 ms (defines the zero time point 1 s after the beginning)&lt;br /&gt;
&lt;br /&gt;
* Press &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt; to accept the settings.&lt;br /&gt;
* Next, the ''Channel and digitized head surface point information dialog box'' will open. In the ''‘Channel configuration’'' box, the label file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.ela'''&amp;lt;/span&amp;gt;, will be detected automatically. Automatic detection occurs when the label file has the same base name as the data file (in this case, vectorized). To the right of the file name is a summary of channel types: 32 channels found, 30 are EEG, 1 is intercranial, 1 is polygraphic.&lt;br /&gt;
&lt;br /&gt;
Note the green tick at the top left of the dialog box. This indicates that BESA Research thinks that it has sufficient information to read the file, and map and do source analysis on the data.&lt;br /&gt;
&lt;br /&gt;
* To see how channel types are specified in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''vectorized.ela'''&amp;lt;/span&amp;gt;, click on the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''Edit '''&amp;lt;/span&amp;gt;button to view the file with the Notepad program. Here you will see that most channels have 10-20 electrode names. Channel 3 has the prefix ‘''POLY''’, specifying that this channel is polygraphic. Channel 31 has the prefix ‘''ICR''’, specifying that this channel is intercranial. Close Notepad, and click ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK'''&amp;lt;/span&amp;gt;’ in the dialog box.&lt;br /&gt;
* A final dialog box asks for a Segment Comment. This is a label that will be displayed in the resulting file. The label is particularly useful if you import several ASCII files into one target file. Each segment is then easily identified by its own label.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. Multiplexed data'''&lt;br /&gt;
&lt;br /&gt;
* This example is similar to Example 1. In this case, import the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''multiplexed.asc'''&amp;lt;/span&amp;gt;, and select ‘Multiplexed’ in the ''ASCII File Properties dialog box''. Other settings in the dialog box stay as they were.&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
# The numbers in the source files can be split into several lines per channel or per time point. Then you will have to enter the correct number of time points and channels in the dialog box. In the present examples, the lines are not split (the vectorized file has all 640 time points in each line, and the multiplexed file has all 32 channels in each line). In this case, BESA Research selects the correct numbers of time points and channels automatically.&lt;br /&gt;
# If you have digitized coordinates, these can be specified in the Channel and digitized head surface point information dialog box. Since the procedure is the same as when reading data, this is described elsewhere under “''Example: EEG with Digitized Coordinates''”.&lt;br /&gt;
&lt;br /&gt;
== Example: MEG ASCII ==&lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the'' \Examples\Xtras\ MEG ASCII'' subdirectory of the BESA Research installation folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Multiplexed MEG ASCII file with labels in the header (&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#00000a;&amp;quot;&amp;gt;''med.mul''&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;)'''&lt;br /&gt;
&lt;br /&gt;
For reading MEG data, BESA Research expects&lt;br /&gt;
* Correct channel definitions, i.e. channels should be defined as MEG.&lt;br /&gt;
* Head surface points.&lt;br /&gt;
* Sensor coordinates, in '''the same coordinate system''' as the head surface points.&lt;br /&gt;
* Optionally, you can define the coordinates of the center of the head. This will be important if too few head surface points are available to specify where to place the spherical head used by BESA Research for source modeling, or if you want to use some external definition, e.g. from the MRI.&lt;br /&gt;
&lt;br /&gt;
As with digitized EEG coordinates, we use the ''Channel and digitized head surface point information'' ''dialog box'' to specify the files which need to be read.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 1. File Open'''&lt;br /&gt;
* The file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.mul'''&amp;lt;/span&amp;gt;, contains MEG data in the ASCII multiplexed format. This format contains channel labels. The labels used are recognized by BESA Research as originating from the Neuromag system. They are therefore identified as MEG and do not need further identification.&lt;br /&gt;
* The ''sfp'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.sfp'''&amp;lt;/span&amp;gt;, defines fiducials and head surface points. Coordinate labels are included in the file, so no'' sfn'' file is required.&lt;br /&gt;
* The cot file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.cot'''&amp;lt;/span&amp;gt;, defines the coordinates of the head center. If this were missing, BESA Research would compute the head center based on the sphere that best fits the head surface points.&lt;br /&gt;
* The ''pos'' file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.pos'''&amp;lt;/span&amp;gt;, defines the coordinates of the 122 sensors. For the Neuromag system there are 9 values per line, defining primary coil location, secondary coil location, and orientation cosines. The sequence of coordinates in the ''pos'' file '''must''' match the sequence of MEG channels! The file format and locations of the primary and secondary coils allow BESA Research to identify the sensor type as planar gradiometers. If the file had only six values per line, BESA Research would classify the sensors as magnetometers (one primary coil and the orientation cosines).&lt;br /&gt;
* Open the file, selecting current file type as ''‘*,m''??’. The ''Channel and digitized head surface point'' ''information dialog box'' will open, displaying the different auxiliary file names. The green tick indicates that BESA Research finds everything to be OK.&lt;br /&gt;
* Press the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘OK’'''&amp;lt;/span&amp;gt; button and then the&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;''' ‘V’ '''&amp;lt;/span&amp;gt;key to view the coordinates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 2. File Import'''&lt;br /&gt;
* The file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCIIimport.asc'''&amp;lt;/span&amp;gt;, contains MEG data in a multiplexed array, without a header. This needs to be imported using ''File/Import ASCII'' (see ''“Example: ASCII Import”).''&lt;br /&gt;
* On import you have to specify the file as ‘Multiplexed’, the number of time points (285), the number of channels (132), the bins/µV (or bins/fT) (=1), the time at which the stimulus occurred (50 ms), and the sampling rate (949.667 Hz).&lt;br /&gt;
* This format contains no channel labels. The labels in &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''ME&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;GASCIIimport.ela'''&amp;lt;/span&amp;gt; are recognized by BESA Research as originating from the Neuromag system. They are therefore identified as MEG and do not need further identification.&lt;br /&gt;
* Since it recognizes the channels as MEG, the ''Channel and digitized head surface point information dialog box'' will open, displaying the different auxiliary file names as before. Since all necessary files with the same base name as the data file are supplied, they are read automatically.&lt;br /&gt;
* Press the ‘&amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''OK’'''&amp;lt;/span&amp;gt; button, enter a segment name, and then the &amp;lt;span style=&amp;quot;color:#3366ff;&amp;quot;&amp;gt;'''‘V’'''&amp;lt;/span&amp;gt; key to view the coordinates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example 3. File Open -- MEG information recorded elsewhere'''&lt;br /&gt;
&lt;br /&gt;
This example illustrates the case where the auxiliary files have a different base name from the data file: you must select the file name in the ''Channel and digitized head surface point information dialog box''.&lt;br /&gt;
&lt;br /&gt;
* Open the file, &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCIIelsewhere.mul'''&amp;lt;/span&amp;gt;. It is read as an MEG magnetometer file.&lt;br /&gt;
* In the ''Channel and digitized head surface point information dialog box'', specify&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.sfp'''&amp;lt;/span&amp;gt; for the head surface points, and&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left:1.27cm;margin-right:0cm;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEGASCII.pos'''&amp;lt;/span&amp;gt; for the MEG sensors&amp;lt;/div&amp;gt;&lt;br /&gt;
* MEG coordinates will be correct. The sensor definition file specifies the sensors as planar gradiometers.&lt;br /&gt;
* Where the auxiliary files came from will be recorded in the database. If you open the file again, the auxiliary files will be found automatically, without asking any questions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example: Reading combined EEG and MEG from an ASCII file ==&lt;br /&gt;
&lt;br /&gt;
The files described in this example can be found in the ''Examples\Xtras\MEG+EEG'' subdirectory of the BESA Research installation folder.&lt;br /&gt;
&lt;br /&gt;
Here are two examples containing mixed MEG, EEG, and polygraphic channels:&lt;br /&gt;
* Open a file using the ''File/Open'' command&lt;br /&gt;
* Import a file using ''File/Import ASCII'' command&lt;br /&gt;
&lt;br /&gt;
In both cases&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.ela&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file defines the channel labels. Based on the labels, BESA Research knows which channels are EEG and MEG. The remainder are classified as polygraphic channels.&lt;br /&gt;
* The &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''&amp;lt;nowiki&amp;gt;*.pos&amp;lt;/nowiki&amp;gt;'''&amp;lt;/span&amp;gt; file defines the MEG sensor coordinates. The number of values on a line of this file (=9) defines the MEG as gradiometers. The relative locations of primary and secondary coils identify the gradiometers as planar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1. Example with ''File/Open'''''&lt;br /&gt;
* Open the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.mul'''&amp;lt;/span&amp;gt;. The ''Channel and digitized head surface point information dialog box'' will open automatically (unless the file has already been read once and the information is in the database).&lt;br /&gt;
* You will see under ''‘internal data file information’'' that BESA Research finds 122 MEG sensors, and 162 channels in all.&lt;br /&gt;
* Under ‘''Channel configuration’'', you will see that as a result of reading the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.ela'''&amp;lt;/span&amp;gt;, 32 channels are defined as EEG, and 8 channels as polygraphic.&lt;br /&gt;
* Under ‘''Digitized head surface points’'' is the feedback that out of the 51 locations in the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEG.sfp'''&amp;lt;/span&amp;gt;, all electrode locations have been defined.&lt;br /&gt;
* Under ‘''MEG sensors’'', the sensors have been identified as gradiometers.&lt;br /&gt;
* The green tick at the top right of the window indicates that BESA Research classifies everything as OK.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''2. Example with ''File/Import ASCII'''''&lt;br /&gt;
* Import the file &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEGimport.asc'''&amp;lt;/span&amp;gt;. Select &amp;lt;span style=&amp;quot;color:#ff9c00;&amp;quot;&amp;gt;'''MEG+EEGimport.fsg '''&amp;lt;/span&amp;gt;as the target file (see ''“Example: ASCII Import”'').&lt;br /&gt;
* Select 320 Hz sampling rate, and 500 ms pre-stimulus time. Other selections in the dialog box should be ‘Multiplexed’, 1 bin/microvolt (this is interpreted as 1 bin/fT for MEG), 162 channels and 320 samples.&lt;br /&gt;
* The ''Channel and digitized head surface point information dialog box'' will open as above.&lt;br /&gt;
&lt;br /&gt;
[[Category:Research Manual]]&lt;br /&gt;
&lt;br /&gt;
{{BESAManualNav}}&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Different_beamformer_types_in_the_source_analysis_module</id>
		<title>Different beamformer types in the source analysis module</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Different_beamformer_types_in_the_source_analysis_module"/>
				<updated>2021-05-05T09:21:09Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Single source beamformer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Standard or higher&lt;br /&gt;
|version = BESA Research 6.1 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Beamformer in BESA Research ==&lt;br /&gt;
&lt;br /&gt;
A beamformer operator is designed to pass signals from the brain region of interest without attenuation, while minimizing interference from activity in all other brain regions. Traditional '''single source beamformers''' are known to mislocalize sources if several brain regions have highly correlated activity. Therefore, the BESA beamformer extends the traditional single-source beamformer in order to implicitly suppress activity from possibly correlated brain regions. This is achieved by using a '''multiple sources beamformer''' calculation that contains not only the leadfields of the source at the location of interest but also those of possibly interfering sources.&lt;br /&gt;
&lt;br /&gt;
== Bilateral sources beamformer == &lt;br /&gt;
&lt;br /&gt;
As a default BESA Research uses a '''bilateral sources beamformer''', where specifically contributions from the homologue source in the opposite hemisphere are taken into account. This allows for imaging of highly correlated bilateral activity in the two hemispheres that commonly occurs during processing of external stimuli.&lt;br /&gt;
&lt;br /&gt;
== Multiple sources beamformer ==&lt;br /&gt;
&lt;br /&gt;
The beamformer computation can be repeated taking into account possibly correlated sources that are specified in the current solution. Interfering activities generated by the sources in the current solution (in the Source box of the source analysis window) that are in the '''On''' state are specifically suppressed.&lt;br /&gt;
&lt;br /&gt;
Below figure shows an example for the multiple sources beamformer in time-domain. The source image for &amp;quot;Beamformer - single additional source&amp;quot; is computed after inserting a source on the right side peak of the source image for &amp;quot;Beamformer - bilateral sources&amp;quot;. The activity of the inserted source on the right side is suppressed during the beamformer computation. Therefore, high source activity is only shown on the left side of the source image for &amp;quot;Beamformer - single additional source&amp;quot; and the source waveforms in the Source box are flat (zero).&lt;br /&gt;
&lt;br /&gt;
[[File:Beamformer_SingleAdditionalSource.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
== Single source beamformer == &lt;br /&gt;
&lt;br /&gt;
The single source beamformer can be also used in the Source Analysis module.&lt;br /&gt;
&lt;br /&gt;
'''Time-domain beamformer''' (This feature requires BESA Research 7.0 or higher)&lt;br /&gt;
* Method 1&lt;br /&gt;
*# Right click on the 3D window of the Source Analysis module to show the context menu.&lt;br /&gt;
*# Select “Image / Volume Image / Beamformer (single source)” entry in the context menu.&lt;br /&gt;
* Method 2&lt;br /&gt;
*# Open the &amp;quot;Standard Volume&amp;quot; tab of the &amp;quot;Image Settings&amp;quot; dialog (&amp;quot;Image / Settings…&amp;quot; menu entry).&lt;br /&gt;
*# Select &amp;quot;Single-source beamformer&amp;quot; option in the &amp;quot;Beamformer Options&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
'''Time-frequency domain beamformer'''&lt;br /&gt;
# Right click on the 3D window of the Source Analysis module to show the context menu.&lt;br /&gt;
# Select “Image / Volume Image / Beamformer (single source)” entry in the context menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The below figure shows the difference between the bilateral sources beamformer and single source beamformer for an auditory experiment data.&lt;br /&gt;
&lt;br /&gt;
[[File:Beamformer_Types.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Analysis]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Different_beamformer_types_in_the_source_analysis_module</id>
		<title>Different beamformer types in the source analysis module</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Different_beamformer_types_in_the_source_analysis_module"/>
				<updated>2021-05-05T09:16:18Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Standard or higher&lt;br /&gt;
|version = BESA Research 6.1 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Beamformer in BESA Research ==&lt;br /&gt;
&lt;br /&gt;
A beamformer operator is designed to pass signals from the brain region of interest without attenuation, while minimizing interference from activity in all other brain regions. Traditional '''single source beamformers''' are known to mislocalize sources if several brain regions have highly correlated activity. Therefore, the BESA beamformer extends the traditional single-source beamformer in order to implicitly suppress activity from possibly correlated brain regions. This is achieved by using a '''multiple sources beamformer''' calculation that contains not only the leadfields of the source at the location of interest but also those of possibly interfering sources.&lt;br /&gt;
&lt;br /&gt;
== Bilateral sources beamformer == &lt;br /&gt;
&lt;br /&gt;
As a default BESA Research uses a '''bilateral sources beamformer''', where specifically contributions from the homologue source in the opposite hemisphere are taken into account. This allows for imaging of highly correlated bilateral activity in the two hemispheres that commonly occurs during processing of external stimuli.&lt;br /&gt;
&lt;br /&gt;
== Multiple sources beamformer ==&lt;br /&gt;
&lt;br /&gt;
The beamformer computation can be repeated taking into account possibly correlated sources that are specified in the current solution. Interfering activities generated by the sources in the current solution (in the Source box of the source analysis window) that are in the '''On''' state are specifically suppressed.&lt;br /&gt;
&lt;br /&gt;
Below figure shows an example for the multiple sources beamformer in time-domain. The source image for &amp;quot;Beamformer - single additional source&amp;quot; is computed after inserting a source on the right side peak of the source image for &amp;quot;Beamformer - bilateral sources&amp;quot;. The activity of the inserted source on the right side is suppressed during the beamformer computation. Therefore, high source activity is only shown on the left side of the source image for &amp;quot;Beamformer - single additional source&amp;quot; and the source waveforms in the Source box are flat (zero).&lt;br /&gt;
&lt;br /&gt;
[[File:Beamformer_SingleAdditionalSource.png|1200px]]&lt;br /&gt;
&lt;br /&gt;
== Single source beamformer == &lt;br /&gt;
&lt;br /&gt;
The single source beamformer can be also used in the Source Analysis module.&lt;br /&gt;
&lt;br /&gt;
'''Time-domain beamformer''' (&amp;amp;#8805; BESA Research 7.0)&lt;br /&gt;
* Method 1&lt;br /&gt;
*# Right click on the 3D window of the Source Analysis module to show the context menu.&lt;br /&gt;
*# Select “Image / Volume Image / Beamformer (single source)” entry in the context menu.&lt;br /&gt;
* Method 2&lt;br /&gt;
*# Open the &amp;quot;Standard Volume&amp;quot; tab of the &amp;quot;Image Settings&amp;quot; dialog (&amp;quot;Image / Settings…&amp;quot; menu entry).&lt;br /&gt;
*# Select &amp;quot;Single-source beamformer&amp;quot; option in the &amp;quot;Beamformer Options&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
'''Time-frequency domain beamformer'''&lt;br /&gt;
# Right click on the 3D window of the Source Analysis module to show the context menu.&lt;br /&gt;
# Select “Image / Volume Image / Beamformer (single source)” entry in the context menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The below figure shows the difference between the bilateral sources beamformer and single source beamformer for an auditory experiment data.&lt;br /&gt;
&lt;br /&gt;
[[File:Beamformer_Types.png|600px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Analysis]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Create_Triggers_for_Artifact-Rejected_Epochs</id>
		<title>Create Triggers for Artifact-Rejected Epochs</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Create_Triggers_for_Artifact-Rejected_Epochs"/>
				<updated>2021-05-05T09:15:28Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Creating a New Event File (*.evt) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
Here we demonstrate how to track what epochs were rejected by the artifact rejection. There might be experiments were one is interested in actually analyzing the rejected epochs. This information is available in the respective paradigm file (*.PDG) but has to be extracted by the user. The idea is to create a new trigger for the rejected epochs that can later be read back into BESA Research.&lt;br /&gt;
&lt;br /&gt;
=== Identifying Rejected Epochs ===&lt;br /&gt;
&lt;br /&gt;
In this example we use the subject 2 of the Auditory Intensity experiment located in the BESA Research examples folder (../Examples/ERP-Auditory-Intensity/S2.cnt).&lt;br /&gt;
&lt;br /&gt;
# Open the raw file S2.cnt and create a new paradigm for it. In the conditions tab create only conditions that directly correspond to each of the respective triggers (in my case I have 5 triggers, thus I have 5 conditions, one for each &amp;quot;current&amp;quot; trigger).&lt;br /&gt;
# Define the Epochs and Filters as you like.&lt;br /&gt;
# Run the artifact rejection.&lt;br /&gt;
# Close everything and find the respective paradigm file in the folder of raw file S2.cnt (typically &amp;lt;code&amp;gt;%basename%.pdg&amp;lt;/code&amp;gt;, in my case S2.pdg, see [[:File:S2.PDG|S2.PDG]]).&lt;br /&gt;
# Open the paradigm file in a text editor (e.g. Notepad, please do not use word as it might change the format of the text).&lt;br /&gt;
# Find the section starting with '''[ArtifactScan]''', ignore the following 4 lines (see the [[Paradigm File Format in BESA|PDG file format description]] for details) and copy everything thereafter to a new txt file. &lt;br /&gt;
# Import the newly created file in Excel by specifying that spaces and tabs are the delimiters for the columns. Save the file in excel format and leave it open. Be sure to have the decimal separator set to &amp;quot; . &amp;quot; and the thousands separator set to none.&lt;br /&gt;
# Open the attached excel file [[:File:ArtifactRejection.xlsx|ArtifactRejection.xlsx]]. In the first sheet you should be able to see a blue painted area. Please copy the contents of the table you created in there. Be sure to copy the values only (not e.g. the format). The table will basically check if a particular epoch was rejected or not. In case it will substitute the value for the trigger on the left most side of the table with a new trigger (12 in this case, marked in orange in the table). The table was made to support up to 257 channels, in case you have more please just adjust the formulas in Exceeds max Amp etc…&lt;br /&gt;
## Please also set the right artifact rejection values (cells are marked with green in the table) as in the paradigm window. &lt;br /&gt;
## Please also make the tables length match the length of your data by copy pasting the 4 row × 10 columns block accordingly (marked in orange for easier identification!).&lt;br /&gt;
# The 5 leftmost columns on your table should have all the necessary information to create a new event file. Please copy the 4 columns starting from the cell immediately below the label &amp;quot;Tmu&amp;quot; (A13 if nobody changed the table in the meantime) to the end of the table. Insert them in a new sheet (NewEventFile) from A2 onward. Please be careful to paste values only (do Paste Special → values only in excel).&lt;br /&gt;
# Please select all the data in the new sheet and press Sort &amp;amp; Filter, select Custom sort, and choose sort by Column A, Sort On Values and choose A → Z as order (Sort Smallest to Largest). This should effectively remove the empty rows.&lt;br /&gt;
&lt;br /&gt;
=== Creating a New Event File (*.evt) === &lt;br /&gt;
&lt;br /&gt;
# Please select all the relevant rows for the 5 columns in the new sheet and just copy them to a new file in Notepad. Please save the file with the evt extension. You can see the evt file obtained from the example described here [[:File:S2_ArtRej_EventFile.evt|S2_ArtRej_EventFile.evt]].&lt;br /&gt;
# Go back to BESA Research, remove all the existing triggers in &amp;quot;ERP → Edit Triggers → Delete&amp;quot;. Once this is done please load the evt file you created by doing &amp;quot;ERP → Open Event File&amp;quot;.&lt;br /&gt;
# Trigger 12 should now appear in your data and represents those triggers that will be removed during artifact rejection. &lt;br /&gt;
# Using the paradigm window you should now be able to run your analysis using the new trigger 12 you created.&lt;br /&gt;
&lt;br /&gt;
[[Category:ERP/ERF]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	<entry>
		<id>https://wiki.besa.de/index.php?title=Create_Triggers_for_Artifact-Rejected_Epochs</id>
		<title>Create Triggers for Artifact-Rejected Epochs</title>
		<link rel="alternate" type="text/html" href="https://wiki.besa.de/index.php?title=Create_Triggers_for_Artifact-Rejected_Epochs"/>
				<updated>2021-05-05T09:15:04Z</updated>
		
		<summary type="html">&lt;p&gt;Robert: /* Identifying Rejected Epochs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{BESAInfobox&lt;br /&gt;
|title = Module information&lt;br /&gt;
|module = BESA Research Basic or higher&lt;br /&gt;
|version = BESA Research 5.2 or higher&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Overview ===&lt;br /&gt;
&lt;br /&gt;
Here we demonstrate how to track what epochs were rejected by the artifact rejection. There might be experiments were one is interested in actually analyzing the rejected epochs. This information is available in the respective paradigm file (*.PDG) but has to be extracted by the user. The idea is to create a new trigger for the rejected epochs that can later be read back into BESA Research.&lt;br /&gt;
&lt;br /&gt;
=== Identifying Rejected Epochs ===&lt;br /&gt;
&lt;br /&gt;
In this example we use the subject 2 of the Auditory Intensity experiment located in the BESA Research examples folder (../Examples/ERP-Auditory-Intensity/S2.cnt).&lt;br /&gt;
&lt;br /&gt;
# Open the raw file S2.cnt and create a new paradigm for it. In the conditions tab create only conditions that directly correspond to each of the respective triggers (in my case I have 5 triggers, thus I have 5 conditions, one for each &amp;quot;current&amp;quot; trigger).&lt;br /&gt;
# Define the Epochs and Filters as you like.&lt;br /&gt;
# Run the artifact rejection.&lt;br /&gt;
# Close everything and find the respective paradigm file in the folder of raw file S2.cnt (typically &amp;lt;code&amp;gt;%basename%.pdg&amp;lt;/code&amp;gt;, in my case S2.pdg, see [[:File:S2.PDG|S2.PDG]]).&lt;br /&gt;
# Open the paradigm file in a text editor (e.g. Notepad, please do not use word as it might change the format of the text).&lt;br /&gt;
# Find the section starting with '''[ArtifactScan]''', ignore the following 4 lines (see the [[Paradigm File Format in BESA|PDG file format description]] for details) and copy everything thereafter to a new txt file. &lt;br /&gt;
# Import the newly created file in Excel by specifying that spaces and tabs are the delimiters for the columns. Save the file in excel format and leave it open. Be sure to have the decimal separator set to &amp;quot; . &amp;quot; and the thousands separator set to none.&lt;br /&gt;
# Open the attached excel file [[:File:ArtifactRejection.xlsx|ArtifactRejection.xlsx]]. In the first sheet you should be able to see a blue painted area. Please copy the contents of the table you created in there. Be sure to copy the values only (not e.g. the format). The table will basically check if a particular epoch was rejected or not. In case it will substitute the value for the trigger on the left most side of the table with a new trigger (12 in this case, marked in orange in the table). The table was made to support up to 257 channels, in case you have more please just adjust the formulas in Exceeds max Amp etc…&lt;br /&gt;
## Please also set the right artifact rejection values (cells are marked with green in the table) as in the paradigm window. &lt;br /&gt;
## Please also make the tables length match the length of your data by copy pasting the 4 row × 10 columns block accordingly (marked in orange for easier identification!).&lt;br /&gt;
# The 5 leftmost columns on your table should have all the necessary information to create a new event file. Please copy the 4 columns starting from the cell immediately below the label &amp;quot;Tmu&amp;quot; (A13 if nobody changed the table in the meantime) to the end of the table. Insert them in a new sheet (NewEventFile) from A2 onward. Please be careful to paste values only (do Paste Special → values only in excel).&lt;br /&gt;
# Please select all the data in the new sheet and press Sort &amp;amp; Filter, select Custom sort, and choose sort by Column A, Sort On Values and choose A → Z as order (Sort Smallest to Largest). This should effectively remove the empty rows.&lt;br /&gt;
&lt;br /&gt;
=== Creating a New Event File (*.evt) === &lt;br /&gt;
&lt;br /&gt;
# Please select all the relevant rows for the 5 columns in the new sheet and just copy them to a new file in Notepad. Please save the file with the evt extension. You can see the evt file obtained from the example described here [[File:S2_ArtRej_EventFile.evt]].&lt;br /&gt;
# Go back to BESA Research, remove all the existing triggers in &amp;quot;ERP → Edit Triggers → Delete&amp;quot;. Once this is done please load the evt file you created by doing &amp;quot;ERP → Open Event File&amp;quot;.&lt;br /&gt;
# Trigger 12 should now appear in your data and represents those triggers that will be removed during artifact rejection. &lt;br /&gt;
# Using the paradigm window you should now be able to run your analysis using the new trigger 12 you created.&lt;br /&gt;
&lt;br /&gt;
[[Category:ERP/ERF]]&lt;/div&gt;</summary>
		<author><name>Robert</name></author>	</entry>

	</feed>