Skip to main content

LabMetaData extension.

Project description

ndx-labmetadata-abf extension for NWB:N

Extension of the lab_meta_data field.

[PyPI version

Python Installation

Python Usage

Python Installation

pip install git+https://github.com/ben-dichter-consulting/ndx-labmetadata-abf.git

Python Usage

from datetime import datetime
from pynwb import NWBFile, NWBHDF5IO
from ndx_labmetadata_abf import LabMetaData_ext

nwb = NWBFile('session_description', 'identifier', datetime.now().astimezone())

# Creates LabMetaData container
lab_metadata = LabMetaData_ext(
    name='LabMetaData',
    cell_id='cell_id',
    tissue_sample_id='tissue_sample_id',
)

# Add to file
nwb.add_lab_meta_data(lab_metadata)

# Write nwb file
with NWBHDF5IO('test_labmetadata.nwb', 'w') as io:
    io.write(nwb)

# Read nwb file and check its content
with NWBHDF5IO('test_labmetadata.nwb', 'r', load_namespaces=True) as io:
    nwb = io.read()
    print(nwb.lab_meta_data['LabMetaData'])

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

ndx-labmetadata-abf-0.1.1.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

ndx_labmetadata_abf-0.1.1-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

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