|
Main /
AnalysisWithLENAToolsOne data processing pipeline based on tools previously developped by the LENA team and adapted to dataset from Elekta MEG machine, is now available. You can have a look on this pipeline and its tools on these slides. I wrote various scripts for each step of data processing. All scripts are available and adaptable to your experiment. You can, find these scripts on the server: /neurospin/MEG/tools/DataHandlerRessources. All these tools consist in C-shell scripts including different functions from DataHandler or fastTF. These two programs are installed by default on the linux stations. Just type "dataHandler" or "fast_tf" to have a look on the general information and options of these programs. You will find detailed description of all functions available in these programs in the following manuals: * fastTF
Preprocessing* convert.script
The first step to use these tools is to import and convert your data in a compatible format with this script. You don't have to change anything in this script. just run it where are your original fif files, after sss correction and head movement correction (see Maxfilter section). * triggers.script
Then, you have to define your triggers, by reading STI channels in your recording. For this, you have to define the binary code for each trigger in your recording, exactly as you did this in the MEG acquisition software (see event definition section). * BlinkDetect.script
Now, the first pre-processing step is to correct artefacts and for this, you have to detect where are artifacts in your recording. This script will automatically detect blinks from vertical EOG channel, based on computation of the maximal variance of your EOG signal. You can modify the value of the parameter "maxvar" if the detection is not efficient. * CardioDetect.script
This script will automatically detect R waves from ECG channel. Normally, nothing has to be modified in this script. Sometimes, if your ECG recording is noisy, this automatic detection could fail. After these steps, I strongly recommend you to have a look on your data in order to check that all your triggers have been well defined, that all automatic detections are OK (no over detection or bad detection or failure of the automtatic detection). For this, you can use DataEditor viewer (type "DataEditor" in a console window) and open your file. You can select one specific trigger and browse in your file from one trigger to the following one. This makes possible a fast reading and checking of your data. * Cardio.script
After checking, you can now correct cardiac artefact in your data by using this script. the correction method consists in computing evoked potentials locked on R waves and to substract (adjusted by regression) channel by channel, the corresponding evoked potential. Concerning blink artefacts, if these ones are so frequent as usually in healthy young subjects, it is preferable from a neurosicentist pointview, to reject the corresponding periods, . If blinking is really frequent (patients, children, experimental paradigm really difficult,...), in this case, you can choose to correct ocular artefacts. But keep in mind that you will keep in your data some periods during which your subject had not exactly the same "brain state" compared to periods without blinks. To correct ocular artefacts, use the following script. * BlinkCorrectionFinal.script
This script is based on PCA signal decomposition only in period defined as "BLINK artefacts", remove the first component (corresponding mainly to ocular artefact) after filtering in order to preserve at most the brain-related frequencies. This correction is applied separately on magnetometers, gradiometers and EEG channels. This correction method has been designed in order to optimize correction and minimize consequences on the biological signal content. For this, PCA is computed separately on each recording session (run). This should be criticized from mathematical pointview or by arguing that the same component is not removed from all runs. However, this give better results in terms of correction and more preserve the biological signal content. However, if you prefer, you can concatenate all your runs before applying PCA correction. Evoked potential analysis* aver.script
This script compute an averaging for each condition and each recording session and then, filters the averaging. This script has been written for a specific experimental design. To use it, you have to adapt it to your own experimental design. For this, define your conditions, your time window for averaging, your filtering parameters and your stimulus-trigger delay correction. * Grdaver.script
This script computes a grand averaging over all recording sessions for your different conditions. So, if you have the condition "A" repeated in 4 recording sessions, this script makes possible to compute a grand averaging over your 4 sessions for this condition "A". Again, define your own conditions to use this script. After this step, you have your evoked potentials ! A lot of tools are available in dataHandler. For example, you can define new triggers, based on a combination of different triggers in your data; Different methods to correct artefacts are available, etc... For more details see datahandler manual. Time frequency analysis* TimingCorrection_TF.script
Before computing time-frequency maps, you have to correct the stimulus-trigger delay in your data with this script. In this example, the delay measured was 11 ms. * fast_tfDEF.script
This script will compute (quickly !) one time-frequency map by sensor for MEG and EEG channels. You can define your frequency window, your time window, your baseline window and on which condition you want to compute these time-frequency maps. Blackman window corresponds to the time necessary to obtain "stability" of the wavelet transform. You can also change the parameter "wavelet m" which tune the wavelet, e.g. the time/frequency resolution ratio. By default, this parameter is set to 7. Time-frequency maps computed by this script can be viewed with Muse software. Just type "muse" in a console window to run this software and import your file. Different computation modes are available from fast_tf: power, z-score, phase locking, coherence, synchrony, etc... For more details see fastTF manual. |