ezmsg-neo
Load and stream data from neo files into ezmsg.
Installation
pip install ezmsg-neo
Or install the latest development version:
pip install git+https://github.com/ezmsg-org/ezmsg-neo@dev
Dependencies
Usage
ezmsg-neo modules are available under import ezmsg.neo
Add the NeoIteratorUnit to your ezmsg graph as a data source. You may be interested in other ezmsg extensions for processing the data, such as ezmsg-sigproc and ezmsg-event.
import ezmsg.core as ez
from ezmsg.neo.source import NeoIteratorUnit
from ezmsg.util.messages.key import FilterOnKey
from ezmsg.util.debuglog import DebugLog
from ezmsg.event.rate import EventRate
comps = {
"NEO": NeoIteratorUnit(filepath="path/to/file", chunk_dur=0.05),
"FILTER": FilterOnKey(key="spike"),
"RATE": EventRate(bin_duration=0.05),
"LOG": DebugLog() # Print the output to the console
}
conns = (
(comps["NEO"].OUTPUT_SIGNAL, comps["FILTER"].INPUT_SIGNAL),
(comps["FILTER"].OUTPUT_SIGNAL, comps["RATE"].INPUT_SIGNAL),
(comps["RATE"].OUTPUT_SIGNAL, comps["LOG"].INPUT),
)
ez.run(components=comps, connections=conns)
Standalone
The NeoIterator class can be used outside ezmsg for offline processing:
from ezmsg.neo.source import NeoIterator, NeoIteratorSettings
from ezmsg.util.messages.axisarray import AxisArray
settings = NeoIteratorSettings(filepath="data.nev", chunk_dur=0.05)
neo_iter = NeoIterator(settings)
# Filter messages by key (e.g., "ns3" for analog signals, "spike" for spikes)
sig_msgs = [msg for msg in neo_iter if msg.key.startswith("ns")]
# Concatenate all chunks into a single AxisArray
full_signal = AxisArray.concatenate(*sig_msgs, dim="time")
NeoIterator Messages
The NeuoIteratorUnit and NeoIterator objects, when called, return AxisArray messages with a key attribute identifying the signal type:
- Analog signals - Key matches the stream name (e.g.,
"ns3"). Data shape:(n_samples, n_channels) - Spike trains - Key is
"spike". Data is a sparse array with shape(n_units, n_samples) - Events - Key is
"events". Data contains event labels and itstimeaxis is irregular (CoordinateAxis) with timestamps associated with each event.
Development
- Clone this repo and
cdinto it uv syncto setup your environmentuv run pytest teststo run the tests- (Optional) Install pre-commit hooks:
uv run pre-commit install
Metadata
Release files for ezmsg-neo 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ezmsg_neo-0.7.1.tar.gz | 6.7 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ezmsg_neo-0.7.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.8 MB
Release files / ezmsg_neo-0.7.1.tar.gz
| Download URL | ezmsg_neo-0.7.1.tar.gz |
|---|---|
| Size | 6.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df6cfbe87d588007abd1ab7a7a12992800e3dc8f9bb6dfdce0473e2f7a7965c4
|
|
BLAKE2b-256 checksum How to use checksums |
ea66fe1c094394eff5cc52b4cd26114b78e8544c03ea6d6fc1e563fb9e698947
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ezmsg_neo-0.7.1-py3-none-any.whl
| Download URL | ezmsg_neo-0.7.1-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0afe2bfe54c564d0eb44ee44f82407674bd87f4ba0b0737636a4e26cd326c859
|
|
BLAKE2b-256 checksum How to use checksums |
592037b44e925b47e12ab2025f58089cf93d4c810b963d18bbd6372653d05e05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for ezmsg-neo 0.7.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.