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
/``ProbeGroupobject 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
Release history Release notifications | RSS feed
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.1.0.tar.gz
(15.2 kB
view details)
Built Distribution
File details
Details for the file ndx-probeinterface-0.1.0.tar.gz
.
File metadata
- Download URL: ndx-probeinterface-0.1.0.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ff11db1a8a7d60cef8d1acccacb340df281cf702bb0689ec291b7a12161f5c6 |
|
MD5 | 5f83c6b519c2b6e1e3a291c50e4db33a |
|
BLAKE2b-256 | d386894ed2fd5b654a6d36b342b51f04ee44cfe05796e0225bee4542dd2a05dd |
File details
Details for the file ndx_probeinterface-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: ndx_probeinterface-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a7c8538c932a5ae0340fa062e7d382fa0aebdfd08cdd33066f8c69575fe0901 |
|
MD5 | 5e1873fb451dda9c6686266ed534278e |
|
BLAKE2b-256 | a0f14d84fd7910263d125fb45d391596c2d1ce7ee80db47ac5699916b3d69101 |