Extras — opt-in bridges to the Python neuro ecosystem
The nstat.extras namespace ships Python-only features that have
no counterpart in upstream MATLAB nSTAT. Each subpackage depends on
an optional library declared in pyproject.toml — install via
pip install nstat-toolbox[<group>] (e.g. [neo], [pynapple],
[nwb], [metrics], [nemos], [test-parity], or
[all-extras] for the union).
For the design rationale and stability contract, see
nstat.extras and the
integration_opportunities
audit.
Narrative usage guides
Per-bridge documentation with install commands, API tables, recipes,
gotchas, and links to the runnable demos under examples/extras/.
nstat.extras.interop.neo— Neo bridgenstat.extras.interop.pynapple— pynapple bridgenstat.extras.interop.nwb— NWB:N readernstat.extras.validation.nemos_bridge— NeMoS GLM cross-validationnstat.extras.validation.pykalman_bridge— pykalman Kalman cross-validationnstat.extras.validation.statsmodels_bridge— statsmodels GLM cross-validationnstat.extras.metrics.spike_distances— PySpike spike-train distancesnstat.extras.em.dynamax_bridge— EM-trained state-space models via Dynamaxnstat.extras.decoding.clusterless_bridge— Clusterless point-process decodingnstat.extras.decoding.place_field_decoder— Place-cell encoding + 2-D PPAF decodingnstat.extras.spatial— Spatial & spatiotemporal point processesnstat.extras.latents.gpfa_bridgenstat.extras.matlab_rng— MATLAB-aligned Mersenne Twister RNGnstat.extras.continuous_cif— continuous-time CIF simulator
Interop — data-model bridges
|
Neo ↔ nstat converters (Tier-B interop, scope: spike trains). |
|
pynapple ↔ nstat converters (Tier-B interop). |
|
NWB (Neurodata Without Borders) → nstat reader (Tier-B interop). |
Validation — cross-validation oracles
|
Cross-validate |
|
Cross-validate |
|
Cross-validate |
Metrics — modern spike-train distance metrics
|
Spike-train distance metrics — ISI, SPIKE, SPIKE-synchronization. |
EM — state-space models trained by expectation-maximization
|
EM-trained linear-Gaussian state-space models via Dynamax. |
Decoding — Bayesian point-process decoders
|
Clusterless / trajectory-classification decoding via |
|
High-level place-field encoding + decoding wrapper. |
Spatial — spatial & spatiotemporal point processes
|
Log-Gaussian Cox process rate maps by the Laplace approximation. |
|
Inhomogeneous second-order spatial goodness-of-fit (pure NumPy/SciPy). |
|
Marked / discrete-time-rescaling goodness-of-fit (pure NumPy/SciPy). |
|
Multivariate Hawkes process bridge via |
|
Determinantal point process (DPP) sampling — |
Latents — latent-variable / dimensionality-reduction bridges
|
Gaussian-Process Factor Analysis bridge via Elephant. |