Tools for reading raw video data from MindScope Neuropixels experiments, compatible with data in the cloud.
Project description
npc_mvr
Tools for reading raw video data from MindScope Neuropixels experiments, compatible with data in the cloud.
Usage
conda create -n npc_mvr python>=3.9
conda activate npc_mvr
pip install npc_mvr
Python
>>> import npc_mvr
>>> d = npc_mvr.MVRDataset('s3://aind-ephys-data/ecephys_670248_2023-08-03_12-04-15/behavior')
# get paths
>>> d.video_paths['behavior']
S3Path('s3://aind-ephys-data/ecephys_670248_2023-08-03_12-04-15/behavior/Behavior_20230803T120430.mp4')
>>> d.info_paths['behavior']
S3Path('s3://aind-ephys-data/ecephys_670248_2023-08-03_12-04-15/behavior/Behavior_20230803T120430.json')
# get data
>>> type(d.video_data['behavior'])
<class 'cv2.VideoCapture'>
>>> type(d.info_data['behavior'])
<class 'dict'>
>>> type(d.sync_data)
<class 'npc_sync.sync.SyncDataset'>
# get frame times for each camera on sync clock
# - nans correspond to frames not recorded on sync
# - first nan is metadata frame
>>> d.frame_times['behavior']
array([ nan, 14.08409, 14.10075, ..., 5084.4582 , 5084.47487, 5084.49153])
>>> d.validate()
Development
See instructions in https://github.com/AllenInstitute/npc_mvr/CONTRIBUTING.md and the original template: https://github.com/AllenInstitute/copier-pdm-npc/blob/main/README.md
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
npc_mvr-0.1.10.tar.gz
(18.8 kB
view details)
Built Distribution
npc_mvr-0.1.10-py3-none-any.whl
(16.5 kB
view details)
File details
Details for the file npc_mvr-0.1.10.tar.gz
.
File metadata
- Download URL: npc_mvr-0.1.10.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.20.0.post1 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b460b427d5a2da9a814342d56f9cf6004eb436e4f569274532031f4b9007c82 |
|
MD5 | 00d8ee2bb694c0b57ea5518931b19bfb |
|
BLAKE2b-256 | e0e4cb8ae852a41ad96c1744b7d2ca0e7583e266fe65b37020b48e3df2a54371 |
File details
Details for the file npc_mvr-0.1.10-py3-none-any.whl
.
File metadata
- Download URL: npc_mvr-0.1.10-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: pdm/2.20.0.post1 CPython/3.10.12 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7707e4d7d786e633e62e13ea14615ffe6a916c1b71354fc1cf6dab154f58da16 |
|
MD5 | d6adbb2335aac98feee0333affaa90de |
|
BLAKE2b-256 | 4d1cda7adc99c4d4f27050f511620c4ba3719d1c56879ee95e1b5314d038429a |