https://github.com/LKANG777/Beta-Oscillation
Tip revision: 0cc496ef13b5db7a51b3a1d2c7b06403916bacb7 authored by Ling KANG on 10 March 2023, 03:33:14 UTC
Create LICENSE
Create LICENSE
Tip revision: 0cc496e
README.md
## README
This repository contains the simulation source code and example data analysis scripts for the following article:
L. Kang, J. Ranft, and V. Hakim, Beta oscillations and waves in motor cortex can be accounted for by the interplay of spatially-structured connectivity and fluctuating inputs, eLife (2023)
### Simulation
To run the simulation, simply compile and execute the source code according to
`$ g++ -O3 simulation.cpp -o simulation`
Most standard C++ compilers should work, we tried Apple clang version 14.0.0 (clang-1400.0.29.202), GNU g++ 12.2.0 (Homebrew GCC 12.2.0) and GNU g++ 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04).
Then simply run the executable with the command
`$ ./simulation`
Parameters are hardcoded and here chosen as the parameter set SN of the article. By modifying the parameters in the source code, different parameter regimes can be explored.
### Analysis
We performed all data analysis with own Python scripts (tested with Python 3.9 and scipy 1.7.3).
The script inspect_simulation.py plots the data generated by the simulation; parameters are again hardcoded but can be changed easily. The script furthermore generates .npy files of the data that can be used as input for the wave classification analysis script.
The script wave_classification.py contains all functions to analyze and classify the different wave patterns present in the ‘surrogate-LFP’ simulated by our model, as well as the actual LFP data. To allow the script to be tested without having to run a new simulation, we also provide example data of a 5s simulation run that contains a planar wave episode.