From 40ec514cf5dad4e5cb5823d1459eb1264f8bd5ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaquier=20Aur=C3=A9lien=20Tristan?= Date: Tue, 5 Dec 2023 10:57:21 +0100 Subject: [PATCH 1/3] fixes in ecodes with amp2 --- bluepyefe/ecode/DeHyperPol.py | 3 ++- bluepyefe/ecode/HyperDePol.py | 2 +- bluepyefe/protocol.py | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bluepyefe/ecode/DeHyperPol.py b/bluepyefe/ecode/DeHyperPol.py index 07690dc1..e99e8f8c 100644 --- a/bluepyefe/ecode/DeHyperPol.py +++ b/bluepyefe/ecode/DeHyperPol.py @@ -89,9 +89,10 @@ def get_stimulus_parameters(self): ecode_params = { "delay": self.ton, "tmid": self.tmid, + "toff": self.toff, "amp": self.amp, "amp2": self.amp2, - "thresh_perc": self.amp_rel, + "thresh_perc": self.amp2_rel, "duration": self.toff - self.ton, "totduration": self.tend, } diff --git a/bluepyefe/ecode/HyperDePol.py b/bluepyefe/ecode/HyperDePol.py index 9777f18a..3d4a8c08 100644 --- a/bluepyefe/ecode/HyperDePol.py +++ b/bluepyefe/ecode/HyperDePol.py @@ -95,7 +95,7 @@ def get_stimulus_parameters(self): "toff": self.toff, "amp": self.amp, "amp2": self.amp2, - "thresh_perc": self.amp2_rel, + "thresh_perc": self.amp_rel, "duration": self.toff - self.ton, "totduration": self.tend, } diff --git a/bluepyefe/protocol.py b/bluepyefe/protocol.py index 30d530e5..7bb267e3 100644 --- a/bluepyefe/protocol.py +++ b/bluepyefe/protocol.py @@ -192,6 +192,9 @@ def reduce_ecode(self, ecode, operator): if key == "amp" and self.global_rheobase: amp_rel = operator([c["amp_rel"] for c in params]) mean_param = float(amp_rel) * self.global_rheobase / 100. + elif key == "amp2" and self.global_rheobase: + amp_rel2 = operator([c["amp_rel2"] for c in params]) + mean_param = float(amp_rel2) * self.global_rheobase / 100. else: mean_param = operator([numpy.nan if c[key] is None else c[key] for c in params]) From c469c4ba85b36aff6dd6c356a1171b71499e3d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaquier=20Aur=C3=A9lien=20Tristan?= Date: Tue, 5 Dec 2023 11:01:50 +0100 Subject: [PATCH 2/3] Improve docstrings of DeHyperPol, HyperDePol and sAHP --- bluepyefe/ecode/DeHyperPol.py | 3 +++ bluepyefe/ecode/HyperDePol.py | 3 +++ bluepyefe/ecode/sAHP.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/bluepyefe/ecode/DeHyperPol.py b/bluepyefe/ecode/DeHyperPol.py index e99e8f8c..be45c0f4 100644 --- a/bluepyefe/ecode/DeHyperPol.py +++ b/bluepyefe/ecode/DeHyperPol.py @@ -31,6 +31,9 @@ class DeHyperPol(Recording): """DeHyperpol current stimulus + The hyperpolarizing step is usually fixed at 150% of rheobase, and the hyperpolarizing step + can usually vary from -40% to -160% of rheobase + hypamp hypamp+amp hypamp+amp2 hypamp : : : : : _________________ : : diff --git a/bluepyefe/ecode/HyperDePol.py b/bluepyefe/ecode/HyperDePol.py index 3d4a8c08..911ad9a7 100644 --- a/bluepyefe/ecode/HyperDePol.py +++ b/bluepyefe/ecode/HyperDePol.py @@ -31,6 +31,9 @@ class HyperDePol(Recording): """HyperDepol current stimulus + The hyperpolarizing step is usually fixed at 100% of rheobase, and the hyperpolarizing step + can usually vary from -40% to -160% of rheobase. + hypamp hypamp+amp hypamp+amp2 hypamp : : : : diff --git a/bluepyefe/ecode/sAHP.py b/bluepyefe/ecode/sAHP.py index c3555b6f..9b6304b9 100644 --- a/bluepyefe/ecode/sAHP.py +++ b/bluepyefe/ecode/sAHP.py @@ -32,6 +32,9 @@ class SAHP(Recording): """sAHP current stimulus + The long step (here amp) is usually fixed at 40% of rheobase, and the short step (here amp2) + can usually vary from 150% to 300% of rheobase. + hypamp hypamp+amp hypamp+amp2 hypamp+amp hypamp : : : : : From 0051d4422b0e63fe30d9831cf6766cc7b379262d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaquier=20Aur=C3=A9lien=20Tristan?= Date: Tue, 5 Dec 2023 11:40:50 +0100 Subject: [PATCH 3/3] update output of negCheops --- bluepyefe/ecode/DeHyperPol.py | 2 +- bluepyefe/ecode/negCheops.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bluepyefe/ecode/DeHyperPol.py b/bluepyefe/ecode/DeHyperPol.py index be45c0f4..8cd542b6 100644 --- a/bluepyefe/ecode/DeHyperPol.py +++ b/bluepyefe/ecode/DeHyperPol.py @@ -32,7 +32,7 @@ class DeHyperPol(Recording): """DeHyperpol current stimulus The hyperpolarizing step is usually fixed at 150% of rheobase, and the hyperpolarizing step - can usually vary from -40% to -160% of rheobase + can usually vary from -40% to -160% of rheobase. hypamp hypamp+amp hypamp+amp2 hypamp : : : : diff --git a/bluepyefe/ecode/negCheops.py b/bluepyefe/ecode/negCheops.py index e997de53..9bef57ac 100644 --- a/bluepyefe/ecode/negCheops.py +++ b/bluepyefe/ecode/negCheops.py @@ -96,6 +96,11 @@ def get_stimulus_parameters(self): """Returns the eCode parameters""" ecode_params = { "delay": self.ton, + "t1": self.t1, + "t2": self.t2, + "t3": self.t3, + "t4": self.t4, + "toff": self.toff, "amp": self.amp, "thresh_perc": self.amp_rel, "duration": self.toff - self.ton,