Skip to content

Burst detector #290 size cap reclassifies TRN LTS rebound as tonic (UI never shows it as a burst) #368

@JCorson

Description

@JCorson

Summary

The default-fixed burst detector's tight-cluster size cap structurally cannot represent the TRN low-threshold-spike (LTS) rebound burst. analyze_bursts_from_result (the path the Reflex UI takes for HYPERPOLARIZATION_STEPS / step-release protocols on the TRN preset) reclassifies the entire rebound as sustained tonic firing and surfaces only the short cold-start cluster. A user running the rebound protocol on TRN therefore never sees the rebound reported as a burst.

Where

patch_sim/analysis/burst_metrics.py:

  • _TIGHT_CLUSTER_MAX_ISIS: int = 7 (line 108) → effective survivor cap is spike_count <= _TIGHT_CLUSTER_MAX_ISIS + 1 = 8 spikes (lines ~456–468, the method == "default-fixed" branch).
  • Bursts with more than 8 spikes are removed from bursts and their spikes folded into unburst_spike_count. The comment there documents this as intentional (issue Burst analyzer reports 1 fake burst for tonic firing under default threshold #290): "Real LTS-style bursts top out at 7–8 spikes ... anything longer with all-short ISIs is tonic."

Why it's wrong for TRN

Empirically, on NEURON_PRESETS[TRN] with a -4 µA/cm² × 500 ms hyperpolarizing step (pre 200 ms, post 200 ms):

So the #290 cap (sized for ~3–8 spike TC/STN LTS bursts) is below the TRN rebound size, especially after the #348 h-gate retune. The cap is correct for its original purpose (preventing sustained tonic trains from being fabricated into one giant burst) but has no per-preset awareness that a 16-spike tight cluster is the biologically expected TRN rebound.

How it surfaced

During follow-up on the PR #367 code review. The PR's burst tests had been loosened to "match any detected burst with 5–15 spikes @ 200–600 Hz", which passed only because the cold-start cluster coincidentally matches that phenotype — masking the fact that the rebound is never surfaced. Those tests have since been rewritten to pin the rebound directly from the post-release spike train (tests/_rebound.py::post_release_rebound), with the detector call kept only as a pipeline smoke check. So the test suite is now honest about this, but the underlying UI/analysis behavior is unchanged: the TRN rebound is not reported as a burst in the UI.

Possible directions (not yet decided)

  • A per-preset / per-call escape hatch so LTS-rebound contexts bypass or raise the size cap (TRN rebounds legitimately run to ~16+ spikes; deeper hyperpolarizations to ~25+).
  • Distinguish "tight cluster followed by return to rest/tonic baseline" (a real terminating LTS burst) from "sustained tight train to end of trace" (true tonic) instead of using a fixed spike-count cap.
  • Document the cap as a known limitation of analyze_bursts_from_result for large LTS rebounds and surface rebound metrics through a different code path for affected presets.

Acceptance

Metadata

Metadata

Assignees

No one assigned

    Labels

    UI/UXUser interface and/or experience issuebugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions