Skip to main content

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

Metadata

Release files for npc-mvr 0.1.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for npc-mvr 0.1.18
File Size Uploaded Provenance
npc_mvr-0.1.18.tar.gz 19.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for npc-mvr 0.1.18
File Interpreter ABI Platform
npc_mvr-0.1.18-py3-none-any.whl Python 3 none any Details

Total release size: 35.7 kB

Release files / npc_mvr-0.1.18.tar.gz

Download URL npc_mvr-0.1.18.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
36d3379bd347bf3bfcade8598eca87f36b236af0421808870e0a76f7393528a2
BLAKE2b-256 checksum
How to use checksums
1212200489dd954180266bbdb25c5a85e73f8566b5b561d03d0deb973bc88463
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.27.0 CPython/3.11.15 Linux/6.17.0-1018-azure

Release files / npc_mvr-0.1.18-py3-none-any.whl

Download URL npc_mvr-0.1.18-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7504cf972219bac18a68c0a1676d37ab5990f26795071d42f20c20b740eaa46
BLAKE2b-256 checksum
How to use checksums
22f9c90f697ab96b10b193204b15598553179115ac69c6b68576d38366955c32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.27.0 CPython/3.11.15 Linux/6.17.0-1018-azure

Security for npc-mvr 0.1.18

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page