Size: 4322
Comment:
|
Size: 2696
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 20: | Line 20: |
{{attachment:Screenshot 2024-07-12 at 2.26.33 PM.png|Screenshot 2024-07-12 at 2.26.33 PM.png|width="50%"}} | == Preparing the data == Using the Introduction dataset, you will first need to import the entire recordings for whichever run you want to study into your database. Right-click on the raw file, and then 'Import in database'. |
Line 22: | Line 23: |
== Preparing the data == Load your continuous EEG or MEG dataset into Brainstorm by going to File > Import data > Raw file, and navigate to the file you want to import. You will also need to have the corresponding continuous stimulus data on hand. This typically involves a file that contains stimulus presentation times and, if relevant, the types of stimuli presented, matched to the sampling rate and time stamps of the EEG/MEG recording. It is crucial that the stimulus information is completely and exactly aligned and synchronized to the neural recordings. This means that both the MEG/EEG matrix should be the same size as the stimulus matrix. Misalignments could lead to inaccurate TRF results. |
|
Line 25: | Line 24: |
The Introduction dataset does not contain continuous stimulus data. For that reason, it needs to be transformed to pseudo-continuous data in order to move forward with the TRF analysis. Find the appropriate files at [[https://github.com/anna-zai1/TRFdata.git|this]] link, and feel free to use them to follow this tutorial. | |
Line 29: | Line 27: |
|| {{attachment:Screenshot 2024-07-12 at 3.10.18 PM.png|Screenshot 2024-07-12 at 3.10.18 PM.png}} || {{attachment:Screenshot 2024-07-12 at 3.10.39 PM.png|Screenshot 2024-07-12 at 3.10.39 PM.png}} || | Run the TRF plotting script. Brainstorm computes the TRF and displays it, showing the estimated neural response function over your specified time lags for a chosen channel. |
Line 33: | Line 32: |
Run the TRF plotting script. Brainstorm computes the TRF and displays it, showing the estimated neural response function over your specified time lags for a chosen channel. {{attachment:Screenshot 2024-07-12 at 3.10.49 PM.png|Screenshot 2024-07-12 at 3.10.49 PM.png|width=""80%""}} |
|
Line 40: | Line 34: |
|| {{attachment:Screenshot 2024-07-14 at 9.27.57 PM.png|Screenshot 2024-07-14 at 9.27.57 PM.png}} || {{attachment:Screenshot 2024-07-14 at 9.28.23 PM.png|Screenshot 2024-07-14 at 9.28.23 PM.png}} || |
|
Line 44: | Line 36: |
|| {{attachment:Screenshot 2024-07-14 at 9.28.41 PM.png|Screenshot 2024-07-14 at 9.28.41 PM.png}} || {{attachment:Screenshot 2024-07-14 at 9.28.53 PM.png|Screenshot 2024-07-14 at 9.28.53 PM.png}} || |
Multivariate Temporal Response Function
Authors: Anna Zaidi, Raymundo Cassani
This tutorial will host the steps to use the mTRF-Toolbox in Brainstorm. ...
Contents
Introduction
This tutorial introduces the Temporal Response Function (TRF) analysis within the Brainstorm environment, employing the mTRF Toolbox. TRF analysis is instrumental in delineating the dynamics of the brain's response to continuous stimuli, such as speech and music, providing insights into the underlying neural mechanisms.
Install mTRF-Toolbox
In order to use the process files required for TRF analysis, you will need to download the mTRF toolbox.
First, visit the mTRF Toolbox GitHub page to download the latest version of the toolbox. Click the "Code" button and extract the downloaded zip file into a directory that MATLAB can access.
Then, open MATLAB and add the toolbox to your MATLAB path using the addpath function. This ensures MATLAB recognizes the toolbox commands.
Alternatively, you can install the mtrf manually from Brainstorm directly. For that, go to Plug-ins > Statistics > mtrf. Or, the plugin will install automatically once you call one of the processes for the first time.
Preparing the data
Using the Introduction dataset, you will first need to import the entire recordings for whichever run you want to study into your database. Right-click on the raw file, and then 'Import in database'.
Plotting the TRF
This first process can be used to plot the TRF for a specific channel, given by the user. Drag the EEG/MEG file in the command tab. Select the 'Run' button, then choose 'Plot Temporal Response Function (TRF)'. You will need to set several parameters for the TRF analysis. Specify the data file for the stimulus, indicate the EEG or MEG channels for response analysis, set the range of time lags to explore, and confirm the sampling rate to ensure temporal accuracy.
Run the TRF plotting script. Brainstorm computes the TRF and displays it, showing the estimated neural response function over your specified time lags for a chosen channel.
Saving the TRF weights
You may decide to save the computed TRF for future reference or further analysis. Navigate back to 'Process1', select 'Run', then choose 'Save Temporal Response Function weights'.
Execute this process to save the TRF data into your Brainstorm database, as a matrix containing the weights between stimulus and response data.