nstat-toolbox 0.4.2__tar.gz → 0.4.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/PKG-INFO +56 -11
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/README.md +44 -8
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/decoding_algorithms.py +1 -2
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/__init__.py +11 -3
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/decoding/clusterless_bridge.py +17 -6
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/linear_cif.py +1 -1
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/simulation.py +2 -2
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat_toolbox.egg-info/PKG-INFO +56 -11
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat_toolbox.egg-info/SOURCES.txt +0 -1
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat_toolbox.egg-info/requires.txt +2 -2
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/pyproject.toml +19 -8
- nstat_toolbox-0.4.2/tests/test_curriculum_parity.py +0 -196
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/ConfidenceInterval.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/ConfigColl.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/CovColl.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/Covariate.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/DecodingAlgorithms.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/FitResSummary.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/FitResult.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/SignalObj.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/TrialConfig.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/__init__.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/_spike_train_impl.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/_trial_config_impl.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/analysis.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/cif.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/class_fidelity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/compat/__init__.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/compat/matlab/__init__.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/confidence_interval.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/core.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/data/__init__.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/data/manifest.json +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/data_manager.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/datasets.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/decoding.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/errors.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/events.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/_lazy.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/decoding/__init__.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/em/__init__.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/em/dynamax_bridge.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/interop/__init__.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/interop/neo.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/interop/nwb.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/interop/pynapple.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/metrics/__init__.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/metrics/spike_distances.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/validation/__init__.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/validation/nemos_bridge.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/validation/pykalman_bridge.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/extras/validation/statsmodels_bridge.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/fit.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/glm.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/history.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/install.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/matlab_engine.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/notebook_data.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/notebook_fidelity_audit.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/notebook_figures.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/notebook_parity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/nspikeTrain.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/nstColl.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/nstat_install.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/paper_example_catalog.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/paper_examples.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/paper_examples_full.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/paper_figures.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/paper_gallery.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/parity_report.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/plot_style.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/signal.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/simulators.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/simulink_fidelity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/spikes.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/trial.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat/zernike.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat_toolbox.egg-info/dependency_links.txt +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat_toolbox.egg-info/entry_points.txt +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/nstat_toolbox.egg-info/top_level.txt +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/setup.cfg +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_analysis_pipeline.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_api_surface.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_audit_bug_fixes.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_ci_extras_functional.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_class_contracts.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_class_fidelity_audit.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_cleanroom_boundary.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_datasets.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_decoding_algorithms_fidelity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_diff_against_matlab.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_docs_surface.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_example01_parity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_example02_parity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_example03_parity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_example04_parity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_example05_parity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_expanded_coverage.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_extras_docs.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_extras_examples.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_fitresult_diagnostics.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_function_contracts.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_helpfile_freshness.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_install_and_compat.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_install_cli.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_intro_page.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_linear_cif.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_matlab_audit_xref.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_matlab_engine.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_matlab_gold_fixtures.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_matlab_reference.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_matlab_symbol_surface.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_network_tutorial_builder.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_notebook_artifact_contracts.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_notebook_changed_topics.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_notebook_ci_groups.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_notebook_data.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_notebook_fidelity_audit.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_notebook_parity_notes.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_notebook_surface.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_nspiketrain_fidelity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_paper_example_scripts.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_paper_figure_assets.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_paper_gallery_docs.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_parity_manifest.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_parity_report.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_population_time_rescale.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_pyproject_consistency.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_readme_examples_catalog.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_readme_links.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_readme_nstatpaperexamples.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_release_check.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_repo_layout.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_signalobj_fidelity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_simulators_fidelity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_simulink_fidelity_audit.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_time_rescale_oracle.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_time_rescale_vs_nstat.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_trial_fidelity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_trial_plotting_surface.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_v030_methods.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_version_sync.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_workflow_fidelity.py +0 -0
- {nstat_toolbox-0.4.2 → nstat_toolbox-0.4.4}/tests/test_zernike.py +0 -0
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nstat-toolbox
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
4
4
|
Summary: Python port of the nSTAT toolbox
|
|
5
5
|
Author: Cajigas Lab
|
|
6
|
+
Classifier: Development Status :: 4 - Beta
|
|
7
|
+
Classifier: Intended Audience :: Science/Research
|
|
8
|
+
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
6
15
|
Requires-Python: >=3.10
|
|
7
16
|
Description-Content-Type: text/markdown
|
|
8
17
|
Requires-Dist: numpy>=1.24
|
|
@@ -36,7 +45,7 @@ Requires-Dist: dynamax>=0.1; extra == "dynamax"
|
|
|
36
45
|
Provides-Extra: test-parity
|
|
37
46
|
Requires-Dist: nemos>=0.2; extra == "test-parity"
|
|
38
47
|
Requires-Dist: pykalman>=0.11; extra == "test-parity"
|
|
39
|
-
Requires-Dist: statsmodels>=0.
|
|
48
|
+
Requires-Dist: statsmodels>=0.14; extra == "test-parity"
|
|
40
49
|
Requires-Dist: nitime>=0.12; extra == "test-parity"
|
|
41
50
|
Provides-Extra: clusterless
|
|
42
51
|
Requires-Dist: replay_trajectory_classification>=1.4; extra == "clusterless"
|
|
@@ -49,19 +58,37 @@ Requires-Dist: pynapple>=0.7; extra == "all-extras"
|
|
|
49
58
|
Requires-Dist: pyspike>=0.8; extra == "all-extras"
|
|
50
59
|
Requires-Dist: nemos>=0.2; extra == "all-extras"
|
|
51
60
|
Requires-Dist: pykalman>=0.11; extra == "all-extras"
|
|
52
|
-
Requires-Dist: statsmodels>=0.
|
|
61
|
+
Requires-Dist: statsmodels>=0.14; extra == "all-extras"
|
|
53
62
|
Requires-Dist: nitime>=0.12; extra == "all-extras"
|
|
54
63
|
|
|
55
|
-
|
|
64
|
+
<div align="center">
|
|
56
65
|
|
|
57
|
-
|
|
66
|
+
<picture>
|
|
67
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/_static/nstat-logo-light.png">
|
|
68
|
+
<img alt="nSTAT — neural Spike Train Analysis Toolbox" src="docs/_static/nstat-logo.png" width="440">
|
|
69
|
+
</picture>
|
|
58
70
|
|
|
71
|
+
### Neural Spike Train Analysis Toolbox for Python
|
|
72
|
+
|
|
73
|
+
[](https://pypi.org/project/nstat-toolbox/)
|
|
74
|
+
[](https://pypi.org/project/nstat-toolbox/)
|
|
59
75
|
[](https://github.com/cajigaslab/nSTAT-python/actions/workflows/ci.yml)
|
|
76
|
+
[](https://cajigaslab.github.io/nSTAT-python/)
|
|
77
|
+
[](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
|
|
78
|
+
[](https://doi.org/10.1016/j.jneumeth.2012.08.009)
|
|
79
|
+
|
|
80
|
+
</div>
|
|
60
81
|
|
|
61
82
|
> 📖 **New here?** Start with the
|
|
62
83
|
> [**5-minute intro**](https://cajigaslab.github.io/nSTAT-python/intro.html) —
|
|
63
84
|
> a friendly tour of the toolbox with runnable snippets, the
|
|
64
85
|
> `nstat.extras` opt-in bridges, and the paper-example gallery.
|
|
86
|
+
>
|
|
87
|
+
> 🎓 **Learning the science?** The
|
|
88
|
+
> [**Concepts & Background**](https://cajigaslab.github.io/nSTAT-python/concepts/index.html)
|
|
89
|
+
> guide teaches microelectrode recordings, the LFP, point-process GLMs,
|
|
90
|
+
> goodness-of-fit, and decoding — with figures, runnable examples, and cited
|
|
91
|
+
> literature.
|
|
65
92
|
|
|
66
93
|
`nSTAT-python` is a Python port of the [nSTAT](https://github.com/cajigaslab/nSTAT)
|
|
67
94
|
open-source neural spike train analysis toolbox. It implements a range of models and
|
|
@@ -74,7 +101,11 @@ continuous neural signals such as LFP, EEG, and ECoG.
|
|
|
74
101
|
One of nSTAT's key strengths is point-process generalized linear models for spike
|
|
75
102
|
train signals that provide a formal statistical framework for processing signals
|
|
76
103
|
recorded from ensembles of single neurons. It also has extensive support for model
|
|
77
|
-
fitting, model-order analysis, and adaptive decoding.
|
|
104
|
+
fitting, model-order analysis, and adaptive decoding. Goodness-of-fit can be
|
|
105
|
+
assessed per neuron with the time-rescaling KS test (`FitResult.computeKSStats`)
|
|
106
|
+
or jointly across a population with the multivariate marked point-process
|
|
107
|
+
time-rescaling test (`nstat.population_time_rescale`, Tao et al. 2018), which
|
|
108
|
+
catches inter-neuron coupling misfit that per-neuron tests miss.
|
|
78
109
|
|
|
79
110
|
Although created with neural signal processing in mind, nSTAT can be used as a
|
|
80
111
|
generic tool for analyzing any types of discrete and continuous signals, and thus
|
|
@@ -166,8 +197,20 @@ set_plot_style('modern')
|
|
|
166
197
|
set_plot_style('legacy')
|
|
167
198
|
```
|
|
168
199
|
|
|
169
|
-
|
|
170
|
-
|
|
200
|
+
## Documentation
|
|
201
|
+
|
|
202
|
+
Full rendered documentation is published on
|
|
203
|
+
[**GitHub Pages**](https://cajigaslab.github.io/nSTAT-python/):
|
|
204
|
+
|
|
205
|
+
| Page | What you'll find |
|
|
206
|
+
|---|---|
|
|
207
|
+
| [5-minute intro](https://cajigaslab.github.io/nSTAT-python/intro.html) | Friendly, illustrated tour with runnable snippets — start here |
|
|
208
|
+
| [**Concepts & Background**](https://cajigaslab.github.io/nSTAT-python/concepts/index.html) | Learn the neuroscience & statistics — microelectrode recordings, spikes & the LFP, point-process GLMs, goodness-of-fit, decoding, state-space/EM, and rhythmic/tremor cells & the clinical microelectrode (with the beta-band biomarker that guides adaptive DBS) — with figures and cited literature |
|
|
209
|
+
| [API reference](https://cajigaslab.github.io/nSTAT-python/api.html) | Every public symbol, auto-generated from docstrings |
|
|
210
|
+
| [Class definitions](https://cajigaslab.github.io/nSTAT-python/ClassDefinitions.html) | Method catalog for each MATLAB-faithful core class |
|
|
211
|
+
| [Paper-aligned toolbox map](https://cajigaslab.github.io/nSTAT-python/PaperOverview.html) | Crosswalk between the 2012 paper and the Python API |
|
|
212
|
+
| [`nstat.extras` summary](https://cajigaslab.github.io/nSTAT-python/extras_summary.html) | Per-bridge cards with install commands and snippets |
|
|
213
|
+
| [What's New](https://cajigaslab.github.io/nSTAT-python/whats_new.html) | Per-release change summaries |
|
|
171
214
|
|
|
172
215
|
For mathematical and programmatic details of the toolbox, see:
|
|
173
216
|
|
|
@@ -262,7 +305,8 @@ optional-dep group:
|
|
|
262
305
|
| [pykalman](https://github.com/pykalman/pykalman) | Pure-NumPy Kalman (cross-validation reference) | `nstat.extras.validation.pykalman_bridge` | `pip install nstat-toolbox[test-parity]` |
|
|
263
306
|
| [statsmodels](https://www.statsmodels.org) | Poisson GLM (IRLS — tightest cross-validation oracle, ~1e-9 agreement) | `nstat.extras.validation.statsmodels_bridge` | `pip install nstat-toolbox[test-parity]` |
|
|
264
307
|
| [PySpike](https://github.com/mariomulansky/PySpike) | ISI / SPIKE-distance spike-train metrics | `nstat.extras.metrics.spike_distances` | `pip install nstat-toolbox[metrics]` |
|
|
265
|
-
| [Dynamax](https://github.com/probml/dynamax) | EM-trained linear-Gaussian state-space models
|
|
308
|
+
| [Dynamax](https://github.com/probml/dynamax) | EM-trained linear-Gaussian / point-process / hybrid state-space models — the `KF_EM` / `PP_EM` / `mPPCO_EM` family, with held-out predictive log-likelihood and multi-restart selection | `nstat.extras.em.dynamax_bridge` | `pip install nstat-toolbox[dynamax]` (pulls JAX ~200 MB) |
|
|
309
|
+
| [replay_trajectory_classification](https://github.com/Eden-Kramer-Lab/replay_trajectory_classification) | Clusterless marked point-process decoding (no spike sorting) + trajectory-type classification — the modern descendant of nSTAT's PPAF / PPHF filters | `nstat.extras.decoding.clusterless_bridge` | `pip install nstat-toolbox[clusterless]` (pulls JAX ~200 MB) |
|
|
266
310
|
|
|
267
311
|
For ecosystem peers nstat does **not** wrap (spike sorting, calcium
|
|
268
312
|
imaging, deep-learning decoders), see
|
|
@@ -274,5 +318,6 @@ for the rationale and recommended alternatives:
|
|
|
274
318
|
- **[ssqueezepy](https://github.com/OverLordGoldDragon/ssqueezepy)** — wavelet synchrosqueezing; planned `nstat.extras.spectral`.
|
|
275
319
|
|
|
276
320
|
Install every bridge at once: `pip install nstat-toolbox[all-extras]`
|
|
277
|
-
(does **not** include `[dynamax]` due to JAX install
|
|
278
|
-
|
|
321
|
+
(does **not** include `[dynamax]` or `[clusterless]` due to JAX install
|
|
322
|
+
size — install those groups separately if you need EM-trained
|
|
323
|
+
state-space models or clusterless decoding).
|
|
@@ -1,13 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/_static/nstat-logo-light.png">
|
|
5
|
+
<img alt="nSTAT — neural Spike Train Analysis Toolbox" src="docs/_static/nstat-logo.png" width="440">
|
|
6
|
+
</picture>
|
|
4
7
|
|
|
8
|
+
### Neural Spike Train Analysis Toolbox for Python
|
|
9
|
+
|
|
10
|
+
[](https://pypi.org/project/nstat-toolbox/)
|
|
11
|
+
[](https://pypi.org/project/nstat-toolbox/)
|
|
5
12
|
[](https://github.com/cajigaslab/nSTAT-python/actions/workflows/ci.yml)
|
|
13
|
+
[](https://cajigaslab.github.io/nSTAT-python/)
|
|
14
|
+
[](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
|
|
15
|
+
[](https://doi.org/10.1016/j.jneumeth.2012.08.009)
|
|
16
|
+
|
|
17
|
+
</div>
|
|
6
18
|
|
|
7
19
|
> 📖 **New here?** Start with the
|
|
8
20
|
> [**5-minute intro**](https://cajigaslab.github.io/nSTAT-python/intro.html) —
|
|
9
21
|
> a friendly tour of the toolbox with runnable snippets, the
|
|
10
22
|
> `nstat.extras` opt-in bridges, and the paper-example gallery.
|
|
23
|
+
>
|
|
24
|
+
> 🎓 **Learning the science?** The
|
|
25
|
+
> [**Concepts & Background**](https://cajigaslab.github.io/nSTAT-python/concepts/index.html)
|
|
26
|
+
> guide teaches microelectrode recordings, the LFP, point-process GLMs,
|
|
27
|
+
> goodness-of-fit, and decoding — with figures, runnable examples, and cited
|
|
28
|
+
> literature.
|
|
11
29
|
|
|
12
30
|
`nSTAT-python` is a Python port of the [nSTAT](https://github.com/cajigaslab/nSTAT)
|
|
13
31
|
open-source neural spike train analysis toolbox. It implements a range of models and
|
|
@@ -20,7 +38,11 @@ continuous neural signals such as LFP, EEG, and ECoG.
|
|
|
20
38
|
One of nSTAT's key strengths is point-process generalized linear models for spike
|
|
21
39
|
train signals that provide a formal statistical framework for processing signals
|
|
22
40
|
recorded from ensembles of single neurons. It also has extensive support for model
|
|
23
|
-
fitting, model-order analysis, and adaptive decoding.
|
|
41
|
+
fitting, model-order analysis, and adaptive decoding. Goodness-of-fit can be
|
|
42
|
+
assessed per neuron with the time-rescaling KS test (`FitResult.computeKSStats`)
|
|
43
|
+
or jointly across a population with the multivariate marked point-process
|
|
44
|
+
time-rescaling test (`nstat.population_time_rescale`, Tao et al. 2018), which
|
|
45
|
+
catches inter-neuron coupling misfit that per-neuron tests miss.
|
|
24
46
|
|
|
25
47
|
Although created with neural signal processing in mind, nSTAT can be used as a
|
|
26
48
|
generic tool for analyzing any types of discrete and continuous signals, and thus
|
|
@@ -112,8 +134,20 @@ set_plot_style('modern')
|
|
|
112
134
|
set_plot_style('legacy')
|
|
113
135
|
```
|
|
114
136
|
|
|
115
|
-
|
|
116
|
-
|
|
137
|
+
## Documentation
|
|
138
|
+
|
|
139
|
+
Full rendered documentation is published on
|
|
140
|
+
[**GitHub Pages**](https://cajigaslab.github.io/nSTAT-python/):
|
|
141
|
+
|
|
142
|
+
| Page | What you'll find |
|
|
143
|
+
|---|---|
|
|
144
|
+
| [5-minute intro](https://cajigaslab.github.io/nSTAT-python/intro.html) | Friendly, illustrated tour with runnable snippets — start here |
|
|
145
|
+
| [**Concepts & Background**](https://cajigaslab.github.io/nSTAT-python/concepts/index.html) | Learn the neuroscience & statistics — microelectrode recordings, spikes & the LFP, point-process GLMs, goodness-of-fit, decoding, state-space/EM, and rhythmic/tremor cells & the clinical microelectrode (with the beta-band biomarker that guides adaptive DBS) — with figures and cited literature |
|
|
146
|
+
| [API reference](https://cajigaslab.github.io/nSTAT-python/api.html) | Every public symbol, auto-generated from docstrings |
|
|
147
|
+
| [Class definitions](https://cajigaslab.github.io/nSTAT-python/ClassDefinitions.html) | Method catalog for each MATLAB-faithful core class |
|
|
148
|
+
| [Paper-aligned toolbox map](https://cajigaslab.github.io/nSTAT-python/PaperOverview.html) | Crosswalk between the 2012 paper and the Python API |
|
|
149
|
+
| [`nstat.extras` summary](https://cajigaslab.github.io/nSTAT-python/extras_summary.html) | Per-bridge cards with install commands and snippets |
|
|
150
|
+
| [What's New](https://cajigaslab.github.io/nSTAT-python/whats_new.html) | Per-release change summaries |
|
|
117
151
|
|
|
118
152
|
For mathematical and programmatic details of the toolbox, see:
|
|
119
153
|
|
|
@@ -208,7 +242,8 @@ optional-dep group:
|
|
|
208
242
|
| [pykalman](https://github.com/pykalman/pykalman) | Pure-NumPy Kalman (cross-validation reference) | `nstat.extras.validation.pykalman_bridge` | `pip install nstat-toolbox[test-parity]` |
|
|
209
243
|
| [statsmodels](https://www.statsmodels.org) | Poisson GLM (IRLS — tightest cross-validation oracle, ~1e-9 agreement) | `nstat.extras.validation.statsmodels_bridge` | `pip install nstat-toolbox[test-parity]` |
|
|
210
244
|
| [PySpike](https://github.com/mariomulansky/PySpike) | ISI / SPIKE-distance spike-train metrics | `nstat.extras.metrics.spike_distances` | `pip install nstat-toolbox[metrics]` |
|
|
211
|
-
| [Dynamax](https://github.com/probml/dynamax) | EM-trained linear-Gaussian state-space models
|
|
245
|
+
| [Dynamax](https://github.com/probml/dynamax) | EM-trained linear-Gaussian / point-process / hybrid state-space models — the `KF_EM` / `PP_EM` / `mPPCO_EM` family, with held-out predictive log-likelihood and multi-restart selection | `nstat.extras.em.dynamax_bridge` | `pip install nstat-toolbox[dynamax]` (pulls JAX ~200 MB) |
|
|
246
|
+
| [replay_trajectory_classification](https://github.com/Eden-Kramer-Lab/replay_trajectory_classification) | Clusterless marked point-process decoding (no spike sorting) + trajectory-type classification — the modern descendant of nSTAT's PPAF / PPHF filters | `nstat.extras.decoding.clusterless_bridge` | `pip install nstat-toolbox[clusterless]` (pulls JAX ~200 MB) |
|
|
212
247
|
|
|
213
248
|
For ecosystem peers nstat does **not** wrap (spike sorting, calcium
|
|
214
249
|
imaging, deep-learning decoders), see
|
|
@@ -220,5 +255,6 @@ for the rationale and recommended alternatives:
|
|
|
220
255
|
- **[ssqueezepy](https://github.com/OverLordGoldDragon/ssqueezepy)** — wavelet synchrosqueezing; planned `nstat.extras.spectral`.
|
|
221
256
|
|
|
222
257
|
Install every bridge at once: `pip install nstat-toolbox[all-extras]`
|
|
223
|
-
(does **not** include `[dynamax]` due to JAX install
|
|
224
|
-
|
|
258
|
+
(does **not** include `[dynamax]` or `[clusterless]` due to JAX install
|
|
259
|
+
size — install those groups separately if you need EM-trained
|
|
260
|
+
state-space models or clusterless decoding).
|
|
@@ -16,8 +16,7 @@ Covered families (all entry points are ``@staticmethod``):
|
|
|
16
16
|
- **Expectation-maximisation** — ``PPSS_EMFB`` (state-space GLM EM) and
|
|
17
17
|
``PPCO_EMFB`` (mixed point-process / continuous-observation EM).
|
|
18
18
|
|
|
19
|
-
Most algorithms
|
|
20
|
-
(ch. 3–4) and the original 2012 paper (see
|
|
19
|
+
Most algorithms follow the derivations in the original 2012 paper (see
|
|
21
20
|
:doc:`/PaperOverview`). Spike trains are :class:`~nstat.nspikeTrain.nspikeTrain`
|
|
22
21
|
objects; observations are ``CxN`` binary matrices; time is in **seconds**.
|
|
23
22
|
This is the largest single module in the package (~7.9k lines) and is
|
|
@@ -4,17 +4,25 @@ This namespace is the home for features that have no counterpart in
|
|
|
4
4
|
upstream MATLAB nSTAT and would dilute the MATLAB-parity contract of
|
|
5
5
|
the core :mod:`nstat` package if added there.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Five subpackages ship today:
|
|
8
8
|
|
|
9
9
|
- :mod:`nstat.extras.interop` — converters between :class:`nstat.nspikeTrain`
|
|
10
10
|
/ :class:`nstat.SpikeTrainCollection` / :class:`nstat.Trial` and the
|
|
11
11
|
data models used by **Neo**, **pynapple**, and **pynwb**.
|
|
12
12
|
- :mod:`nstat.extras.validation` — Python-side cross-validation bridges
|
|
13
|
-
(
|
|
14
|
-
estimates against independent reference
|
|
13
|
+
(**NeMoS** / **statsmodels** Poisson GLM, **pykalman**) that triangulate
|
|
14
|
+
nstat's MATLAB-faithful estimates against independent reference
|
|
15
|
+
implementations.
|
|
15
16
|
- :mod:`nstat.extras.metrics` — modern spike-train distance / synchrony
|
|
16
17
|
metrics (ISI-distance, SPIKE-distance, SPIKE-synchronization via
|
|
17
18
|
**PySpike**) that have no MATLAB counterpart.
|
|
19
|
+
- :mod:`nstat.extras.em` — EM-trained linear-Gaussian, point-process, and
|
|
20
|
+
hybrid state-space models (the ``KF_EM`` / ``PP_EM`` / ``mPPCO_EM``
|
|
21
|
+
families) via **Dynamax**, with held-out predictive log-likelihood,
|
|
22
|
+
identifiability-gauge canonicalization, and multi-restart selection.
|
|
23
|
+
- :mod:`nstat.extras.decoding` — Bayesian point-process decoders that
|
|
24
|
+
extend nSTAT's PPAF / PPHF mathematics, including **clusterless**
|
|
25
|
+
marked point-process decoding via **replay_trajectory_classification**.
|
|
18
26
|
|
|
19
27
|
Stability contract
|
|
20
28
|
------------------
|
|
@@ -260,8 +260,8 @@ def fit_clusterless_decoder(
|
|
|
260
260
|
transition = rtc.RandomWalk(movement_var=float(movement_var))
|
|
261
261
|
|
|
262
262
|
decoder = rtc.ClusterlessDecoder(
|
|
263
|
-
|
|
264
|
-
|
|
263
|
+
environment=env,
|
|
264
|
+
transition_type=transition,
|
|
265
265
|
)
|
|
266
266
|
decoder.fit(position, multiunits, is_training=is_training)
|
|
267
267
|
dataset = decoder.predict(multiunits, is_compute_acausal=bool(is_compute_acausal))
|
|
@@ -335,12 +335,23 @@ def fit_clusterless_classifier(
|
|
|
335
335
|
rtc = _require_clusterless()
|
|
336
336
|
|
|
337
337
|
env = rtc.Environment(place_bin_size=float(place_bin_size))
|
|
338
|
-
#
|
|
339
|
-
#
|
|
340
|
-
#
|
|
338
|
+
# ``continuous_transition_types`` must be a square (n_states x n_states)
|
|
339
|
+
# matrix: entry [i][j] is the continuous-state transition model applied
|
|
340
|
+
# when moving between discrete states i and j. The diagonal carries
|
|
341
|
+
# each state's own movement model — random walk for the "continuous"-like
|
|
342
|
+
# states, uniform for the "fragmented"-like ones — while the off-diagonal
|
|
343
|
+
# cells use a uniform spatial transition, mirroring the upstream default
|
|
344
|
+
# layout (e.g. ``[[RandomWalk, Uniform], [Uniform, Uniform]]``).
|
|
341
345
|
def _transition_for(name: str):
|
|
342
346
|
return rtc.Uniform() if name.lower() == "fragmented" else rtc.RandomWalk()
|
|
343
|
-
|
|
347
|
+
n_states = len(state_names)
|
|
348
|
+
cont_transitions = [
|
|
349
|
+
[
|
|
350
|
+
_transition_for(state_names[i]) if i == j else rtc.Uniform()
|
|
351
|
+
for j in range(n_states)
|
|
352
|
+
]
|
|
353
|
+
for i in range(n_states)
|
|
354
|
+
]
|
|
344
355
|
|
|
345
356
|
classifier = rtc.ClusterlessClassifier(
|
|
346
357
|
environments=env,
|
|
@@ -9,7 +9,7 @@ binomial (logit link). For these, derivatives of ``lambda*delta`` and
|
|
|
9
9
|
``log(lambda*delta)`` w.r.t. the stimulus variables have a closed form
|
|
10
10
|
and **require no symbolic-math toolkit** (no SymPy dependency).
|
|
11
11
|
|
|
12
|
-
Closed-form derivatives
|
|
12
|
+
Closed-form derivatives:
|
|
13
13
|
|
|
14
14
|
Poisson: ld = exp(X·beta + H·gamma)
|
|
15
15
|
grad = ld · beta_stim
|
|
@@ -13,8 +13,8 @@ These are pure-Python counterparts to the Simulink-driven simulation
|
|
|
13
13
|
pipeline used in :mod:`nstat.cif` and :mod:`nstat.simulators`. No
|
|
14
14
|
MATLAB counterpart at the module level — the underlying algorithm is the
|
|
15
15
|
standard Bernoulli-thinning approximation for an inhomogeneous Poisson
|
|
16
|
-
process (
|
|
17
|
-
|
|
16
|
+
process (Lewis & Shedler 1979; Ogata 1981). Time is in **seconds**,
|
|
17
|
+
rates in **Hz**.
|
|
18
18
|
"""
|
|
19
19
|
from __future__ import annotations
|
|
20
20
|
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nstat-toolbox
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
4
4
|
Summary: Python port of the nSTAT toolbox
|
|
5
5
|
Author: Cajigas Lab
|
|
6
|
+
Classifier: Development Status :: 4 - Beta
|
|
7
|
+
Classifier: Intended Audience :: Science/Research
|
|
8
|
+
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
6
15
|
Requires-Python: >=3.10
|
|
7
16
|
Description-Content-Type: text/markdown
|
|
8
17
|
Requires-Dist: numpy>=1.24
|
|
@@ -36,7 +45,7 @@ Requires-Dist: dynamax>=0.1; extra == "dynamax"
|
|
|
36
45
|
Provides-Extra: test-parity
|
|
37
46
|
Requires-Dist: nemos>=0.2; extra == "test-parity"
|
|
38
47
|
Requires-Dist: pykalman>=0.11; extra == "test-parity"
|
|
39
|
-
Requires-Dist: statsmodels>=0.
|
|
48
|
+
Requires-Dist: statsmodels>=0.14; extra == "test-parity"
|
|
40
49
|
Requires-Dist: nitime>=0.12; extra == "test-parity"
|
|
41
50
|
Provides-Extra: clusterless
|
|
42
51
|
Requires-Dist: replay_trajectory_classification>=1.4; extra == "clusterless"
|
|
@@ -49,19 +58,37 @@ Requires-Dist: pynapple>=0.7; extra == "all-extras"
|
|
|
49
58
|
Requires-Dist: pyspike>=0.8; extra == "all-extras"
|
|
50
59
|
Requires-Dist: nemos>=0.2; extra == "all-extras"
|
|
51
60
|
Requires-Dist: pykalman>=0.11; extra == "all-extras"
|
|
52
|
-
Requires-Dist: statsmodels>=0.
|
|
61
|
+
Requires-Dist: statsmodels>=0.14; extra == "all-extras"
|
|
53
62
|
Requires-Dist: nitime>=0.12; extra == "all-extras"
|
|
54
63
|
|
|
55
|
-
|
|
64
|
+
<div align="center">
|
|
56
65
|
|
|
57
|
-
|
|
66
|
+
<picture>
|
|
67
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/_static/nstat-logo-light.png">
|
|
68
|
+
<img alt="nSTAT — neural Spike Train Analysis Toolbox" src="docs/_static/nstat-logo.png" width="440">
|
|
69
|
+
</picture>
|
|
58
70
|
|
|
71
|
+
### Neural Spike Train Analysis Toolbox for Python
|
|
72
|
+
|
|
73
|
+
[](https://pypi.org/project/nstat-toolbox/)
|
|
74
|
+
[](https://pypi.org/project/nstat-toolbox/)
|
|
59
75
|
[](https://github.com/cajigaslab/nSTAT-python/actions/workflows/ci.yml)
|
|
76
|
+
[](https://cajigaslab.github.io/nSTAT-python/)
|
|
77
|
+
[](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
|
|
78
|
+
[](https://doi.org/10.1016/j.jneumeth.2012.08.009)
|
|
79
|
+
|
|
80
|
+
</div>
|
|
60
81
|
|
|
61
82
|
> 📖 **New here?** Start with the
|
|
62
83
|
> [**5-minute intro**](https://cajigaslab.github.io/nSTAT-python/intro.html) —
|
|
63
84
|
> a friendly tour of the toolbox with runnable snippets, the
|
|
64
85
|
> `nstat.extras` opt-in bridges, and the paper-example gallery.
|
|
86
|
+
>
|
|
87
|
+
> 🎓 **Learning the science?** The
|
|
88
|
+
> [**Concepts & Background**](https://cajigaslab.github.io/nSTAT-python/concepts/index.html)
|
|
89
|
+
> guide teaches microelectrode recordings, the LFP, point-process GLMs,
|
|
90
|
+
> goodness-of-fit, and decoding — with figures, runnable examples, and cited
|
|
91
|
+
> literature.
|
|
65
92
|
|
|
66
93
|
`nSTAT-python` is a Python port of the [nSTAT](https://github.com/cajigaslab/nSTAT)
|
|
67
94
|
open-source neural spike train analysis toolbox. It implements a range of models and
|
|
@@ -74,7 +101,11 @@ continuous neural signals such as LFP, EEG, and ECoG.
|
|
|
74
101
|
One of nSTAT's key strengths is point-process generalized linear models for spike
|
|
75
102
|
train signals that provide a formal statistical framework for processing signals
|
|
76
103
|
recorded from ensembles of single neurons. It also has extensive support for model
|
|
77
|
-
fitting, model-order analysis, and adaptive decoding.
|
|
104
|
+
fitting, model-order analysis, and adaptive decoding. Goodness-of-fit can be
|
|
105
|
+
assessed per neuron with the time-rescaling KS test (`FitResult.computeKSStats`)
|
|
106
|
+
or jointly across a population with the multivariate marked point-process
|
|
107
|
+
time-rescaling test (`nstat.population_time_rescale`, Tao et al. 2018), which
|
|
108
|
+
catches inter-neuron coupling misfit that per-neuron tests miss.
|
|
78
109
|
|
|
79
110
|
Although created with neural signal processing in mind, nSTAT can be used as a
|
|
80
111
|
generic tool for analyzing any types of discrete and continuous signals, and thus
|
|
@@ -166,8 +197,20 @@ set_plot_style('modern')
|
|
|
166
197
|
set_plot_style('legacy')
|
|
167
198
|
```
|
|
168
199
|
|
|
169
|
-
|
|
170
|
-
|
|
200
|
+
## Documentation
|
|
201
|
+
|
|
202
|
+
Full rendered documentation is published on
|
|
203
|
+
[**GitHub Pages**](https://cajigaslab.github.io/nSTAT-python/):
|
|
204
|
+
|
|
205
|
+
| Page | What you'll find |
|
|
206
|
+
|---|---|
|
|
207
|
+
| [5-minute intro](https://cajigaslab.github.io/nSTAT-python/intro.html) | Friendly, illustrated tour with runnable snippets — start here |
|
|
208
|
+
| [**Concepts & Background**](https://cajigaslab.github.io/nSTAT-python/concepts/index.html) | Learn the neuroscience & statistics — microelectrode recordings, spikes & the LFP, point-process GLMs, goodness-of-fit, decoding, state-space/EM, and rhythmic/tremor cells & the clinical microelectrode (with the beta-band biomarker that guides adaptive DBS) — with figures and cited literature |
|
|
209
|
+
| [API reference](https://cajigaslab.github.io/nSTAT-python/api.html) | Every public symbol, auto-generated from docstrings |
|
|
210
|
+
| [Class definitions](https://cajigaslab.github.io/nSTAT-python/ClassDefinitions.html) | Method catalog for each MATLAB-faithful core class |
|
|
211
|
+
| [Paper-aligned toolbox map](https://cajigaslab.github.io/nSTAT-python/PaperOverview.html) | Crosswalk between the 2012 paper and the Python API |
|
|
212
|
+
| [`nstat.extras` summary](https://cajigaslab.github.io/nSTAT-python/extras_summary.html) | Per-bridge cards with install commands and snippets |
|
|
213
|
+
| [What's New](https://cajigaslab.github.io/nSTAT-python/whats_new.html) | Per-release change summaries |
|
|
171
214
|
|
|
172
215
|
For mathematical and programmatic details of the toolbox, see:
|
|
173
216
|
|
|
@@ -262,7 +305,8 @@ optional-dep group:
|
|
|
262
305
|
| [pykalman](https://github.com/pykalman/pykalman) | Pure-NumPy Kalman (cross-validation reference) | `nstat.extras.validation.pykalman_bridge` | `pip install nstat-toolbox[test-parity]` |
|
|
263
306
|
| [statsmodels](https://www.statsmodels.org) | Poisson GLM (IRLS — tightest cross-validation oracle, ~1e-9 agreement) | `nstat.extras.validation.statsmodels_bridge` | `pip install nstat-toolbox[test-parity]` |
|
|
264
307
|
| [PySpike](https://github.com/mariomulansky/PySpike) | ISI / SPIKE-distance spike-train metrics | `nstat.extras.metrics.spike_distances` | `pip install nstat-toolbox[metrics]` |
|
|
265
|
-
| [Dynamax](https://github.com/probml/dynamax) | EM-trained linear-Gaussian state-space models
|
|
308
|
+
| [Dynamax](https://github.com/probml/dynamax) | EM-trained linear-Gaussian / point-process / hybrid state-space models — the `KF_EM` / `PP_EM` / `mPPCO_EM` family, with held-out predictive log-likelihood and multi-restart selection | `nstat.extras.em.dynamax_bridge` | `pip install nstat-toolbox[dynamax]` (pulls JAX ~200 MB) |
|
|
309
|
+
| [replay_trajectory_classification](https://github.com/Eden-Kramer-Lab/replay_trajectory_classification) | Clusterless marked point-process decoding (no spike sorting) + trajectory-type classification — the modern descendant of nSTAT's PPAF / PPHF filters | `nstat.extras.decoding.clusterless_bridge` | `pip install nstat-toolbox[clusterless]` (pulls JAX ~200 MB) |
|
|
266
310
|
|
|
267
311
|
For ecosystem peers nstat does **not** wrap (spike sorting, calcium
|
|
268
312
|
imaging, deep-learning decoders), see
|
|
@@ -274,5 +318,6 @@ for the rationale and recommended alternatives:
|
|
|
274
318
|
- **[ssqueezepy](https://github.com/OverLordGoldDragon/ssqueezepy)** — wavelet synchrosqueezing; planned `nstat.extras.spectral`.
|
|
275
319
|
|
|
276
320
|
Install every bridge at once: `pip install nstat-toolbox[all-extras]`
|
|
277
|
-
(does **not** include `[dynamax]` due to JAX install
|
|
278
|
-
|
|
321
|
+
(does **not** include `[dynamax]` or `[clusterless]` due to JAX install
|
|
322
|
+
size — install those groups separately if you need EM-trained
|
|
323
|
+
state-space models or clusterless decoding).
|
|
@@ -83,7 +83,6 @@ tests/test_ci_extras_functional.py
|
|
|
83
83
|
tests/test_class_contracts.py
|
|
84
84
|
tests/test_class_fidelity_audit.py
|
|
85
85
|
tests/test_cleanroom_boundary.py
|
|
86
|
-
tests/test_curriculum_parity.py
|
|
87
86
|
tests/test_datasets.py
|
|
88
87
|
tests/test_decoding_algorithms_fidelity.py
|
|
89
88
|
tests/test_diff_against_matlab.py
|
|
@@ -14,7 +14,7 @@ pynapple>=0.7
|
|
|
14
14
|
pyspike>=0.8
|
|
15
15
|
nemos>=0.2
|
|
16
16
|
pykalman>=0.11
|
|
17
|
-
statsmodels>=0.
|
|
17
|
+
statsmodels>=0.14
|
|
18
18
|
nitime>=0.12
|
|
19
19
|
|
|
20
20
|
[clusterless]
|
|
@@ -54,5 +54,5 @@ pynapple>=0.7
|
|
|
54
54
|
[test-parity]
|
|
55
55
|
nemos>=0.2
|
|
56
56
|
pykalman>=0.11
|
|
57
|
-
statsmodels>=0.
|
|
57
|
+
statsmodels>=0.14
|
|
58
58
|
nitime>=0.12
|
|
@@ -4,13 +4,24 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "nstat-toolbox"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.4"
|
|
8
8
|
description = "Python port of the nSTAT toolbox"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name = "Cajigas Lab" }
|
|
13
13
|
]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 4 - Beta",
|
|
16
|
+
"Intended Audience :: Science/Research",
|
|
17
|
+
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3.10",
|
|
21
|
+
"Programming Language :: Python :: 3.11",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Topic :: Scientific/Engineering",
|
|
24
|
+
]
|
|
14
25
|
dependencies = [
|
|
15
26
|
"numpy>=1.24",
|
|
16
27
|
"scipy>=1.10",
|
|
@@ -69,10 +80,10 @@ nemos = [
|
|
|
69
80
|
"nemos>=0.2",
|
|
70
81
|
]
|
|
71
82
|
|
|
72
|
-
# Bridge to Dynamax / probml state-space models
|
|
73
|
-
# KF_EM / PP_EM / mPPCO_EM
|
|
74
|
-
# Deliberately NOT in [all-extras]
|
|
75
|
-
#
|
|
83
|
+
# Bridge to Dynamax / probml state-space models — backs the
|
|
84
|
+
# nstat.extras.em.dynamax_bridge KF_EM / PP_EM / mPPCO_EM family.
|
|
85
|
+
# Pulls JAX (~200 MB). Deliberately NOT in [all-extras] due to that
|
|
86
|
+
# install size (like [clusterless]); install explicitly when needed.
|
|
76
87
|
dynamax = [
|
|
77
88
|
"dynamax>=0.1",
|
|
78
89
|
]
|
|
@@ -82,7 +93,7 @@ dynamax = [
|
|
|
82
93
|
test-parity = [
|
|
83
94
|
"nemos>=0.2",
|
|
84
95
|
"pykalman>=0.11",
|
|
85
|
-
"statsmodels>=0.
|
|
96
|
+
"statsmodels>=0.14",
|
|
86
97
|
"nitime>=0.12",
|
|
87
98
|
]
|
|
88
99
|
|
|
@@ -95,7 +106,7 @@ clusterless = [
|
|
|
95
106
|
"replay_trajectory_classification>=1.4",
|
|
96
107
|
]
|
|
97
108
|
|
|
98
|
-
# PyTorch-based
|
|
109
|
+
# PyTorch-based decoder bridges (placeholder; deferred to a future release).
|
|
99
110
|
deep-learning = []
|
|
100
111
|
|
|
101
112
|
# Convenience: install every functional extras group at once.
|
|
@@ -110,7 +121,7 @@ all-extras = [
|
|
|
110
121
|
"pyspike>=0.8",
|
|
111
122
|
"nemos>=0.2",
|
|
112
123
|
"pykalman>=0.11",
|
|
113
|
-
"statsmodels>=0.
|
|
124
|
+
"statsmodels>=0.14",
|
|
114
125
|
"nitime>=0.12",
|
|
115
126
|
]
|
|
116
127
|
|