This repository includes codes to reproduce the analysis and figures to map spatial frequency preferences in human visual cortex using Natural Scenes Dataset - synthetic data.
for spatial frequency preferences in human visual cortex.
Citation
Ha, Broderick, Kay, & Winawer (2022). Spatial Frequency Maps in Human Visual Cortex: A Replication and Extension. .., .., . https://??
Table of Contents
All of the code in this repository is written in Python (3.7 and 3.8). To reproduce the python environment, we recommend using Conda to manage the dependencies.
- Install miniconda for your system with the appropriate python version.
- Install mamba:
conda install mamba -n base -c conda-forge
- Download this github repository:
git clone [email protected]:JiyeongHa/Spatial-Frequency-Preference_NSDsyn.git
- move to where the repository is downloded:
cd path/to/sfp
- run
mamba env create -f environment.yml
. - Type
conda activate sfp
to activate this environment and all required packages will be available.
The access to the NSD synthetic data will be granted after filling out the form on the NSD website (https://naturalscenesdataset.org/).
The data for this project is available on OSF (https://osf.io/umqkw/).
We used snakemake to manage the analysis pipeline. The pipeline is defined in the Snakefile
in the root directory. To reproduce all the figures, you can use the following command:
Add -N
if you wish to run the pipeline in dry-run mode.
snakemake -j1 figure_all
We also provide a set of jupyter notebooks under the notebooks
directory to understand the pipeline. The notebooks provide a step-by-step guide to the analysis pipeline. The number indicates the order of the analysis steps.
Step 0: Stimulus check
Step 1: Prepping the data
Step 2: One-dimensional model: Fitting a log-Gaussian function to eccentricity-binned data
Step 3: Two-dimensional model: Fitting the Broderick et al. model to the data