Skip to content

vispy/vispy-neuro

Repository files navigation

vispy-neuro

Reusable neurophysiology components under the VisPy umbrella.

Status: experimental. The initial package defines a small, tested vertical for typed spike providers, session-relative time, unit/time filtering and selection contracts, backend-neutral spike-raster data, and GSP visualization output.

Lineage

vispy-neuro is a consolidation program built on the requirements, design lessons, and workflow lineage of two established lines of work:

  • recent VisPy 2, GSP, and Datoviz work on backend-neutral scientific visualization, high-performance GPU rendering, interaction, and portable scene contracts;
  • prior phy and phylib work on large-scale electrophysiology, manual spike curation, neurophysiology data access, dense scientific GUIs, and linked domain views.

The project does not start from an empty design. Its goal is to reorganize and generalize neuroscience-facing capabilities that were previously coupled to a specific application, while leaving generic visualization infrastructure in VisPy/GSP and manual curation policy in phy. The 0.0.1 vertical is newly authored; no phy/phylib code has migrated yet. Code adapted in later work must retain its source attribution and license notices.

See project lineage and scope boundaries.

Ownership

Layer Responsibility
Datoviz Low-level GPU resources, rendering, picking, compute, capture, and backend mechanics.
VisPy 2 / GSP Backend-neutral scientific scenes, visuals, GUI composition, interaction, commands, time, and workspaces.
vispy-neuro Lab-independent neurophysiology providers, types, views, linked state, and adapters.
phy3 / phylib Manual curation policy, compatibility, defaults, extensions, save behavior, and the user-facing application.

Initial Vertical

import numpy as np

from vispy_neuro import (
    InMemorySpikeSorting,
    SpikeRequest,
    TimeInterval,
    Timebase,
    UnitSelection,
    build_spike_raster,
)

sorting = InMemorySpikeSorting(
    id="sorting:demo",
    timebase=Timebase(id="time:session"),
    unit_ids=(7, 42),
    spike_times=np.array([0.1, 0.2, 0.4, 0.8]),
    spike_unit_ids=np.array([7, 42, 7, 42]),
)
request = SpikeRequest(
    interval=TimeInterval(0.0, 0.5),
    selection=UnitSelection((7,)),
)
raster = build_spike_raster(sorting, request)

The returned raster keeps scientific time in float64, stable source spike identifiers, the source timebase, and source unit identifiers. The checkout-only gsp development group converts it to the current GSP PointVisual contract and retains the parallel source-identity mapping. A published GSP extra will follow an installable GSP release.

Development

The initial GSP integration follows the current GSP Python 3.13 development line. Reducing that version constraint before phy3 integration is an explicit roadmap item.

uv sync
uv run ruff check .
uv run pytest
uv run --group gsp pytest -m gsp
uv build

Governance

The repository is owned by the VisPy organization. Cyrille Rossant leads engineering and integration. Nicolas Rougier provides VisPy architecture, API-alignment, review, and governance oversight. See governance.

License

BSD 3-Clause. See LICENSE.

About

Reusable neuro visualization components

Resources

License

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages