nSTAT's DecodingAlgorithms implements the exact PPAF / PPHF
point-process filters for sorted spikes. Two modern
capabilities that the MATLAB toolbox doesn't provide:
fit_clusterless_decoder(position, multiunits, *, place_bin_size=2.0, ...)
→ ClusterlessDecoderResult: thin wrap of
ClusterlessDecoder with sensible defaults (single
Environment, RandomWalk continuous transition).fit_clusterless_classifier(position, multiunits, *, state_names=None, discrete_diagonal=0.98, ...)
→ ClusterlessClassifierResult: 2-state default
continuous / fragmented with
DiagonalDiscrete(0.98); pass state_names to extend.[clusterless] opt-dep group in pyproject.toml;
like [dynamax] it pulls JAX (~200 MB) and is deliberately
excluded from [all-extras].HEAVY_OPT_OUT_OF_ALL_EXTRAS += clusterless;
EXPECTED_GROUP_FOR_MODULE, EXPECTED_DOC_STEM_FOR_BRIDGE,
DOC_TO_EXAMPLE, EXAMPLE_BACKING_PACKAGE all updated.Per the parity/methods_roadmap.md independence rule, the
upstream LICENSE was verified before adding the dependency:
replay_trajectory_classification is MIT (compatible
with our GPL-2.0; permissive deps can ship inside a GPL package). Last
release: v1.4.1 (2024-09-06); actively maintained.
from nstat.extras.decoding.clusterless_bridge import fit_clusterless_decoder
result = fit_clusterless_decoder(position, multiunits, place_bin_size=5.0)
result.posterior # (T, *position_bins), each row sums to 1
result.map_position # (T, n_position_dims), argmax of posterior
| Check | Result |
|---|---|
| Bridge module imports without the optional dep | PASS (lazy) |
Install-hint ImportError contract | PASS (raises with pip install nstat-toolbox[clusterless]) |
| Input shape validation runs before the import gate | PASS (better DX without the lib) |
tests/test_pyproject_consistency.py drift guards | PASS |
tests/test_extras_docs.py doc/example mapping | PASS |
| Functional smoke (decoder + classifier on synthetic 1-D data) | gated on [clusterless] install (CI extras job to be added separately) |
SortedSpikes{Decoder,Classifier}) — these duplicate nstat.DecodingAlgorithms for sorted spikes; the bridge focuses on the clusterless additions.extras-clusterless CI job (parallel to extras-dynamax) — left for a follow-up to keep CI runtime bounded; smoke test currently skips when the dep is absent.nstat/extras/decoding/__init__.py, nstat/extras/decoding/clusterless_bridge.pytests/extras/test_clusterless_bridge.py (6 tests)docs/extras/decoding_clusterless.md, examples/extras/decoding_clusterless_demo.pypyproject.toml — new [clusterless] group.tests/test_pyproject_consistency.py, tests/test_extras_docs.py, tests/test_extras_examples.py — drift-guard updates.docs/extras.rst — toctree + autosummary additions.parity/methods_roadmap.md — mark Tier 2.1 SHIPPED.