API Reference

This page is auto-generated from the package source by Sphinx’s autosummary extension. Adding a name to nstat.__all__ automatically makes it appear here on the next docs build — there is no manual list to maintain.

The grouping below mirrors the categories in Class Definitions and the public-API section of AGENT_GUIDE.md. Click any symbol to jump to its rendered docstring (with parameter tables, type hints, and links to source).

Core data primitives

SignalObj(time, data[, name, xlabelval, ...])

Multi-dimensional time-series signal object (Matlab SignalObj).

Signal(time, data[, name, xlabelval, ...])

Canonical Pythonic signal abstraction for nSTAT.

Covariate(*args, **kwargs)

Canonical covariate type for model design matrices.

nspikeTrain(spikeTimes[, name, sampleRate, ...])

Point-process (spike train) object (Matlab nspikeTrain).

SpikeTrain(spikeTimes[, name, sampleRate, ...])

Canonical spike train type for point-process analyses.

Events(eventTimes[, eventLabels, eventColor])

Experimental event markers for highlighting epochs in figures.

ConfidenceInterval(time, bounds, *args[, ...])

Confidence interval for a time series or Covariate.

Collections

nstColl([trains])

MATLAB-facing spike-train collection class.

SpikeTrainCollection([trains])

Collection of aligned spike trains for ensemble analyses.

CovColl

CovariateCollection([covariates])

Ordered collection of Covariate objects (Matlab CovColl).

ConfigColl

ConfigCollection([configs])

Ordered collection of TrialConfig objects.

Experiment and configuration

Trial([spike_collection, ...])

Single-trial data container binding spikes, covariates, and events (Matlab Trial).

TrialConfig([covMask, sampleRate, history, ...])

Description of a single GLM fit configuration.

History(windowTimes[, minTime, maxTime, name])

Spike-history basis defined by a set of window boundaries.

HistoryBasis

Modeling and inference

Analysis()

Collection of static methods for GLM analysis of point-process data.

CIF([beta, Xnames, stimNames, fitType, ...])

Conditional Intensity Function for point-process modelling.

CIFModel(time, rate_hz[, name])

Conditional intensity function abstraction used by standalone workflows.

LinearCIF(beta, Xnames, stimNames[, ...])

Conditional intensity function with closed-form derivatives.

FitResult(neuralSpikeTrain, *args, **kwargs)

GLM fit results for one neuron across one or more model configs (Matlab FitResult).

FitSummary(fit_results)

Population-level summary across multiple neurons (Matlab FitResSummary).

FitResSummary(fit_results)

MATLAB-compatible alias for FitSummary.

PopulationTimeRescaleResult(ground_uniforms, ...)

Population-level (multivariate) time-rescaling GOF result.

population_time_rescale(counts_list, ...[, ...])

Multivariate (marked) time-rescaling goodness-of-fit for a population.

psth(spike_trains, bin_edges)

Compute peri-stimulus time histogram (PSTH) from multiple spike trains.

Decoding

DecodingAlgorithms()

Static-method library for neural decoding and state-space estimation.

DecoderSuite()

Canonical decoding API for the Python nSTAT package.

PoissonGLMResult(intercept, coefficients, ...)

fit_poisson_glm(x, y, *[, offset, ...])

Simulation

PointProcessSimulation(time, rate_hz, spikes)

NetworkSimulationResult(time, latent_drive, ...)

simulate_poisson_from_rate(time, rate_hz[, rng])

simulate_cif_from_stimulus(time, stimulus, ...)

Simulate a spike train from a log-linear CIF driven by a stimulus.

simulate_point_process(time, rate_hz, *[, ...])

simulate_two_neuron_network([duration_s, ...])

Standalone Python replacement for the MATLAB/Simulink 2-neuron NetworkTutorial.

run_full_paper_examples(repo_root)

Plot style

set_plot_style([style])

Persist the plotting style for future sessions.

get_plot_style([default])

Return the persisted global plotting style.

apply_plot_style([target, style])

Apply the current nSTAT plot style to a matplotlib figure or axes.

Installation and data

nstat_install(*[, rebuild_doc_search, ...])

Configure the Python package and optionally install example data.

nSTAT_Install(**kwargs)

MATLAB-style alias that delegates to nstat.install.nstat_install().

get_dataset_path(name)

list_datasets()

verify_checksums()

getPaperDataDirs(*[, download])

MATLAB-style tuple-returning alias for get_paper_data_dirs().

get_paper_data_dirs(*[, download])

Return the canonical paper-example data directories.

MATLAB bridge (optional)

is_matlab_available()

Return True if matlab.engine can be imported.

get_matlab_nstat_path()

Resolve the path to the MATLAB nSTAT repo containing .slx models.

set_matlab_nstat_path(path)

Programmatically point to the MATLAB nSTAT repo.

Exceptions and warnings

DataNotFoundError

Raised when a required dataset is missing from the local checkout.

MatlabEngineError

Raised when MATLAB Engine interaction fails.

MatlabFallbackWarning

Issued when MATLAB/Simulink is unavailable and the native Python simulation is used instead.

ParityValidationError

Raised when MATLAB/Python parity validation fails.

UnsupportedWorkflowError

Raised when a legacy workflow has not yet been ported.