fix(presets): retune TRN for in-band HP92 tonic AP shape#346
Merged
Conversation
The TRN preset previously inherited NeuronConfig's HH52 defaults (g_Na=120, g_K=36) over its HP92/Pospischil RE Na/K kinetics. This drove the mean tonic AP peak to ~+49 mV and AHP to ~-86 mV, both outside the Huguenard & Prince (1992) bands (peak +10 to +40 mV; AHP -75 to -55 mV). Same kinetic pattern as the cortical pyramidal (#298), Purkinje (#299), FSI (#301), DA (#304), STN (#305), and TC (#307) fixes. Set g_Na=50, g_K=24 as explicit somatic densities for the single- compartment reduction. Pospischil 2008 Table 2 specifies (200, 20) for RE, but at those densities the MH92 Traub-Miles kinetics still overshoot peak. (50, 24) is the smallest reduction that lands every HP92 tonic AP-shape metric inside its band while keeping the cell genuinely pacing at <15 Hz. Bump g_T down from 3.0 -> 2.85 mS/cm² (still within HP92 voltage-clamp range) in tandem. Without this tweak, the lowered g_K lets the LTS plateau drive too many spikes (>15) and the burst fragments into multiple detected bursts, breaking the strict burst_count == 1 assertion in test_trn_step_release_produces_hp92_rebound_burst. The small g_T cut shortens the plateau back into the 5-15 spike band and keeps the rebound burst coherent. Refs: - Huguenard, J.R. & Prince, D.A. (1992) J. Neurosci. 12:3804 - Pospischil et al. (2008) Biol. Cybern. 99:427, Table 2 (RE)
Both metrics now in band after the TRN g_Na/g_K/g_T retune; closes #308.
The TRN g_Na/g_K/g_T retune (closes #308) makes the cell genuinely much more excitable than the prior HH52-defaulted preset under any depolarising stimulus. Under REPETITIVE_FIRING (3 µA, 200 ms) the retuned cell now fires ~70 spikes versus the prior ~5, which drives peak somatic Ca to ~9-10 µM rather than ~3.7 µM. This is a physiologically realistic high-frequency burst-train regime in which TRN somatic Ca is known to reach ~10 µM (Cueni et al. 2008, Nat. Neurosci. 11:683 on TRN dendritic [Ca²⁺]ᵢ during LTS). Add a per-preset upper-bound override dict so the calcium calibration test still catches CalciumDynamics parameter drift without flagging the deliberate excitability gain that came with the in-band tonic AP shape. Lower alpha_ca/tau_ca to bring the absolute peak down would collapse the burst phenotype (IKCa cannot terminate the LTS plateau without sufficient Ca buildup), so the elevated Ca is the load-bearing mechanism for IKCa-driven burst termination at the literature g_KCa = 0.3. Also refresh the TRN preset's CalciumDynamics docstring to reflect the new state.
Address review feedback on PR #346: - ACTION_POTENTIAL adjustment for TRN said "5 µA × 2 ms evokes a single AP", but the retuned cell is a tonic pacemaker that fires several APs in the 22 ms window regardless of injected current. Update the comment to describe the actual behaviour. - Two places in the preset docstring claimed the spontaneous tonic rate is ~3 Hz; measured rate at the new (g_Na, g_K) is ~10 Hz (still inside the test-accepted 1-15 Hz band and the HP92 spontaneous-firing range). Refresh both occurrences and the mean V estimate. - Switch the per-preset calcium-band override from a one-sided cap (TRN: 12 µM max) to a two-sided band (TRN: [5, 12] µM). alpha_ca/tau_ca are load-bearing for IKCa-driven burst termination; a downward drift would silently break the burst phenotype, so the test should catch drift in either direction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
g_Na=50,g_K=24,g_T=2.85mS/cm²) so the spontaneous tonic AP peak (~+39 mV) and AHP (~−72 mV) land in the Huguenard & Prince (1992) bands. Previously the preset silently inherited the HH52 squid-axon defaults (g_Na=120,g_K=36) on top of the HP92/Pospischil RE Na/K kinetics, which over-drove the AP to ~+49 mV peak / ~−86 mV AHP. Same kinetic pattern as the cortical pyramidal (cortical pyramidal: AP half-width, peak, and AHP outside RS literature ranges #298), Purkinje (Purkinje: AP peak and AHP depth outside pacemaker literature ranges #299), FSI (FSI: AP peak voltage and AHP depth outside fast-spiking literature ranges #301), DA (DA: no spontaneous pacemaking; AP shape (half-width, peak, AHP) outside SNc literature ranges #304), STN (STN: no spontaneous pacemaking; tonic rate and AP half-width outside literature #305), and TC (TC: tonic AP peak voltage and AHP depth outside thalamic-relay literature #307) fixes.g_Tfrom 3.0 → 2.85 mS/cm² (still within HP92 voltage-clamp range) to keep the LTS rebound burst from fragmenting under the now-lowerg_K— preserves the strictburst_count == 1, 5–15 spike, 200–600 Hz HP92 phenotype.xfail(strict=True)markers intests/integration/test_trn.pyfortest_trn_ap_peak_voltage_in_trn_tonic_rangeandtest_trn_ap_ahp_depth_in_trn_tonic_range(closes TRN: tonic AP peak voltage and AHP depth outside HP92 literature ranges #308).tests/integration/test_calcium_calibration.pyso TRN (which now genuinely fires ~70 spikes under REPETITIVE_FIRING and reaches ~9–10 µM peak Ca, consistent with Cueni et al. 2008 on TRN [Ca²⁺]ᵢ during high-rate firing) doesn't trip the 5 µM default cap that other quieter presets share.Closes #308
Test plan
tests/integration/test_trn.pypass with the new conductancestest_trn_step_release_produces_hp92_rebound_burst) still produces a single coherent 5–15 spike burst at 200–600 Hztest_trn_hyperpolarization_steps_protocol_produces_burst_per_sweep) still works for sweeps at −5, −4, −3 µA/cm²test_preset_passive_properties_in_physiological_range), v_rest pin (test_trn_preset_vrest_is_physiological), and ICaT half-inactivation (test_trn_icat_ft_inf_at_vrest_enables_burst_firing) still pass — leak split unchangedtest_strong_stim_peak_ca_in_bandfor PURKINJE, CA1_PYRAMIDAL, STN, THALAMIC_RELAY)