Paper Examples — Output Gallery

Every examples/paper/*.py script registered in examples/paper/manifest.yml, with the figure outputs each produces. Auto-generated from the manifest — re-render with python tools/paper_examples/build_gallery.py.

Example 01: mEPSC Poisson Models Under Constant and Washout Magnesium

Question: Do mEPSCs follow constant vs piecewise Poisson firing under Mg2+ washout?

Fits constant and piecewise Poisson GLM baselines to mEPSC spike trains.

Run: python examples/paper/example01_mepsc_poisson.py · Script · Figures directory

Example 02: Whisker Stimulus GLM With Lag and History Selection

Question: How do explicit whisker stimulus and spike history improve thalamic GLM fits?

Fits explicit-stimulus point-process GLMs and compares baseline, stimulus, and history models.

Run: python examples/paper/example02_whisker_stimulus_thalamus.py · Script · Figures directory

Example 03: PSTH and SSGLM Dynamics Example

Question: How do PSTH and SSGLM capture within-trial and across-trial dynamics?

Bundles simulated PSTH and SSGLM examples from the canonical paper workflow.

Run: python examples/paper/example03_psth_and_ssglm.py · Script · Figures directory

Example 04: Place-Cell Receptive Fields (Gaussian vs Zernike)

Question: Which receptive-field basis (Gaussian vs Zernike) better fits place cells?

Loads place-cell datasets and compares receptive-field model families.

Run: python examples/paper/example04_place_cells_continuous_stimulus.py · Script · Figures directory

Example 05: Stimulus Decoding With PPAF and PPHF

Question: How well do adaptive/hybrid point-process filters decode stimulus and reach state?

Bundles univariate, reaching, and hybrid decoding examples from the paper workflow.

Run: python examples/paper/example05_decoding_ppaf_pphf.py · Script · Figures directory

Example 06: 2-D Place-Field Recovery With a B-Spline GLM Basis and an LGCP Comparator

Question: How does a tensor-product B-spline Poisson GLM recover a known 2-D place field, and how do its rate and second-order diagnostics compare to an LGCP?

Simulates a 2-D inhomogeneous Poisson process from a known log-Gaussian rate, recovers the rate via bspline_basis_2d + fit_poisson_glm, fits a comparator via lgcp_fit_glm, and runs pair_correlation + global_envelope with isotropic edge correction.

Run: python examples/paper/example06_place_fields_glm_basis.py · Script · Figures directory

Example 07: Spatiotemporal Wave Analysis of a Synthetic Planar-Wave Hawkes Adjacency

Question: Can the Bartlett spectrum and wave-peak detector recover the speed and direction of a known planar wave embedded in a multivariate Hawkes triggering matrix?

Constructs a synthetic planar-wave Hawkes adjacency on a grid of electrodes, computes the bartlett_spectrum, runs detect_wave_peaks, and verifies the recovered wave speed and direction against the ground-truth construction.

Run: python examples/paper/example07_spatiotemporal_hawkes_waves.py · Script · Figures directory

Example 08: Real Place-Cell Encoding-and-Decoding With Held-Out Spatial GoF

Question: Does a B-spline Poisson GLM trained on real hippocampal place cells produce a held-out spatial pair-correlation inside the inhomogeneous global-rank envelope, and a population rescaled-time ACF inside the Bartlett band?

Loads Animal 1 from the figshare paper dataset, fits a 4-cell B-spline Poisson GLM, decodes position with PPDecodeFilter on a 2-D random walk, and runs pair_correlation + global_envelope (isotropic) and rescaled_acf on the held-out half.

Run: python examples/paper/example08_real_place_cells.py · Script · Figures directory