Difference between revisions of "Export"

From BESA® Wiki
Jump to: navigation, search
Line 3: Line 3:
 
== Exporting files from BESA ==
 
== Exporting files from BESA ==
  
Data can be exported from BESA Research in the following formats:* BESA's own binary format (compressed or uncompressed)
+
Data can be exported from BESA Research in the following formats:
 +
* BESA's own binary format (compressed or uncompressed)
 
* ASCII multiplexed
 
* ASCII multiplexed
 
* ASCII vectorized (short files only)
 
* ASCII vectorized (short files only)
Line 11: Line 12:
  
  
 
+
You can export
 
+
* The entire data set or between markers
 
+
You can export* The entire data set or between markers
+
 
* The currently marked segment
 
* The currently marked segment
 
* Epochs around triggers
 
* Epochs around triggers
Line 20: Line 19:
  
  
 
+
Export is allowed to various montages:
 
+
* filtered or unfiltered data
 
+
Export is allowed to various montages:* filtered or unfiltered data
+
 
* original data
 
* original data
 
* current montage (including artifact correction if applied)
 
* current montage (including artifact correction if applied)
 
* standard 81-electrode montage.
 
* standard 81-electrode montage.
 
 
 
  
  
Line 37: Line 31:
  
  
Export is started either* select File / Export...
+
Export is started either
 +
* select File / Export...
 
* press the <span style="color:#3366ff;">'''WrS '''</span>button.
 
* press the <span style="color:#3366ff;">'''WrS '''</span>button.
 
* In both cases, you are taken to the ''Export Dialog''.
 
* In both cases, you are taken to the ''Export Dialog''.
* for Send to Matlab only: select File / Send To MATLAB... This also opens the Export Dialog, but  
+
* for Send to Matlab only: select File / Send To MATLAB... This also opens the Export Dialog, but only the <span style="color:#3366ff;">'''Send To Matlab radio'''</span> button is enabled as target format in the dialog.
  
 
 
only the <span style="color:#3366ff;">'''Send To Matlab radio'''</span> button is enabled as target format in the dialog.
 
  
 
== Export Dialog ==
 
== Export Dialog ==
Line 55: Line 47:
 
The dialog is started when you select'' File / Export...'' or press the <span style="color:#3366ff;">'''WrS'''</span> button or select '''Write Segment''' in the right click context menu when a segment has been highlighted.
 
The dialog is started when you select'' File / Export...'' or press the <span style="color:#3366ff;">'''WrS'''</span> button or select '''Write Segment''' in the right click context menu when a segment has been highlighted.
  
 
+
The dialog is divided into four sections. Please read the following chapters for more details:
The dialog is divided into four sections. Please read the following chapters for more details:* ''Data to export''. Describes which data are to be exported.
+
* ''Data to export''. Describes which data are to be exported.
 
* ''Montage and Filters.'' Which montage is to be exported, and whether or not filters are used.
 
* ''Montage and Filters.'' Which montage is to be exported, and whether or not filters are used.
 
* ''Target data formats''. Specify the format of the exported data.
 
* ''Target data formats''. Specify the format of the exported data.
Line 65: Line 57:
 
== Type of data to export ==
 
== Type of data to export ==
  
[[Image:Export (2).gif ]]
 
  
  
The types of data to export are:* '''Continuous data'''. The whole data set or the data between markers are exported.
+
[[Image:Export (2).gif ]]
* '''Marked segment.''' If a segment of data is highlighted, this radio button is enabled. Select Marked
+
 
+
 
+
 
+
segment to export just this segment.* '''Epochs around triggers.''' Export data segments around triggers. If this item is selected, the two
+
 
+
 
+
 
+
<div style="margin-left:0.953cm;margin-right:0cm;">buttons <span style="color:#3366ff;">'''Interval'''</span>... and <span style="color:#3366ff;">'''Triggers'''</span>... are enabled. They allow to select the interval (cf ''Edit / Default'' ''Block Epoch''...), and choose among the available triggers (see ''Edit / Trigger Values''...). Note that the default block epoch values are persistent across BESA Research sessions. The trigger selection is not persistent!</div>* '''Standard Deviations (from fsg file only).''' If the average file was generated using the BESA
+
 
+
 
+
 
+
<div style="margin-left:0.953cm;margin-right:0cm;">Research ERP module, standard deviations are saved in the file. Check this item to export these values to an ASCII file.</div>
+
  
  
'''Between markers.''' If there are markers in the file, and '''Marked segment''' is not selected,  
+
The types of data to export are:
 +
* '''Continuous data'''. The whole data set or the data between markers are exported.
 +
* '''Marked segment.''' If a segment of data is highlighted, this radio button is enabled. Select Marked segment to export just this segment.
 +
* '''Epochs around triggers.''' Export data segments around triggers. If this item is selected, the two buttons <span style="color:#3366ff;">'''Interval'''</span>... and <span style="color:#3366ff;">'''Triggers'''</span>... are enabled. They allow to select the interval (cf ''Edit / Default'' ''Block Epoch''...), and choose among the available triggers (see ''Edit / Trigger Values''...). Note that the default block epoch values are persistent across BESA Research sessions. The trigger selection is not persistent!
 +
* '''Standard Deviations (from fsg file only).''' If the average file was generated using the BESA Research ERP module, standard deviations are saved in the file. Check this item to export these values to an ASCII file.
  
selecting '''Between markers''' will result in the export of data between markers relative to
 
  
the current position in the file (as defined by the middle of the current display), either:* if there is no previous marker, from the beginning of the file to the next marker, or
+
'''Between markers.''' If there are markers in the file, and '''Marked segment''' is not selected, selecting '''Between markers''' will result in the export of data between markers relative to the current position in the file (as defined by the middle of the current display), either:
 +
* if there is no previous marker, from the beginning of the file to the next marker, or
 
* from the previous to the next marker, or
 
* from the previous to the next marker, or
 
* if there is no next marker, from the previous marker to the end of the file.
 
* if there is no next marker, from the previous marker to the end of the file.
Line 96: Line 78:
 
== Montages and Filters ==
 
== Montages and Filters ==
  
[[Image:Export (3).gif ]]
 
  
  
The data can be exported either* '''Original data.''' The data are exported using the original montage
+
[[Image:Export (3).gif ]]
* '''Current montage.''' The currently selected montage is exported. If extra channels, e.g. selected
+
  
  
 +
The data can be exported either
 +
* '''Original data.''' The data are exported using the original montage
 +
* '''Current montage.''' The currently selected montage is exported. If extra channels, e.g. selected channels or artifact waveforms are displayed, these are exported as well. Notes:
  
channels or artifact waveforms are displayed, these are exported as well. Notes:* When 'Current Montage' is selected, no auxiliary files are exported. When re-importing the data into BESA Research, all channels will be defined as polygraphic.
+
* <div style="margin-left:0.635cm;margin-right:0cm;">When 'Current Montage' is selected, no auxiliary files are exported. When re-importing the data into BESA Research, all channels will be defined as polygraphic.</div>
* If the current data is artifact-corrected, the artifact-corrected data will be exported when 'Current Montage' is selected.
+
* <div style="margin-left:0.635cm;margin-right:0cm;">If the current data is artifact-corrected, the artifact-corrected data will be exported when 'Current Montage' is selected.</div>
  
* '''Standard 81 electrode locations.''' EEG data are interpolated to a set of 81 electrodes on a
+
* '''Standard 81 electrode locations.''' EEG data are interpolated to a set of 81 electrodes on a standard head (average over 24 mainly Caucasian heads).
  
  
 +
Export can be performed either with or without the currently selected filters. Press the <span style="color:#3366ff;">'''Filters'''</span>... button to change the current filter settings (see also ''Filters / Edit Filter Settings''...).
  
standard head (average over 24 mainly Caucasian heads).
 
  
 +
== Target Data Formats ==
  
Export can be performed either with or without the currently selected filters. Press the <span style="color:#3366ff;">'''Filters'''</span>... button to change the current filter settings (see also ''Filters / Edit Filter Settings''...).
 
 
== Target Data Formats ==
 
  
 
[[Image:Export (4).gif ]]
 
[[Image:Export (4).gif ]]
  
  
The following target formats are available:* '''BESA binary'''. Data are saved with the extension "<span style="color:#ff9c00;">'''.foc'''</span>" or "<span style="color:#ff9c00;">'''.fsg'''</span>". You can select whether to export with no compression (recommended for averages), or compressed (recommended for raw data). Note that compression can result in loss of resolution in averaged data. See ''Data Compression.''
+
The following target formats are available:
 +
* '''BESA binary'''. Data are saved with the extension "<span style="color:#ff9c00;">'''.foc'''</span>" or "<span style="color:#ff9c00;">'''.fsg'''</span>". You can select whether to export with no compression (recommended for averages), or compressed (recommended for raw data). Note that compression can result in loss of resolution in averaged data. See ''Data Compression.''
 
* '''ASCII multiplexed.''' Data are normally saved as text with the extension "<span style="color:#ff9c00;">'''.mul'''</span>". See ''ASCII multiplexed format'' for a description of the data format. If the type of data to export is '''Epochs''' '''around triggers''', one file is exported for each trigger, and the file extension is a number, starting with ".000", and continuing ".001", ".002", etc.
 
* '''ASCII multiplexed.''' Data are normally saved as text with the extension "<span style="color:#ff9c00;">'''.mul'''</span>". See ''ASCII multiplexed format'' for a description of the data format. If the type of data to export is '''Epochs''' '''around triggers''', one file is exported for each trigger, and the file extension is a number, starting with ".000", and continuing ".001", ".002", etc.
 
* '''ASCII vectorized'''. Data are normally saved as text with the extension "<span style="color:#ff9c00;">'''.avr'''</span>". See ''ASCII Multiplexed format ''for a description of the data format. If the type of data to export is '''Epochs around triggers''', one file is exported for each trigger, and the file extension is a number, starting with ".000", and continuing ".001", ".002", etc. The data are not average referenced before saving. They will only be average referenced if the data are exported using an average referenced '''Current montage'''. You are only allowed to export small segments in vectorized format. If you have selected '''Continuous data''', this item will be disabled if the data are longer than 20 s in duration.
 
* '''ASCII vectorized'''. Data are normally saved as text with the extension "<span style="color:#ff9c00;">'''.avr'''</span>". See ''ASCII Multiplexed format ''for a description of the data format. If the type of data to export is '''Epochs around triggers''', one file is exported for each trigger, and the file extension is a number, starting with ".000", and continuing ".001", ".002", etc. The data are not average referenced before saving. They will only be average referenced if the data are exported using an average referenced '''Current montage'''. You are only allowed to export small segments in vectorized format. If you have selected '''Continuous data''', this item will be disabled if the data are longer than 20 s in duration.
* <div style="margin-left:1.58cm;margin-right:0cm;">'''European Data Format (EDF+).''' Data are saved with the extension "<span style="color:#ff9c00;">'''.edf'''</span>". Export of '''Epochs around triggers''' to EDF+ is currently not possible.</div>
+
* '''European Data Format (EDF+).''' Data are saved with the extension "<span style="color:#ff9c00;">'''.edf'''</span>". Export of '''Epochs around triggers''' to EDF+ is currently not possible.
 
* '''Simple binary matrix.''' Data are written to a floating point binary matrix with the extension "<span style="color:#ff9c00;">'''.da'''</span>t". The matrix has the dimension no of samples x no of channels. In addition, a header file with the extension "<span style="color:#ff9c00;">'''.generic'''</span>" is also written. The header file is a text file contains information about the number of channels, sampling rate, and number of samples. These follow the specifications of the Generic File Format that can also be read by BESA Research if the Generic Reader is installed. This data format can be useful as a means of transferring data to other programs (e.g. '''MATLAB''') in a relatively compact form. If the type of data to export is '''Epochs around triggers''', the epochs are concatenated in the same target file. In this case, the header file contains a line specifying the number of epochs (cf. ''Generic File Format''). The number of samples in each epoch is the total number of samples, divided by the number of epochs.
 
* '''Simple binary matrix.''' Data are written to a floating point binary matrix with the extension "<span style="color:#ff9c00;">'''.da'''</span>t". The matrix has the dimension no of samples x no of channels. In addition, a header file with the extension "<span style="color:#ff9c00;">'''.generic'''</span>" is also written. The header file is a text file contains information about the number of channels, sampling rate, and number of samples. These follow the specifications of the Generic File Format that can also be read by BESA Research if the Generic Reader is installed. This data format can be useful as a means of transferring data to other programs (e.g. '''MATLAB''') in a relatively compact form. If the type of data to export is '''Epochs around triggers''', the epochs are concatenated in the same target file. In this case, the header file contains a line specifying the number of epochs (cf. ''Generic File Format''). The number of samples in each epoch is the total number of samples, divided by the number of epochs.
 
* '''Send To MATLAB'''. The data are exported directly to MATLAB into the struct variable besa_channels. For more information on the data transfer from BESA Research to MATLAB, please refer to Help chapter ''The MATLAB interface''.
 
* '''Send To MATLAB'''. The data are exported directly to MATLAB into the struct variable besa_channels. For more information on the data transfer from BESA Research to MATLAB, please refer to Help chapter ''The MATLAB interface''.
Line 131: Line 113:
  
 
== Resampling ==
 
== Resampling ==
 +
 +
  
 
[[Image:Export (5).gif ]]
 
[[Image:Export (5).gif ]]
Line 148: Line 132:
  
 
You may adjust the filters by pressing the<span style="color:#3366ff;">''' Filter'''</span> button, e.g. if the original data were already recorded with a sufficiently low low-pass filter setting, so that additional filtering is unnecessary.
 
You may adjust the filters by pressing the<span style="color:#3366ff;">''' Filter'''</span> button, e.g. if the original data were already recorded with a sufficiently low low-pass filter setting, so that additional filtering is unnecessary.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
  
Line 173: Line 142:
 
'''How compression works'''
 
'''How compression works'''
  
 
+
The compression algorithm works on two principals:
The compression algorithm works on two principals:* '''Data resolution can often be reduced without losing data quality.''' For instance, a data resolution of 0.1µV or higher is unnecessary for viewing normal EEG -- 0.5µV or 1 µV steps are sufficient. Similarly for event-related potentials: the raw data only require a resolution of 0.5µV or 1 µV to achieve a much higher resolution after averaging.
+
* '''Data resolution can often be reduced without losing data quality.''' For instance, a data resolution of 0.1µV or higher is unnecessary for viewing normal EEG -- 0.5µV or 1 µV steps are sufficient. Similarly for event-related potentials: the raw data only require a resolution of 0.5µV or 1 µV to achieve a much higher resolution after averaging.
 
* '''Differences between successive data samples '''on a signal are generally much smaller than''' '''the absolute values of the data'''.''' Thus, one start value, and then a series of subsequent differences can be stored in a much smaller space than an equivalent series of absolute values. A consequence of this principle is that smoothed signals (with high frequencies removed) can be compressed into a smaller space than signals with a lot of high frequency noise.
 
* '''Differences between successive data samples '''on a signal are generally much smaller than''' '''the absolute values of the data'''.''' Thus, one start value, and then a series of subsequent differences can be stored in a much smaller space than an equivalent series of absolute values. A consequence of this principle is that smoothed signals (with high frequencies removed) can be compressed into a smaller space than signals with a lot of high frequency noise.
  
 
 
<div style="margin-left:0.635cm;margin-right:0cm;"></div>
 
  
 
'''Compression parameter'''
 
'''Compression parameter'''
 
  
 
The parameter you need to choose is the data resolution, or step size. Steps smaller than this size will no longer be represented in the compressed data. The BESA Research Export Module allows the following steps for the compression of EEG signals:
 
The parameter you need to choose is the data resolution, or step size. Steps smaller than this size will no longer be represented in the compressed data. The BESA Research Export Module allows the following steps for the compression of EEG signals:
  
 
0.1µV, 0.2µV, 0.5µV, 1µV
 
0.1µV, 0.2µV, 0.5µV, 1µV
 
  
 
For raw EEG data, we recommend using a step size of 0.5µV.
 
For raw EEG data, we recommend using a step size of 0.5µV.
Line 194: Line 158:
 
'''Different compression parameters for different data types (pitfalls!)'''
 
'''Different compression parameters for different data types (pitfalls!)'''
  
 
+
As described above, the step sizes make sense for EEG signals. For other types of data, other step sizes make more sense. In addition, a polygraphic signal can have the same order of signal magnitude as the EEG (e.g. an EOG or EKG signal), but it might have a completely different scale, e.g. a voice signal, recorded in mV or V. To help accommodate different orders of signal magnitude, BESA Research applies the following rules:
As described above, the step sizes make sense for EEG signals. For other types of data, other step sizes make more sense. In addition, a polygraphic signal can have the same order of signal magnitude as the EEG (e.g. an EOG or EKG signal), but it might have a completely different scale, e.g. a voice signal, recorded in mV or V. To help accommodate different orders of signal magnitude, BESA Research applies the following rules:* '''MEG data:''' Step sizes (in units of fT) are 20 x the step size in µV. Thus, a step size of 0.5 µV will lead to a step size of 10fT for MEG data.
+
* '''MEG data:''' Step sizes (in units of fT) are 20 x the step size in µV. Thus, a step size of 0.5 µV will lead to a step size of 10fT for MEG data.
 
* '''Polygraphic and ICR data''': The step size depends on the current amplitude scaling factor in BESA Research. A multiplication factor is used that is the current scaling factor, divided by 100. Thus, if the scale is set to 1V, the factor is 10 mV. If you have chosen an EEG step size of 0.5µV, the resulting step size will be 10 x 0.5 = 5 mV.
 
* '''Polygraphic and ICR data''': The step size depends on the current amplitude scaling factor in BESA Research. A multiplication factor is used that is the current scaling factor, divided by 100. Thus, if the scale is set to 1V, the factor is 10 mV. If you have chosen an EEG step size of 0.5µV, the resulting step size will be 10 x 0.5 = 5 mV.
 
 
 
  
  
 
<span style="color:#ff0000;">A pitfall in compression is that if the current amplitude scaling for polygraphic or ICR data does not display the signal sensibly, compression may lead to complete loss of the signal. Note that this only applies to polygraphic and ICR channel types.</span>
 
<span style="color:#ff0000;">A pitfall in compression is that if the current amplitude scaling for polygraphic or ICR data does not display the signal sensibly, compression may lead to complete loss of the signal. Note that this only applies to polygraphic and ICR channel types.</span>
 
  
 
* '''Averages:''' We recommend that averaged ERPs are not compressed. Since the signals are generally much smaller than the raw data, compression will lead to unacceptable loss of data resolution.
 
* '''Averages:''' We recommend that averaged ERPs are not compressed. Since the signals are generally much smaller than the raw data, compression will lead to unacceptable loss of data resolution.

Revision as of 16:31, 6 April 2017

Export

Exporting files from BESA

Data can be exported from BESA Research in the following formats:

  • BESA's own binary format (compressed or uncompressed)
  • ASCII multiplexed
  • ASCII vectorized (short files only)
  • EDF+
  • simple floating point matrix (e.g. for exporting data to MatLab)
  • Send the data directly to Matlab


You can export

  • The entire data set or between markers
  • The currently marked segment
  • Epochs around triggers
  • Standard deviations from binary average files (*.fsg)


Export is allowed to various montages:

  • filtered or unfiltered data
  • original data
  • current montage (including artifact correction if applied)
  • standard 81-electrode montage.


On export, you can choose to change the sampling rate.

If exporting to BESA's binary format, you can optionally append the data to a preexisting data set, if sampling rates and the number of channels match. Therefore, please use the Combine Conditions module.


Export is started either

  • select File / Export...
  • press the WrS button.
  • In both cases, you are taken to the Export Dialog.
  • for Send to Matlab only: select File / Send To MATLAB... This also opens the Export Dialog, but only the Send To Matlab radio button is enabled as target format in the dialog.


Export Dialog

Export (1).gif


The dialog is started when you select File / Export... or press the WrS button or select Write Segment in the right click context menu when a segment has been highlighted.

The dialog is divided into four sections. Please read the following chapters for more details:

  • Data to export. Describes which data are to be exported.
  • Montage and Filters. Which montage is to be exported, and whether or not filters are used.
  • Target data formats. Specify the format of the exported data.
  • Resampling. Specify a new sampling rate in the exported data.


Type of data to export

Export (2).gif


The types of data to export are:

  • Continuous data. The whole data set or the data between markers are exported.
  • Marked segment. If a segment of data is highlighted, this radio button is enabled. Select Marked segment to export just this segment.
  • Epochs around triggers. Export data segments around triggers. If this item is selected, the two buttons Interval... and Triggers... are enabled. They allow to select the interval (cf Edit / Default Block Epoch...), and choose among the available triggers (see Edit / Trigger Values...). Note that the default block epoch values are persistent across BESA Research sessions. The trigger selection is not persistent!
  • Standard Deviations (from fsg file only). If the average file was generated using the BESA Research ERP module, standard deviations are saved in the file. Check this item to export these values to an ASCII file.


Between markers. If there are markers in the file, and Marked segment is not selected, selecting Between markers will result in the export of data between markers relative to the current position in the file (as defined by the middle of the current display), either:

  • if there is no previous marker, from the beginning of the file to the next marker, or
  • from the previous to the next marker, or
  • if there is no next marker, from the previous marker to the end of the file.


Montages and Filters

Export (3).gif


The data can be exported either

  • Original data. The data are exported using the original montage
  • Current montage. The currently selected montage is exported. If extra channels, e.g. selected channels or artifact waveforms are displayed, these are exported as well. Notes:
  • When 'Current Montage' is selected, no auxiliary files are exported. When re-importing the data into BESA Research, all channels will be defined as polygraphic.
  • If the current data is artifact-corrected, the artifact-corrected data will be exported when 'Current Montage' is selected.
  • Standard 81 electrode locations. EEG data are interpolated to a set of 81 electrodes on a standard head (average over 24 mainly Caucasian heads).


Export can be performed either with or without the currently selected filters. Press the Filters... button to change the current filter settings (see also Filters / Edit Filter Settings...).


Target Data Formats

Export (4).gif


The following target formats are available:

  • BESA binary. Data are saved with the extension ".foc" or ".fsg". You can select whether to export with no compression (recommended for averages), or compressed (recommended for raw data). Note that compression can result in loss of resolution in averaged data. See Data Compression.
  • ASCII multiplexed. Data are normally saved as text with the extension ".mul". See ASCII multiplexed format for a description of the data format. If the type of data to export is Epochs around triggers, one file is exported for each trigger, and the file extension is a number, starting with ".000", and continuing ".001", ".002", etc.
  • ASCII vectorized. Data are normally saved as text with the extension ".avr". See ASCII Multiplexed format for a description of the data format. If the type of data to export is Epochs around triggers, one file is exported for each trigger, and the file extension is a number, starting with ".000", and continuing ".001", ".002", etc. The data are not average referenced before saving. They will only be average referenced if the data are exported using an average referenced Current montage. You are only allowed to export small segments in vectorized format. If you have selected Continuous data, this item will be disabled if the data are longer than 20 s in duration.
  • European Data Format (EDF+). Data are saved with the extension ".edf". Export of Epochs around triggers to EDF+ is currently not possible.
  • Simple binary matrix. Data are written to a floating point binary matrix with the extension ".dat". The matrix has the dimension no of samples x no of channels. In addition, a header file with the extension ".generic" is also written. The header file is a text file contains information about the number of channels, sampling rate, and number of samples. These follow the specifications of the Generic File Format that can also be read by BESA Research if the Generic Reader is installed. This data format can be useful as a means of transferring data to other programs (e.g. MATLAB) in a relatively compact form. If the type of data to export is Epochs around triggers, the epochs are concatenated in the same target file. In this case, the header file contains a line specifying the number of epochs (cf. Generic File Format). The number of samples in each epoch is the total number of samples, divided by the number of epochs.
  • Send To MATLAB. The data are exported directly to MATLAB into the struct variable besa_channels. For more information on the data transfer from BESA Research to MATLAB, please refer to Help chapter The MATLAB interface.


Resampling

Export (5).gif


Check Resample data to change the sampling rate of the target data. The edit box is enabled, and you specify a sampling rate.

Data are resampled using splines. Thus, the new sampling rate is not limited to fractions or multiples of the original rate.

Note that if Resample data is not checked, the sampling rate of the source data is displayed.

Resampling and aliasing. If you want to reduce the sampling rate it is important to avoid aliasing! It is recommended that a low-pass filter with a boundary frequency of not more than 1/3 of the original sampling rate is used. When you set a new sampling rate, BESA Research checks the current filter settings. If export without filters is selected, or if the current low-pass filter is set to a value that is higher than 1/3 of the sampling rate, BESA Research sets the filter, and opens a message box with a warning:


Export (6).gif


You may adjust the filters by pressing the Filter button, e.g. if the original data were already recorded with a sufficiently low low-pass filter setting, so that additional filtering is unnecessary.


Data Compression

When exporting to BESA binary format, you can compress the data to save space. Here we describe properties and pitfalls of the compression algorithm.


How compression works

The compression algorithm works on two principals:

  • Data resolution can often be reduced without losing data quality. For instance, a data resolution of 0.1µV or higher is unnecessary for viewing normal EEG -- 0.5µV or 1 µV steps are sufficient. Similarly for event-related potentials: the raw data only require a resolution of 0.5µV or 1 µV to achieve a much higher resolution after averaging.
  • Differences between successive data samples on a signal are generally much smaller than the absolute values of the data. Thus, one start value, and then a series of subsequent differences can be stored in a much smaller space than an equivalent series of absolute values. A consequence of this principle is that smoothed signals (with high frequencies removed) can be compressed into a smaller space than signals with a lot of high frequency noise.


Compression parameter

The parameter you need to choose is the data resolution, or step size. Steps smaller than this size will no longer be represented in the compressed data. The BESA Research Export Module allows the following steps for the compression of EEG signals:

0.1µV, 0.2µV, 0.5µV, 1µV

For raw EEG data, we recommend using a step size of 0.5µV.


Different compression parameters for different data types (pitfalls!)

As described above, the step sizes make sense for EEG signals. For other types of data, other step sizes make more sense. In addition, a polygraphic signal can have the same order of signal magnitude as the EEG (e.g. an EOG or EKG signal), but it might have a completely different scale, e.g. a voice signal, recorded in mV or V. To help accommodate different orders of signal magnitude, BESA Research applies the following rules:

  • MEG data: Step sizes (in units of fT) are 20 x the step size in µV. Thus, a step size of 0.5 µV will lead to a step size of 10fT for MEG data.
  • Polygraphic and ICR data: The step size depends on the current amplitude scaling factor in BESA Research. A multiplication factor is used that is the current scaling factor, divided by 100. Thus, if the scale is set to 1V, the factor is 10 mV. If you have chosen an EEG step size of 0.5µV, the resulting step size will be 10 x 0.5 = 5 mV.


A pitfall in compression is that if the current amplitude scaling for polygraphic or ICR data does not display the signal sensibly, compression may lead to complete loss of the signal. Note that this only applies to polygraphic and ICR channel types.

  • Averages: We recommend that averaged ERPs are not compressed. Since the signals are generally much smaller than the raw data, compression will lead to unacceptable loss of data resolution.