Concepts & Background
This section teaches the neuroscience and statistics behind nSTAT, not just the API. It is written for students and newcomers: each page builds intuition first, then shows the matching nSTAT objects and a runnable snippet, and cites the primary literature so you can go deeper. No prior neuroscience is assumed.
Jump in by goal: I want to… fit a GLM · check a model’s fit · analyze LFP / spectra · decode a stimulus/state · model learning across trials · measure coupling between neurons · report uncertainty · avoid common mistakes · look up a term.
Every page in this track opens with a Glossary jumps box linking to the relevant entries in the glossary — direct deep-links to plain definitions of every term.
Suggested learning path
Microelectrode recordings: spikes and the LFP — what an electrode actually measures, how the broadband signal splits into spikes and the LFP, single- vs multi-unit activity, and spike sorting. The physical grounding for everything else.
Spike trains and point-process GLMs — spike trains as point processes, the conditional intensity function, and fitting it with point-process GLMs (stimulus + history + ensemble). The core encoding model.
The LFP and spectral analysis — the local field potential and the continuous-signal tools: multitaper spectra, spectrograms, and Kalman filtering (applies to LFP, EEG, ECoG).
Goodness-of-fit and decoding — the time-rescaling KS test, population goodness-of-fit, and reading the stimulus/state back out with point-process and clusterless decoders.
State-space models: learning dynamics and EM — models whose parameters change over time: the across-trial state-space GLM (SSGLM) and EM-trained latent state-space models. Where to go after the static GLM.
Network connectivity and functional coupling — how neurons influence each other (ensemble GLM terms, cross-correlograms, Granger), and why correlation is not connection.
Hands-on companions (both run on simulated data, no download):
Notebook —
examples/tutorials/Tutorial_MicroelectrodeToDecoding.ipynb: a guided tour spanning every topic above (spikes vs. LFP, spike trains, multitaper spectra, GLM fitting, goodness-of-fit, decoding), with figures.Script —
examples/tutorials/encoding_to_goodness_of_fit.py: the encoding → GLM → goodness-of-fit arc as a four-act lesson, with a correct-vs-wrong model contrast.Capstone (real data) —
examples/tutorials/place_cell_walkthrough.py: the full encode → check → decode arc on a real hippocampal place-cell recording (downloaded on first run), ending in the honest lesson that a model can decode well yet still fail goodness-of-fit.
Going further (once the core pages click):
Rhythmic firing and the clinical microelectrode — oscillatory (tremor) cells modeled as a point-process GLM with a periodic covariate, and the applied setting of a microelectrode advanced into a deep brain nucleus during DBS surgery — firing-rate localization, the beta-band field-potential biomarker, and reading the rhythm back out with the PPAF.
Uncertainty and confidence intervals — how nSTAT quantifies the uncertainty in every estimate, and why an estimate without an interval is only half an answer.
Population geometry — from single-neuron models to the low-dimensional neural manifold a population traces out.
From filters to deep learning — how nSTAT’s classical decoders connect to modern deep-learning and foundation models for neural data.
Further study — a short map of topics nSTAT does not implement, with primary references for each.
Self-check — quizzes for every topic plus cross-cutting synthesis questions.
Reference material:
Common pitfalls & FAQ — the mistakes that quietly invalidate an analysis, and how to avoid them. Skim before your first real analysis.
Glossary — plain-language definitions, each linked to the relevant nSTAT object.
Annotated bibliography — the primary sources, with a note on why each matters for nSTAT users.
How the concepts map to nSTAT

The pipeline at a glance: raw data become nSTAT objects, a Trial plus a
TrialConfig specify the model, Analysis fits it, and the resulting
FitResult feeds goodness-of-fit, model comparison, and decoding.
Concept |
nSTAT objects |
Example |
|---|---|---|
Spike trains |
|
|
Encoding GLM |
|
Paper Example 02 |
Across-trial learning (SSGLM) |
|
Paper Example 03 |
EM-trained state-space models |
|
|
Goodness-of-fit |
|
Paper Examples 01–03 |
LFP / spectra |
|
|
Decoding |
|
Paper Example 05 |
Functional coupling |
|
|
Rhythmic / tremor cells |
periodic |
|
Beta biomarker (adaptive DBS) |
|
|
Once the concepts are clear, see the Paper-aligned toolbox map for the full API crosswalk and the paper-example gallery for worked analyses with figures.