This is a (work in progress) dashboard for visualising the network properties of neural activity from spikes. Note that currently the spatial structure of the network is assumed to be that of the MultiChannels 60MEA system (8 x 8 layout)
- option A: (go to a suitable direcotry, such as home), and run
git clone https://github.com/Timothysit/spike-network-viewer
- option B: click on the green
Code
button, then doDownload ZIP
, then unpack the contents
- If you use anaconda, change to the folder containing the repository contents (
cd spike-network-viewer
) and create a new environment usingconda env create --name spike-network-viewer --file=spike-network-viewer.yml
- feel free to replace 'spike-network-viewer' with your preferred name of the environment
- Install the required packages by running:
pip install -r requirements.txt
- Change to the directory containing the cloned repoistory, eg.
cd spike-network-viewer
, then do: - Activate your python environment, eg.
conda activate spike-network-viewer
if you use anaconda as your python package manager - Launch the viewer:
panel serve --show spike-network-viewer.ipynb
The current supported file format is limited to:
- pickle files:
.pkl
An example file can be found in the example-files
folder.
Go to the spike-network-viewer folder, and run:
python file_conversion.py --mat-folder '/folder/to/your/mat-file/'
For pickle files, the content should be a dictionary with the following structure:
metadata
: a dictionary with:Name
: name of the file (optional)num_channels
: number of channels in the recording (int)num_frames
: number of frames in the recording per channel (int)fs
: sampling rate (float)channel_id
: numpy array containing the names of the channels
df
: pandas dataframe with two columns:spikeTime
: time of spike (s)electrode
: electrode id (int or float)
The viewer is contained in the file spike-network-viewer.ipynb
, which can be opened using:
- jupyter notebook, in which case run:
python -m jupyter notebook
- jupyter lab, in which case run:
python -m jupyter lab
then open the notebook, which allows you modify the behaviour or add/subtract functionalities to the viewer.
Feel free to post issues if you have trouble running the app or have feature suggestions!