NWB conversion scripts and tutorials.
Project description
axel-lab-to-nwb
NWB conversion scripts and tutorials. A collaboration with Axel Lab.
Install
To clone the repository and set up a conda environment, do:
$ git clone https://github.com/ben-dichter-consulting/axel-lab-to-nwb.git
$ conda env create -f axel-lab-to-nwb/make_env.yml
$ source activate convert_to_nwb
Alternatively, to install directly in an existing environment:
$ pip install git+https://github.com/ben-dichter-consulting/axel-lab-to-nwb.git
Use
After activating the correct environment, the conversion functions can be imported and run from python.
Here's an example: we'll grab the data from the same experiment but stored in different .npz
files and save it to a single .nwb
file.
from datetime import datetime
from dateutil.tz import tzlocal
from axel_lab_to_nwb import npz_to_nwb
fpath = '/path/to/files'
f1 = '2019_07_01_Nsyb_NLS6s_walk_fly2.npz'
f2 = '2019_07_01_Nsyb_NLS6s_walk_fly2_A.npz'
f3 = '2019_07_01_Nsyb_NLS6s_walk_fly2_ref_im.npz'
fnpz = [f1, f2, f3]
fnwb = 'fly2.nwb'
info = {'session_description':'my CaIm recording',
'identifier':'EXAMPLE_ID',
'session_start_time':datetime.now(tzlocal()),
'experimenter':'My Name',
'lab':'Axel lab',
'institution':'Columbia University',
'experiment_description':'EXPERIMENT_DESCRIPTION',
'session_id':'IDX'}
npz_to_nwb(fpath=fpath, fnpz=fnpz, fnwb=fnwb, info=info, plot_rois=False)
At tutorials you can also find Jupyter notebooks with the step-by-step process of conversion.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
axel_lab_to_nwb-0.0.1.tar.gz
(10.7 kB
view hashes)
Built Distribution
Close
Hashes for axel_lab_to_nwb-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63e0833ad8899dc9a600d00a547a686fadd376a3ad0a20c202e1cfc5c67c89ff |
|
MD5 | 31fa6c505276d3effa82a08274a0eb8b |
|
BLAKE2b-256 | 31ab4f46005c73ba1ba045b5aaf3d634dfd1b1a7cb9edfd9bc2ab2873d0f98a8 |