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')

# 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


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.16.tar.gz (19.0 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.16-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file npc_mvr-0.1.16.tar.gz.

File metadata

  • Download URL: npc_mvr-0.1.16.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.7 CPython/3.11.15 Linux/6.17.0-1008-azure

File hashes

Hashes for npc_mvr-0.1.16.tar.gz
Algorithm Hash digest
SHA256 a2700c40d4e52ce494b1fd997486097e6519aeb84cd7ff48c740f78e4e562f6d
MD5 ea6c8be90689d546c9977cebe85de1ae
BLAKE2b-256 108d8b3d9d25f5d734f45cf45d483475cf6dcfb2cbd302a86d263b63a95fa07c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npc_mvr-0.1.16-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.26.7 CPython/3.11.15 Linux/6.17.0-1008-azure

File hashes

Hashes for npc_mvr-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 e955de2883288d1eaca482e19a59a9e6598b6d8621db606afbdd67bf20d72976
MD5 3f3f47476c1b2d4dac47a8d694566dc6
BLAKE2b-256 4f6fa4e7b5c359dd3a93e80bbe45c4548eb61016f017103866d30241b24f176c

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