5531
Comment:
|
7586
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
## page was renamed from BstFolders = Brainstorm architecture = |
= Tutorial 1: Brainstorm architecture = ''Authors: Francois Tadel, Sylvain Baillet'' |
Line 5: | Line 6: |
<<TableOfContents(2)>> | <<TableOfContents(2,2)>> |
Line 14: | Line 15: |
* __Windows__: C:\Program Files\brainstorm3 * __Linux__: /home/username/brainstorm3 * __MacOS__: Documents/brainstorm3 |
* '''Windows''': My documents\brainstorm3 * '''Linux''': /home/username/brainstorm3 * '''MacOS''': Applications/brainstorm3 |
Line 22: | Line 23: |
* __Windows__: C:\Program Files\brainstorm_db * __Linux__: /home/username/brainstorm_db * __MacOS__: Documents/brainstorm_db |
* '''Windows''': My documents\brainstorm_db * '''Linux''': /home/username/brainstorm_db * '''MacOS''': Documents/brainstorm_db |
Line 29: | Line 30: |
* __Windows__: C:\Documents and Settings\username\.brainstorm * __Linux__: /home/username/.brainstorm |
* '''Windows''': C:\Documents and Settings\username\.brainstorm * '''Linux''': /home/username/.brainstorm |
Line 32: | Line 33: |
* __brainstorm.mat__: Matlab matrix where the Brainstorm options and database structure are stored. * __tmp/__: temporary directory used by some of the Brainstorm functions. Cleaned each time Brainstorm is started |
* '''brainstorm.mat''': Matlab matrix where the Brainstorm options and database structure are stored. * '''tmp/''': temporary directory used by some of the Brainstorm functions. Cleaned each time Brainstorm is started<<BR>>You may have to change the location of the temporary folder if you have a limited amount of storage or a limited quota in your home folder. * '''process/''': this is where you should add your custom processes files (will be reminded later) * '''reports/''': where the process reports are saved * '''openmeeg/''': OpenMEEG binaries will be downloaded automatically to this folder if you compute any BEM headmodel * '''templates/''': Your own personal template anatomies, saved as .zip files. They can be downloaded from the website and you can create new ones * '''mex/''': some mex files that have to be recompiled, in case you don't have the write access in the Brainstorm folder |
Line 39: | Line 45: |
Brainstorm toolbox allows you to classify your recordings and analysis with three different levels of definition: | Brainstorm allows you to classify your recordings and analysis with three different levels of definition: |
Line 54: | Line 60: |
* For example, when adding a new subject, the "Default channel file" option asks you if you have many ("no" option) or only one ("yes" option) recording sessions (''i.e. ''condition) per subject. | |
Line 56: | Line 63: |
* Brainstorm_db folder created and managed completely from the Brainstorm graphic user interface (GUI) | * Brainstorm_db folder is created and managed completely from the Brainstorm graphic user interface (GUI) |
Line 61: | Line 68: |
* __Anatomy data__: brainstorm_db/protocol_name/'''anat'''/subject_name * __Functional data__: brainstorm_db/protocol_name/'''data'''/subject_name/condition_name/ |
* '''Anatomy data''': brainstorm_db/protocol_name/'''anat'''/subject_name * '''Functional data''': brainstorm_db/protocol_name/'''data'''/subject_name/condition_name/ |
Line 68: | Line 75: |
* A copy of the database structure is saved by Brainstorm in your home directory in .brainstorm | * A copy of the database structure is saved by Brainstorm in your home directory in '''.brainstorm/brainstorm.mat ''' |
Line 76: | Line 83: |
== Brainstorm processing steps == For each subject Brainstorm needs to go through the following processing steps: * ''Import MRI'' (or surfaces etc), or use the ''Default anatomy'' * ''Review raw file'': continuous data files are read and the pre-processing steps are performed. Standard processing steps include (but are not restricted to): co-registration with MRI; power-line noise removal; DC offset removal (''i.e.'' high-pass filtering); estimation of blink and cardiac artifacts; estimation of bad channels or data segments; sorting of the triggers (events) of interest etc. * ''Import MEG/EEG: '''''Only after''' having reviewed the raw files (and applied many pre-processing steps) the data are fully imported in Brainstorm. This is the step where they are organized in '''epoch segments''' (via the triggers). * ''Advanced processing:'' Then, source-reconstruction, time-frequency or other analysis are performed on epoched data... |
|
Line 77: | Line 92: |
* __Different folders__ for: the '''program '''(brainstorm3), the '''database '''(brainstorm_db), and your '''original files'''. | * __Different folders__ for: * the '''program '''(brainstorm3), * the '''database '''(brainstorm_db), and * your '''original files'''. |
Line 79: | Line 97: |
* Do not put the original recordings in any of the Brainstorm folders, import them properly with the graphic interface<<BR>> | * Do not put the original recordings in any of the Brainstorm folders, import them with the graphic interface<<BR>> == Feedback == <<EmbedContent(http://neuroimage.usc.edu/brainstorm3_register/get_feedback.php?Tutorials/BstFolders)>> |
Line 82: | Line 103: |
It is now finally time to start Brainstorm. [[TutFirstSteps|Next tutorial]]. |
It is finally time to start Brainstorm. [[Tutorials/TutFirstSteps|Next tutorial]]. |
Tutorial 1: Brainstorm architecture
Authors: Francois Tadel, Sylvain Baillet
You should read this page carefully, in order to understand how the program is organized. If you don't follow a few simple rules reminded at the bottom of the page, Brainstorm will not work properly.
Contents
Brainstorm folders
Brainstorm needs different directories, please try not to put everything at the same place:
Program directory: "brainstorm3"
- Contains all the program files: Matlab scripts, Java archives, documentation...
- No user data in this folder: you can delete it and replace it with a new version, your data will be safe
- Recommended location:
Windows: My documents\brainstorm3
Linux: /home/username/brainstorm3
MacOS: Applications/brainstorm3
Database directory: "brainstorm_db"
- Created by user.
- Contains all the Brainstorm database files.
- Managed automatically by the application: do not move, delete or add files by yourself.
- Recommended location:
Windows: My documents\brainstorm_db
Linux: /home/username/brainstorm_db
MacOS: Documents/brainstorm_db
User directory: ".brainstorm"
- Created automatically at Brainstorm startup.
- Contains the database structure and the temporary folders
- Typical location:
Windows: C:\Documents and Settings\username\.brainstorm
Linux: /home/username/.brainstorm
- Contains:
brainstorm.mat: Matlab matrix where the Brainstorm options and database structure are stored.
tmp/: temporary directory used by some of the Brainstorm functions. Cleaned each time Brainstorm is started
You may have to change the location of the temporary folder if you have a limited amount of storage or a limited quota in your home folder.process/: this is where you should add your custom processes files (will be reminded later)
reports/: where the process reports are saved
openmeeg/: OpenMEEG binaries will be downloaded automatically to this folder if you compute any BEM headmodel
templates/: Your own personal template anatomies, saved as .zip files. They can be downloaded from the website and you can create new ones
mex/: some mex files that have to be recompiled, in case you don't have the write access in the Brainstorm folder
Original data files:
- Recordings and anatomies you acquired and you want to process with Brainstorm.
Put them wherever you want but not in any of the previous folders.
Brainstorm database (concept)
Brainstorm allows you to classify your recordings and analysis with three different levels of definition:
Protocol
Some people would prefer to call this experiment or study.
- It can designate all the data that were acquired on one or several subjects, with the same objectives (study of a specific cognitive task, epileptic spikes localization, functional differences between two populations).
- Default data can be defined at the protocol level. If you cannot get the individual MR images of all or some of your subjects, you can use a default anatomy.
- If you want to localize the sources for an EEG recording but do not know the location of each electrode in space, you can use standardized electrodes positions.
Subject
- A person who participated in a given protocol.
- You need two categories of information to define a subject:
- Files describing the subject's anatomy : MRI and surfaces
- Functional data files, ie. files that have a temporal dimension or that are related to a precise recording session: EEG / MEG recordings, definition of the sensors, source estimations, statistical results...
Condition
For each subject, functional files can be classified in different experimental conditions.
This level of definition is also used to separate different runs (ie. recording sessions) for the same subject.
For example, when adding a new subject, the "Default channel file" option asks you if you have many ("no" option) or only one ("yes" option) recording sessions (i.e. condition) per subject.
Brainstorm database (files)
- Brainstorm_db folder is created and managed completely from the Brainstorm graphic user interface (GUI)
All the files in the database have to be imported through the GUI: (right-click > Import...)
- Imported files are stored in Matlab format (.mat files) at the appropriate place in the database folder.
- Do not try to copy files by yourself in the brainstorm_db folder, it won't work
- Based on the files/directories architecture:
Anatomy data: brainstorm_db/protocol_name/anat/subject_name
Functional data: brainstorm_db/protocol_name/data/subject_name/condition_name/
- Each file you see in the Brainstorm window corresponds to a proper file on the hard drive
- But the contrary is not necessarily true.
- There are extra information stored in each directory, to save properties, comments, default data, links between different items, etc.
- For this reason, you should not try to manipulate directly the files in the Brainstorm database directory.
- Database structure in memory:
A copy of the database structure is saved by Brainstorm in your home directory in .brainstorm/brainstorm.mat
- So when you start the program or change protocol, there is no need to read again all the files on the hard drive (this may take some time).
- As a consequence, the files that are displayed in the Brainstorm window may differ from what is actually on the disk.
- It may happen when some process crashes, or if you move or add some files by yourself in the database folder.
If this happens, you will have to reload the current protocol (right-click popup menu > Reload) or the whole database (menu File > Reload database)
Brainstorm processing steps
For each subject Brainstorm needs to go through the following processing steps:
Import MRI (or surfaces etc), or use the Default anatomy
Review raw file: continuous data files are read and the pre-processing steps are performed. Standard processing steps include (but are not restricted to): co-registration with MRI; power-line noise removal; DC offset removal (i.e. high-pass filtering); estimation of blink and cardiac artifacts; estimation of bad channels or data segments; sorting of the triggers (events) of interest etc.
Import MEG/EEG: Only after having reviewed the raw files (and applied many pre-processing steps) the data are fully imported in Brainstorm. This is the step where they are organized in epoch segments (via the triggers).
Advanced processing: Then, source-reconstruction, time-frequency or other analysis are performed on epoched data...
To remember
Different folders for:
the program (brainstorm3),
the database (brainstorm_db), and
your original files.
- Never modify the contents of the database folder by yourself
Do not put the original recordings in any of the Brainstorm folders, import them with the graphic interface
Feedback
Next
It is finally time to start Brainstorm. ?Next tutorial.