API search

Every public function across the seven modules, filterable by name, module or a word from its description. The index comes from a static file; nothing is queried over the network and the full list is here without scripts.

axonforge.io#

Reading and writing recordings and spike tables.

read(path, *, fs=None, n_channels=None, dtype=None, gain_uv_per_bit=1.0, offset=0, dataset=None, chunk_s=30.0)→ Recordingsince 0.1.0

Open a recording, dispatching on the file suffix; lazily mapped, nothing read until a filter asks. details →

read_spikes(path, *, time_unit="s")→ SpikeTablesince 0.2.0

Read spike times from CSV; accepts ms and samples (samples needs fs). details →

sanity(rec)→ dictsince 0.3.0

Cheap first/last-10 s checks: saturation per channel, flat channels, comb-spectrum score, bits used. details →

concat_spikes(tables, offsets_s)→ SpikeTablesince 0.3.0

Merge spike tables from separate files by time offset; unit labels are not reconciled. details →

axonforge.filt#

Referencing, filtering and the noise estimate.

bandpass(rec, *, low=300.0, high=6000.0, order=4, zero_phase=True)→ Recordingsince 0.1.0

Butterworth in second-order sections; zero_phase doubles the effective order to eight. details →

common_median(rec, *, groups=None, exclude_bad=True)→ Recordingsince 0.1.0

Subtract the per-sample median of each channel group; grouping from the sidecar by default. details →

noise_sigma(rec, *, estimator="median", span_s=10.0)→ ndarraysince 0.2.0

Per-channel noise; default median(|x|)/0.6745, or std which is biased up by the spikes. details →

notch(rec, *, freq=50.0, q=30.0, harmonics=3)→ Recordingsince 0.5.0

Mains removal; rarely needed after a 300 Hz bandpass and worth avoiding when it is not. details →

axonforge.detect#

Threshold spike detection.

threshold(rec, *, k=4.5, polarity="neg", dead_time_ms=1.0, sigma=None, channels=None)→ SpikeTablesince 0.1.0

Crossings of k times sigma, one event per crossing per channel, with an enforced dead time. details →

dual_threshold(rec, *, k_hi=5.0, k_lo=2.5, **kw)→ SpikeTablesince 0.4.0

High threshold opens an event, return below the low one closes it; steadier on slow amplitude drift. details →

axonforge.waveform#

Waveform extraction and alignment.

extract(rec, spikes, *, pre_ms=0.5, post_ms=1.5, channels="group")→ Waveformssince 0.1.0

Cut a window around each event; channels takes the group, just one, or an explicit list. details →

align(wf, *, mode="peak", interp=True, max_shift_samples=4)→ Waveformssince 0.2.0

Align on peak, min_slope or centre_of_mass; over-shift waveforms are flagged, not dropped. details →

templates(wf, labels)→ ndarraysince 0.3.0

Mean waveform per label with its standard error, for plotting and reporting. details →

axonforge.sort#

Features, clustering and curation.

features(wf, *, n_components=3, whiten=True, per_channel=False)→ Featuressince 0.3.0

Principal components of aligned waveforms; per_channel concatenates per-channel scores. details →

cluster(feat, *, max_k=8, restarts=20, criterion="bic", covariance="full", seed=0)→ UnitSetsince 0.3.0

Gaussian mixtures for every k up to max_k, restarted; the best criterion wins. Also accepts aic. details →

UnitSet.merge(a, b)→ UnitSetsince 0.4.0

Merge two units; returns a new set and records the action in the provenance. details →

UnitSet.drop(label)→ UnitSetsince 0.4.0

Drop a unit; curation as an explicit, recorded operation rather than a GUI click. details →

axonforge.quality#

Cluster quality metrics.

isi_violations(st, *, refractory_ms=1.5, censored_ms=0.0)→ floatsince 0.6.0

Fraction of intervals shorter than the refractory period; report the period you used. details →

l_ratio(feat, labels, unit)→ floatsince 0.6.0

Mahalanobis measure of how much of the surrounding cloud leaks into the cluster. details →

isolation_distance(feat, labels, unit)→ floatsince 0.6.0

Returns nan when the cluster holds more than half of all events, which happens often. details →

presence_ratio(st, *, bin_s=60.0)→ floatsince 0.6.0

Fraction of time bins with at least one spike; catches a unit that vanishes mid-session. details →

axonforge.stats#

Interval statistics and correlograms.

isi(st, *, unit=None, log=False)→ ndarraysince 0.1.0

Interspike intervals in seconds, optionally log-spaced for histogramming. details →

cv(st)→ floatsince 0.2.0

Coefficient of variation over all intervals; sensitive to slow rate changes. details →

cv2(st)→ floatsince 0.2.0

Local coefficient of variation over adjacent interval pairs; insensitive to slow drift. details →

fano(st, *, window_s=1.0)→ floatsince 0.2.0

Variance over mean of the count in fixed windows; the window is part of the reported value. details →

autocorrelogram(st, *, bin_ms=1.0, span_ms=50.0, unit=None)→ (counts, edges)since 0.3.0

Autocorrelogram with the zero-lag bin excluded, not zeroed, so counts are usable directly. details →

bursts(st, *, max_isi_ms=6.0, min_spikes=3)→ ndarraysince 0.5.0

Interval-threshold burst detection; deliberately the simple method, no surprise statistic. details →

The index as data#

This page is generated from /api/modules.json, an object with version, module_order, module_docs and a functions array; each function carries module, name, signature, returns, summary and the since version. The prose explanations live on the API overview.