Skip to content

Re-scale TRN HYPERPOLARIZATION_STEPS to physiological depths (#370)#371

Merged
JCorson merged 5 commits into
mainfrom
issue-370-trn-hyperpol-depth
May 17, 2026
Merged

Re-scale TRN HYPERPOLARIZATION_STEPS to physiological depths (#370)#371
JCorson merged 5 commits into
mainfrom
issue-370-trn-hyperpol-depth

Conversation

@JCorson
Copy link
Copy Markdown
Owner

@JCorson JCorson commented May 17, 2026

Summary

  • Re-scale the TRN PROTOCOL_ADJUSTMENTS[HYPERPOLARIZATION_STEPS] band from -5.0 → -1.0 µA/cm² (1.0 step) to -2.0 → -0.4 µA/cm² (0.4 step). The old band drove Vm to ~-136 mV on the deepest sweep — a supra-physiological regime that maximally de-inactivates ICaT and Ih. The new band still produces 5 sweeps, with the deepest landing Vm near -106 mV, a realistic post-inhibitory rebound depth (Huguenard & Prince 1992).
  • Update the preset comment and the documented HP-step peak-Ca range (8–18 µM~6–18 µM) to match the rescaled protocol.
  • Re-baseline the hardcoded single-sweep TRN rebound tests (current_amplitude=-4.0-2.0) in test_burst_metrics_simulation.py and the trn_intra_burst_ap_result fixture in test_trn.py, which hit the same -127 mV artifact.
  • Update docstrings/comments in the multi-sweep and UI end-to-end tests to the new sweep currents and tighten the post-release spike and burst-selection bounds from 35 → 20 to pin the now-physiological HP92 5–15 spike phenotype.

The HP92 5–15 spike rebound phenotype is preserved on the three asserted deeper sweeps (15/15/11 spikes at 392/439/430 Hz; deepest sweep Vm min = -106.2 mV).

Test plan

  • TRN HYPERPOLARIZATION_STEPS protocol produces a physiological rebound burst on each deeper sweep with Vm staying above ~-110 mV
  • Single-sweep -2.0 µA/cm² step release still fires the HP92 5–15 spike LTS rebound
  • Full suite, ruff, ruff format, and ty all green (1618 passed locally)

Closes #370

JCorson added 5 commits May 17, 2026 14:18
The TRN HYPERPOLARIZATION_STEPS band (-5.0 to -1.0 uA/cm2, 1.0 step)
drove Vm to ~-136 mV on the deepest sweep, a supra-physiological
regime that maximally de-inactivates ICaT and Ih. Re-scale to
-2.0 to -0.4 uA/cm2 (0.4 step) so the deepest sweep parks Vm near
-106 mV, a realistic post-inhibitory rebound depth, while preserving
the HP92 5-15 spike rebound phenotype. Update the documented Ca
range to ~6-18 uM to match the rescaled protocol.
Change the hardcoded single-sweep rebound amplitude from -4.0 to
-2.0 uA/cm2 (which hit the same supra-physiological -127 mV depth),
update the multi-sweep test docstring/comments to the new
-2.0 to -1.2 uA/cm2 sweeps, and tighten the post-release spike
upper bound from 35 to 20 to pin the now-physiological HP92 5-15
phenotype.
Keep the trn_intra_burst_ap_result fixture in lockstep with
test_trn_step_release_produces_hp92_rebound_burst so the AP-shape
assertions apply to the same physiologically-depthed rebound burst.
Update docstring/comment current-value references to the new
-2.0 to -1.2 uA/cm2 sweeps and tighten the post-release spike
upper bound 35->20 to match the physiological HP92 phenotype.
The protocol is built via build_protocol_from_preset so it picks
up the rescaled preset override automatically.
Align the analyze_bursts rebound-burst selection filter (5-35 ->
5-20 spikes) and the frequency-assertion wording with the
post_release_rebound count assertions tightened earlier, so the
file is internally consistent at the new physiological HP band.
@JCorson JCorson merged commit ed771eb into main May 17, 2026
4 checks passed
@JCorson JCorson deleted the issue-370-trn-hyperpol-depth branch May 17, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TRN HYPERPOLARIZATION_STEPS drives Vm to supra-physiological depths (~-127 to -136 mV)

1 participant