Analysis tools and MATLAB scripts for Yuasa et al., 2023, "Spatial tuning of alpha oscillations in human visual cortex" (eLife reviewed preprint: https://elifesciences.org/reviewed-preprints/90387). This repository contains all necessary code to reproduce the analyses and figures from the paper.
-
Install ToolboxToolbox
-
Set up the configuration files using either method:
- Download the Winawerlab toolbox registry:
See also: https://wikis.nyu.edu/display/winawerlab/ToolboxToolbox
# For MacOS rm -rf ~/MATLAB/toolboxes/ToolboxRegistry git clone https://github.com/WinawerLab/ToolboxRegistry ~/MATLAB/toolboxes/ToolboxRegistry
- Download and copy configuration files:
# For MacOS git clone https://github.com/KenYMB/ECoG_alphaPRF ~/MATLAB/toolboxes/ECoG_alphaPRF cp ECoG_alphaPRF/ToolboxToolbox/*.json ~/MATLAB/toolboxes/ToolboxRegistry/configurations/
- Download the Winawerlab toolbox registry:
-
Install dependencies:
tbUse ECoG_alphaPRF
- Download and set path to the following toolboxes:
- ECoG_alphaPRF (This toolbox: https://github.com/KenYMB/ECoG_alphaPRF)
- ECoG_utils (https://github.com/WinawerLab/ECoG_utils)
- analyzePRF (https://github.com/cvnlab/analyzePRF)
- Fieldtrip (https://github.com/fieldtrip/fieldtrip)
You have three options to set the working directory for saving data and figures:
A. Edit the file analysisRootPath.m in the 'Environment' folder:
rootPath = 'YOUR/ANALYSIS/DIRECTORY'; % Edit this line in the file
B. Set the analysis directory by running this command in MATLAB:
analysisRootPath = 'YOUR/ANALYSIS/DIRECTORY'; % The toolbox will use this directory for analysisNote: This sets a MATLAB variable that the toolbox uses to determine where to save data and figures.
C. Copy analysisRootPath.m to your current working directory (the toolbox will use this location)
Note: If no working directory is specified through any of these methods, the toolbox defaults to its installation location.
The BIDS-formatted dataset is available on OpenNeuro: Visual ECoG dataset
To automatically download the data (only available if 'openneuro' is already installed on Mac/Linux; new installations are no longer supported).:
s0_downloadData- Example scripts are available in the 'SampleScripts' directory
- To reproduce the paper's main figures, run
s7_makeFigures - For supplementary figures, run
s8_makeSupplementaryFigures