This repository allows the processing NWBs files to reproduce analysis from Bech & Dard, eLife 2026.
This README provides instruction to set up the python environment and run the analysis code to generate intermediate data used to plot.
See at the end how to reproduce the figure panels starting from the intermediate dataset. (Bech, Dard figures repo)
conda create -n bech_dard_nwb_process python=3.11
conda activate bech_dard_nwb_process conda install gitcd /path/to/Bech_Dard_process_NWB
pip install -e .conda activate bech_dard_nwb_process
python path/to/repo/main_analysis/figure1_analysis.py
python path/to/repo/main_analysis/figure1_supp_analysis.py
python path/to/repo/main_analysis/figure2_analysis.py
python path/to/repo/main_analysis/figure2_supp_analysis.py
python path/to/repo/main_analysis/figure2_supp_stats.py
python path/to/repo/main_analysis/figure3_analysis.py
python path/to/repo/main_analysis/figure3_supp_analysis.py
python path/to/repo/main_analysis/figure4_analysis.py
python path/to/repo/main_analysis/process_deeplabcutdata.py
python path/to/repo/main_analysis/process_opto_widefield_examples.py
python path/to/main_analysis/model_context_behaviour.py
python path/to/repo/main_analysis/pixel_correlation_analysis.py
python path/to/repo/main_analysis/pixel_correlation_processing.pyWarning : pixel_correlation_analysis was previously optimized to run on HPC.
To run a test change in the pixel_correlation_analysis.py file the number of shuffles from 1000 to 20
Each script is going to populate a results folder created within the main folder.
conda activate bech_dard_nwb_process
python path/to/repo/main_analysis/panel_data_format.pyThis will create a 'published_data' folder within the main result folder.
This matches publicly available data on Zenodo
To reproduce the figure panels from the downloaded or generated intermediate dataset see: