{
"project": "axonforge",
"version": "0.7.2",
"generated": "2026-10-11",
"module_order": [
"io",
"filt",
"detect",
"waveform",
"sort",
"quality",
"stats"
],
"module_docs": {
"io": "Reading and writing recordings and spike tables.",
"filt": "Referencing, filtering and the noise estimate.",
"detect": "Threshold spike detection.",
"waveform": "Waveform extraction and alignment.",
"sort": "Features, clustering and curation.",
"quality": "Cluster quality metrics.",
"stats": "Interval statistics and correlograms."
},
"functions": [
{
"module": "io",
"name": "read",
"signature": "read(path, *, fs=None, n_channels=None, dtype=None, gain_uv_per_bit=1.0, offset=0, dataset=None, chunk_s=30.0)",
"returns": "Recording",
"summary": "Open a recording, dispatching on the file suffix; lazily mapped, nothing read until a filter asks.",
"since": "0.1.0"
},
{
"module": "io",
"name": "read_spikes",
"signature": "read_spikes(path, *, time_unit=\"s\")",
"returns": "SpikeTable",
"summary": "Read spike times from CSV; accepts ms and samples (samples needs fs).",
"since": "0.2.0"
},
{
"module": "io",
"name": "sanity",
"signature": "sanity(rec)",
"returns": "dict",
"summary": "Cheap first/last-10 s checks: saturation per channel, flat channels, comb-spectrum score, bits used.",
"since": "0.3.0"
},
{
"module": "io",
"name": "concat_spikes",
"signature": "concat_spikes(tables, offsets_s)",
"returns": "SpikeTable",
"summary": "Merge spike tables from separate files by time offset; unit labels are not reconciled.",
"since": "0.3.0"
},
{
"module": "filt",
"name": "bandpass",
"signature": "bandpass(rec, *, low=300.0, high=6000.0, order=4, zero_phase=True)",
"returns": "Recording",
"summary": "Butterworth in second-order sections; zero_phase doubles the effective order to eight.",
"since": "0.1.0"
},
{
"module": "filt",
"name": "common_median",
"signature": "common_median(rec, *, groups=None, exclude_bad=True)",
"returns": "Recording",
"summary": "Subtract the per-sample median of each channel group; grouping from the sidecar by default.",
"since": "0.1.0"
},
{
"module": "filt",
"name": "noise_sigma",
"signature": "noise_sigma(rec, *, estimator=\"median\", span_s=10.0)",
"returns": "ndarray",
"summary": "Per-channel noise; default median(|x|)/0.6745, or std which is biased up by the spikes.",
"since": "0.2.0"
},
{
"module": "filt",
"name": "notch",
"signature": "notch(rec, *, freq=50.0, q=30.0, harmonics=3)",
"returns": "Recording",
"summary": "Mains removal; rarely needed after a 300 Hz bandpass and worth avoiding when it is not.",
"since": "0.5.0"
},
{
"module": "detect",
"name": "threshold",
"signature": "threshold(rec, *, k=4.5, polarity=\"neg\", dead_time_ms=1.0, sigma=None, channels=None)",
"returns": "SpikeTable",
"summary": "Crossings of k times sigma, one event per crossing per channel, with an enforced dead time.",
"since": "0.1.0"
},
{
"module": "detect",
"name": "dual_threshold",
"signature": "dual_threshold(rec, *, k_hi=5.0, k_lo=2.5, **kw)",
"returns": "SpikeTable",
"summary": "High threshold opens an event, return below the low one closes it; steadier on slow amplitude drift.",
"since": "0.4.0"
},
{
"module": "waveform",
"name": "extract",
"signature": "extract(rec, spikes, *, pre_ms=0.5, post_ms=1.5, channels=\"group\")",
"returns": "Waveforms",
"summary": "Cut a window around each event; channels takes the group, just one, or an explicit list.",
"since": "0.1.0"
},
{
"module": "waveform",
"name": "align",
"signature": "align(wf, *, mode=\"peak\", interp=True, max_shift_samples=4)",
"returns": "Waveforms",
"summary": "Align on peak, min_slope or centre_of_mass; over-shift waveforms are flagged, not dropped.",
"since": "0.2.0"
},
{
"module": "waveform",
"name": "templates",
"signature": "templates(wf, labels)",
"returns": "ndarray",
"summary": "Mean waveform per label with its standard error, for plotting and reporting.",
"since": "0.3.0"
},
{
"module": "sort",
"name": "features",
"signature": "features(wf, *, n_components=3, whiten=True, per_channel=False)",
"returns": "Features",
"summary": "Principal components of aligned waveforms; per_channel concatenates per-channel scores.",
"since": "0.3.0"
},
{
"module": "sort",
"name": "cluster",
"signature": "cluster(feat, *, max_k=8, restarts=20, criterion=\"bic\", covariance=\"full\", seed=0)",
"returns": "UnitSet",
"summary": "Gaussian mixtures for every k up to max_k, restarted; the best criterion wins. Also accepts aic.",
"since": "0.3.0"
},
{
"module": "sort",
"name": "UnitSet.merge",
"signature": "UnitSet.merge(a, b)",
"returns": "UnitSet",
"summary": "Merge two units; returns a new set and records the action in the provenance.",
"since": "0.4.0"
},
{
"module": "sort",
"name": "UnitSet.drop",
"signature": "UnitSet.drop(label)",
"returns": "UnitSet",
"summary": "Drop a unit; curation as an explicit, recorded operation rather than a GUI click.",
"since": "0.4.0"
},
{
"module": "quality",
"name": "isi_violations",
"signature": "isi_violations(st, *, refractory_ms=1.5, censored_ms=0.0)",
"returns": "float",
"summary": "Fraction of intervals shorter than the refractory period; report the period you used.",
"since": "0.6.0"
},
{
"module": "quality",
"name": "l_ratio",
"signature": "l_ratio(feat, labels, unit)",
"returns": "float",
"summary": "Mahalanobis measure of how much of the surrounding cloud leaks into the cluster.",
"since": "0.6.0"
},
{
"module": "quality",
"name": "isolation_distance",
"signature": "isolation_distance(feat, labels, unit)",
"returns": "float",
"summary": "Returns nan when the cluster holds more than half of all events, which happens often.",
"since": "0.6.0"
},
{
"module": "quality",
"name": "presence_ratio",
"signature": "presence_ratio(st, *, bin_s=60.0)",
"returns": "float",
"summary": "Fraction of time bins with at least one spike; catches a unit that vanishes mid-session.",
"since": "0.6.0"
},
{
"module": "stats",
"name": "isi",
"signature": "isi(st, *, unit=None, log=False)",
"returns": "ndarray",
"summary": "Interspike intervals in seconds, optionally log-spaced for histogramming.",
"since": "0.1.0"
},
{
"module": "stats",
"name": "cv",
"signature": "cv(st)",
"returns": "float",
"summary": "Coefficient of variation over all intervals; sensitive to slow rate changes.",
"since": "0.2.0"
},
{
"module": "stats",
"name": "cv2",
"signature": "cv2(st)",
"returns": "float",
"summary": "Local coefficient of variation over adjacent interval pairs; insensitive to slow drift.",
"since": "0.2.0"
},
{
"module": "stats",
"name": "fano",
"signature": "fano(st, *, window_s=1.0)",
"returns": "float",
"summary": "Variance over mean of the count in fixed windows; the window is part of the reported value.",
"since": "0.2.0"
},
{
"module": "stats",
"name": "autocorrelogram",
"signature": "autocorrelogram(st, *, bin_ms=1.0, span_ms=50.0, unit=None)",
"returns": "(counts, edges)",
"summary": "Autocorrelogram with the zero-lag bin excluded, not zeroed, so counts are usable directly.",
"since": "0.3.0"
},
{
"module": "stats",
"name": "bursts",
"signature": "bursts(st, *, max_isi_ms=6.0, min_spikes=3)",
"returns": "ndarray",
"summary": "Interval-threshold burst detection; deliberately the simple method, no surprise statistic.",
"since": "0.5.0"
}
]
}
