Difference between revisions of "How to Prepare Data for BESA Statistics"
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{BESAInfobox | {{BESAInfobox | ||
|title = Module information | |title = Module information | ||
− | |module = BESA Research Basic or higher | + | |module = BESA Research Basic or higher<br/>BESA Statistics |
− | BESA Statistics | + | |version = BESA Research 6.0 or higher<br/>BESA Statistics 1.0 or higher |
− | |version = 6.0 or higher | + | |
}} | }} | ||
Line 14: | Line 13: | ||
The following graph shows the data types that are accepted. | The following graph shows the data types that are accepted. | ||
− | [[File:Data types BESA Statistics.png|frameless|600px]] | + | [[File:Data types BESA Statistics 02.png|frameless|600px]] |
+ | |||
+ | * ERP: event-related potential | ||
+ | * ERF: event-related field | ||
+ | * SWF: source waveforms | ||
== Preparing ERP/ERF data == | == Preparing ERP/ERF data == | ||
Line 21: | Line 24: | ||
# elp file - one file for the whole experiment | # elp file - one file for the whole experiment | ||
− | The ERP/ERF files are exported from BESA Research as ASCII | + | The ERP/ERF files are exported from BESA Research as [[ASCII File Format]] (*.avr format). You can do this in the following way: |
Using the batch mode: | Using the batch mode: | ||
Line 45: | Line 48: | ||
# bsa file - one file for the whole experiment | # bsa file - one file for the whole experiment | ||
− | |||
The SWF files are exported in the following way: | The SWF files are exported in the following way: | ||
− | Using the batch mode: | + | '''Using the batch mode''': |
* Use the command "Save Source Waveforms" | * Use the command "Save Source Waveforms" | ||
* For one of the conditions: Use the command "Save Solution" to save the locations of the sources. Use the ''Unit Sphere'' setting as shown in the figure at the right. | * For one of the conditions: Use the command "Save Solution" to save the locations of the sources. Use the ''Unit Sphere'' setting as shown in the figure at the right. | ||
− | + | [[File:Batch_save_solution_dlg.png|300px]] | |
− | |||
− | For each source waveform solution: In the Source analysis window, select menu entry "File → Save Source Waveforms As". | + | '''By hand''': |
+ | * For each source waveform solution: In the Source analysis window, select menu entry "File → Save Source Waveforms As". | ||
+ | * For one of the conditions: Select menu entry "File → Save Solution As". In the dialog that appears, choose the type "BESA Solution – Unit Sphere" - see figure. | ||
− | + | [[File:Unit sphere.png|300px]] | |
== Preparing Image data == | == Preparing Image data == | ||
Line 65: | Line 68: | ||
BESA Statistics needs the following data: | BESA Statistics needs the following data: | ||
− | + | * <tt>*.dat</tt> files - one for each subject and each condition | |
− | The dat files are exported in the following way: | + | The <tt>dat</tt> files are exported in the following way: |
− | Using the batch mode: | + | * '''Using the batch mode''': Use the command "Export" from the section ''Source Analysis Imaging''. |
− | + | * '''By hand''': (For each image solution) In the Source analysis window, select menu entry "Image → Export Image As". | |
− | + | ||
− | By hand: | + | |
− | + | ||
− | For each image solution | + | |
== Preparing TFC data == | == Preparing TFC data == | ||
Line 82: | Line 81: | ||
BESA Statistics needs the following data: | BESA Statistics needs the following data: | ||
− | # | + | # Time-frequency analysis or coherence results - one for each subject and each condition |
− | # A file describing the channel configuration | + | #* '''*.tfc''' files |
− | + | # A file describing the channel configuration - one file for the whole experiment | |
− | + | #* '''*.elp''' file: if your montage is in '''sensor space''' | |
− | * | + | #* '''*.bsa''' file: if your montage is in '''source space''' |
− | + | ||
− | + | === Time-frequency file (*.tfc) === | |
− | + | The '''tfc''' files are exported in the following way: | |
− | + | ||
− | By hand: | + | * Using the batch mode: |
− | * In the Time-Frequency window, select "File → Export to ASCII file...". | + | ** Use the command "Save" from the section ''Time-Frequency Analysis''. In the options for the batch command, choose "ASCII data file". |
+ | |||
+ | * By hand: | ||
+ | ** In the Time-Frequency window, select "File → Export to ASCII file...". | ||
Repeat this step for all subjects and conditions. | Repeat this step for all subjects and conditions. | ||
− | === Channel file === | + | === Channel file (*.elp or *.bas) === |
− | + | ||
− | + | For one of the conditions, a channel file is required. | |
* If your montage is in sensor space: | * If your montage is in sensor space: | ||
− | 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 "File → Head Surface Points and Sensors → Save Electrode File For Current Montage". Then browse to the folder you saved to, and find the "*.elp" file. | + | ** 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 "File → Head Surface Points and Sensors → Save Electrode File For Current Montage". Then browse to the folder you saved to, and find the "*.elp" file. |
* If your montage is in source space: | * If your montage is in source space: | ||
− | 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 "File → Save Solution As". In the dialog that appears, choose the type "BESA Solution – Unit Sphere" - see figure. | + | ** 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 "File → Save Solution As". In the dialog that appears, choose the type "BESA Solution – Unit Sphere" - see figure. |
+ | |||
+ | [[File:Unit sphere.png|500px]] | ||
+ | |||
+ | |||
+ | '''Notes''': | ||
+ | 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 "*.bsa" file such that you get one line for each orientation in the "*.bsa" file. This can be achieved by: | ||
− | |||
* Loading the solution into the Source Analysis Module. | * Loading the solution into the Source Analysis Module. | ||
* Orienting each regional source by selecting it and pressing the key 'O' on the keyboard. | * Orienting each regional source by selecting it and pressing the key 'O' on the keyboard. | ||
Line 116: | Line 120: | ||
* Then save the solution under a different name, and use this solution file as the channel file. | * Then save the solution under a different name, and use this solution file as the channel file. | ||
− | + | 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. | |
+ | |||
+ | Also see [[Working With Additional Files]] for more information on the channel definition file conventions and formats. | ||
+ | == Preparing Connectivity data == | ||
+ | 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]]. | ||
− | [[Category:Statistics]] | + | [[Category:Statistics]] [[Category:Data Import/Export]] |
Latest revision as of 09:06, 23 September 2024
Module information | |
Modules | BESA Research Basic or higher BESA Statistics |
Version | BESA Research 6.0 or higher BESA Statistics 1.0 or higher |
Contents
Note and general remarks
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 "Loading data that were created in other software" and the chapter "File formats".
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.
Data types accepted by BESA Statistics
The following graph shows the data types that are accepted.
- ERP: event-related potential
- ERF: event-related field
- SWF: source waveforms
Preparing ERP/ERF data
BESA Statistics needs the following data:
- ERP or ERF files - one for each subject and each condition
- elp file - one file for the whole experiment
The ERP/ERF files are exported from BESA Research as ASCII File Format (*.avr format). You can do this in the following way:
Using the batch mode:
- Use the command "Mark Block" and select the "Whole Segment" option
- Use the command "Export" and select options "Marked Segment" and "ASCII vectorized".
By hand:
- Right-click on an averaged data segment and select "Whole Segment" from the popup menu.
- Then right-click again and select "Write Segment". 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.
Repeat these steps for all segments that are required.
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. In case that an additional export of an elp file is necessary, it can be exported by using the menu "File → Head Surface Points and Sensors → Save all Files in Head Coordinates". Then browse to the folder you saved to, and find the "*.elp" file.
Preparing SWF data
Note: This requires BESA Research Standard or higher.
BESA Statistics needs the following data:
- SWF files - one for each subject and each condition
- bsa file - one file for the whole experiment
The SWF files are exported in the following way:
Using the batch mode:
- Use the command "Save Source Waveforms"
- For one of the conditions: Use the command "Save Solution" to save the locations of the sources. Use the Unit Sphere setting as shown in the figure at the right.
By hand:
- For each source waveform solution: In the Source analysis window, select menu entry "File → Save Source Waveforms As".
- For one of the conditions: Select menu entry "File → Save Solution As". In the dialog that appears, choose the type "BESA Solution – Unit Sphere" - see figure.
Preparing Image data
Note: This requires BESA Research Standard or higher.
BESA Statistics needs the following data:
- *.dat files - one for each subject and each condition
The dat files are exported in the following way:
- Using the batch mode: Use the command "Export" from the section Source Analysis Imaging.
- By hand: (For each image solution) In the Source analysis window, select menu entry "Image → Export Image As".
Preparing TFC data
Note: This requires BESA Research Complete, or BESA Research Basic plus Source Coherence module.
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).
BESA Statistics needs the following data:
- Time-frequency analysis or coherence results - one for each subject and each condition
- *.tfc files
- A file describing the channel configuration - one file for the whole experiment
- *.elp file: if your montage is in sensor space
- *.bsa file: if your montage is in source space
Time-frequency file (*.tfc)
The tfc files are exported in the following way:
- Using the batch mode:
- Use the command "Save" from the section Time-Frequency Analysis. In the options for the batch command, choose "ASCII data file".
- By hand:
- In the Time-Frequency window, select "File → Export to ASCII file...".
Repeat this step for all subjects and conditions.
Channel file (*.elp or *.bas)
For one of the conditions, a channel file is required.
- If your montage is in sensor space:
- 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 "File → Head Surface Points and Sensors → Save Electrode File For Current Montage". Then browse to the folder you saved to, and find the "*.elp" file.
- If your montage is in source space:
- 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 "File → Save Solution As". In the dialog that appears, choose the type "BESA Solution – Unit Sphere" - see figure.
Notes:
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 "*.bsa" file such that you get one line for each orientation in the "*.bsa" file. This can be achieved by:
- Loading the solution into the Source Analysis Module.
- Orienting each regional source by selecting it and pressing the key 'O' on the keyboard.
- Converting the source to dipoles using the key 'C' on the keyboard.
- Then save the solution under a different name, and use this solution file as the channel file.
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.
Also see Working With Additional Files for more information on the channel definition file conventions and formats.
Preparing Connectivity data
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.