Skip to main content

Extension for defining neural probes in the probeinterface format

Project description

ndx-probeinterface Extension for NWB

ndx-probeinterface is an extension of the NWB format to formally define information about neural probes as data types in NWB files. It comes with helper functions to easily construct ndx-probeinterface.Probe from probeinterface.Probe and vice versa.

Installation

pip install ndx_probeinterface

Usage

Going from a probeinterface.Probe/ProbeGroup object to a ndx_probeinterface.Probe object

import ndx_probeinterface

pi_probe = probeinterface.Probe(...)
pi_probegroup = probeinterface.ProbeGroup()

# from_probeinterface always returns a list of ndx_probeinterface.Probe devices
ndx_probes1 = ndx_probeinterface.from_probeinterface(pi_probe)
ndx_probes2 = ndx_probeinterface.from_probeinterface(pi_probegroup)

ndx_probes = ndx_probes1.extend(ndx_probes2)

nwbfile = pynwb.NWBFile(...)

# add Probe as NWB Devices
for ndx_probe in ndx_probes:
    nwbfile.add_device(ndx_probe)

Going from a ndx_probeinterface.Probe object to a probeinterface.Probe object

import ndx_probeinterface

# load ndx_probeinterface.Probe objects from NWB file
io = pynwb.NWBH5IO(file_path, 'r', load_namespaces=True)
nwbfile = io.read()

ndx_probes = []
for device in nwbfile:
    if isinstance(device, ndx_probeinterface.Probe):
        ndx_probes.append(device)

# convert to probeinterface.Probe objects
pi_probes = []
for ndx_probe in ndx_probes:
    pi_probe = ndx_probeinterface.to_probeinterface(ndx_probe)
    pi_probes.append(pi_probe)

Future plans

  • Add information about the headstage used for data acquisition
  • Remove redundant information from ElectrodeTable
  • Incorporate this NDX into the core NWB schema

This extension was created using ndx-template.

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_probeinterface-0.2.1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

ndx_probeinterface-0.2.1-py2.py3-none-any.whl (6.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ndx_probeinterface-0.2.1.tar.gz.

File metadata

  • Download URL: ndx_probeinterface-0.2.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for ndx_probeinterface-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e1fd5ffb7df504f5b752c69e49c7d0c8298de3601bbc581bad9e88fdb53fcc4f
MD5 9962147c04a3eda8225f0aa19bb1c7ae
BLAKE2b-256 5eeb9e7440edb64e60f8ee38e3af0d072f7568dad82962e21db360761bf4b9e3

See more details on using hashes here.

File details

Details for the file ndx_probeinterface-0.2.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ndx_probeinterface-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 df9ec04c0e255c676adbe6b4c94833c0d20077f50ae8edb2f5f2f6d09731fc77
MD5 93049d5de1f5cfa38f0b6106875165c3
BLAKE2b-256 798e406182e0add81230c05d394604b51718464982927c2a87e166d09a2796c6

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