Add post-spike repolarization (fall-time) tests to all neuron presets#364
Merged
Conversation
Guard against a post-spike Na-window plateau that mean half-width and AHP-depth metrics do not catch: assert V drops below −60 mV within 5 ms after the peak of an evoked AP (HH52 reference).
Assert V drops below −58 mV within 2 ms after the peak of an evoked AP, matching the fast Kv3-driven AHP of cortical FS interneurons (Erisir 1999; Wang & Buzsáki 1996) and guarding against a post-spike Na-window plateau.
Assert V drops below −52 mV within 5 ms after the peak of an evoked AP, matching the RS-pyramidal fast AHP (McCormick 1985; Bean 2007) and guarding against a post-spike Na-window plateau.
Assert V drops below −53 mV within 3 ms after the global voltage peak of an evoked AP riding the autonomous pacemaking, matching the fast Purkinje AHP (Raman & Bean 1999; Häusser & Clark 1997).
Assert V drops below −53 mV within 4 ms after the peak of an evoked tonic-mode AP (driven from rest, no LTS rebound), matching the TC fast AHP (McCormick & Huguenard 1992).
Assert V drops below −52 mV within 6 ms after the peak of an evoked AP, matching the CA1 Ca²⁺/IKCa-shaped AHP (Spruston & Johnston 2008; Storm 1990; Bean 2007).
Assert V drops below −53 mV within 5 ms after the global voltage peak of an evoked AP riding the autonomous pacemaking, matching the STN fast AHP (Bevan & Wilson 1999; Beurrier et al. 1999).
Assert V drops below −53 mV within 3 ms after the global voltage peak of an evoked tonic-mode AP (no prior hyperpolarization, no HP92 rebound), matching the TRN fast AHP (Huguenard & Prince 1992; Bal & McCormick 1993).
Decouple the fall-time stimulus from the repetitive-firing fixture constant so it tracks the ACTION_POTENTIAL protocol value directly, matching the other seven preset fall-time tests (PR review).
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
test_<species>_single_ap_repolarizes_cleanlyregression test to each of the 8 remaining preset test files (squid, FS interneuron, cortical pyramidal, Purkinje, thalamic relay, CA1 pyramidal, STN, TRN), mirroring the existingtest_da_single_ap_repolarizes_cleanlyreference test added in fix(presets): DA SNc pacemaking and AP shape via INaP + Mainen-Sejnowski Kv #318.ACTION_POTENTIALprotocol parameters, finds the global voltage peak, and asserts V drops below a species-appropriate threshold within a species-appropriate window — catching the post-spike Na-window plateau pathology (V parking at ~−30 mV after the spike) thatmean_half_widthandmean_ahp_depthmiss.xfailmarkers — all tests pass on the currentmain._ms_to_samplesmodule helper totest_trn.py(the only one of the 8 files that lacked it), matching the other preset test files.Closes #321
Test plan
test_squid_single_ap_repolarizes_cleanly— V < −60 mV within 5 ms after peak (10 µA/cm² × 10 ms)test_fs_single_ap_repolarizes_cleanly— V < −58 mV within 2 ms after peak (30 µA/cm² × 5 ms)test_cp_single_ap_repolarizes_cleanly— V < −52 mV within 5 ms after peak (2 µA/cm² × 15 ms)test_pk_single_ap_repolarizes_cleanly— V < −53 mV within 3 ms after peak (5 µA/cm² × 5 ms, on pacemaking)test_tc_single_ap_repolarizes_cleanly— V < −53 mV within 4 ms after peak (8 µA/cm² × 0.5 ms, tonic mode)test_ca1_single_ap_repolarizes_cleanly— V < −52 mV within 6 ms after peak (2 µA/cm² × 15 ms)test_stn_single_ap_repolarizes_cleanly— V < −53 mV within 5 ms after peak (2 µA/cm² × 5 ms, on pacemaking)test_trn_single_ap_repolarizes_cleanly— V < −53 mV within 3 ms after peak (5 µA/cm² × 2 ms, tonic mode)