Skip to main content

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.

PyPI Python version

Coverage CI/CD GitHub issues

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')
>>> d.sync_path
S3Path('s3://aind-ephys-data/ecephys_670248_2023-08-03_12-04-15/behavior/20230803T120415.h5')

# 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]) 

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


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.2.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

npc_mvr-0.1.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file npc-mvr-0.1.2.tar.gz.

File metadata

  • Download URL: npc-mvr-0.1.2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.12.3 CPython/3.10.12

File hashes

Hashes for npc-mvr-0.1.2.tar.gz
Algorithm Hash digest
SHA256 053e4d1b2894bae5bfe97701ea9f9baeca1efd826872a24bd9ed80ba1689f82a
MD5 518c840df7bf938a057abae8f1649a03
BLAKE2b-256 39bfa3fdebbfb865a4e3f669cfbfc886062e1636c5a744b996dc8725a68e6912

See more details on using hashes here.

File details

Details for the file npc_mvr-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: npc_mvr-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.12.3 CPython/3.10.12

File hashes

Hashes for npc_mvr-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 379f742233021826ba83baa08dfa7815ad93c8160870d8160a114d6bb83489bd
MD5 db85e675919fb39af8ab4c5061198b77
BLAKE2b-256 19bce3c63652b4f54a56e41a3f2d1c776e6987bde00d60bd34d65a7302f654ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page