From d760b2481b85cd2c071a6ae77e986c85f980bf5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaquier=20Aur=C3=A9lien=20Tristan?= Date: Wed, 18 Sep 2024 09:27:58 +0200 Subject: [PATCH 1/3] add global parameters Change-Id: I03867e69b2d6ee3bff527ee43106dad0038fb41c --- bluepyemodel/emodel_pipeline/plotting.py | 2 +- bluepyemodel/model/neuron_model_configuration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bluepyemodel/emodel_pipeline/plotting.py b/bluepyemodel/emodel_pipeline/plotting.py index 135b0a66..15da9dee 100644 --- a/bluepyemodel/emodel_pipeline/plotting.py +++ b/bluepyemodel/emodel_pipeline/plotting.py @@ -399,7 +399,7 @@ def thumbnail( voltage = responses[trace_name]["voltage"] except KeyError: logger.warning( - "Could not find protocol %s in respsonses. Skipping thumbnail plotting.", + "Could not find protocol %s in responses. Skipping thumbnail plotting.", trace_name, ) return None, None diff --git a/bluepyemodel/model/neuron_model_configuration.py b/bluepyemodel/model/neuron_model_configuration.py index 59de6ff3..4be3267a 100644 --- a/bluepyemodel/model/neuron_model_configuration.py +++ b/bluepyemodel/model/neuron_model_configuration.py @@ -36,7 +36,7 @@ "allact": ["apical", "basal", "somatic", "axonal"], } -global_parameters = ["v_init", "celsius", "cm", "Ra", "ena", "ek"] +global_parameters = ["v_init", "celsius", "cm", "Ra", "ena", "ek", "eca", "eh"] class NeuronModelConfiguration: From 3a60015f18649c60798b6689963dde919c179a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaquier=20Aur=C3=A9lien=20Tristan?= Date: Wed, 18 Sep 2024 09:29:06 +0200 Subject: [PATCH 2/3] turn None into nan in _get_fi_curve_from_evaluator Change-Id: If9d23eea7816bc3dbc4ddb3d2161cbec58451139 --- bluepyemodel/emodel_pipeline/plotting.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bluepyemodel/emodel_pipeline/plotting.py b/bluepyemodel/emodel_pipeline/plotting.py index 15da9dee..e5a2e190 100644 --- a/bluepyemodel/emodel_pipeline/plotting.py +++ b/bluepyemodel/emodel_pipeline/plotting.py @@ -677,6 +677,7 @@ def _get_fi_curve_from_evaluator( spike_freq_equivalent.append(1e3 * float(features["Spikecount"]) / length_step) frequencies.append(features.get("mean_frequency", None)) + frequencies = numpy.array(frequencies, dtype=float) return amps, frequencies, spike_freq_equivalent From dcad6de4c4695954f175bdfdb0df7799f9f583e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaquier=20Aur=C3=A9lien=20Tristan?= Date: Wed, 18 Sep 2024 09:46:13 +0200 Subject: [PATCH 3/3] fix in frequencies array construction in FI curve Change-Id: Ib63f81c5ceaec3d944f1bddb7115a1fb8560e75f --- bluepyemodel/emodel_pipeline/plotting.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bluepyemodel/emodel_pipeline/plotting.py b/bluepyemodel/emodel_pipeline/plotting.py index e5a2e190..66a3256e 100644 --- a/bluepyemodel/emodel_pipeline/plotting.py +++ b/bluepyemodel/emodel_pipeline/plotting.py @@ -675,7 +675,8 @@ def _get_fi_curve_from_evaluator( [efel_trace], ["Spikecount", "mean_frequency"], raise_warnings=False )[0] spike_freq_equivalent.append(1e3 * float(features["Spikecount"]) / length_step) - frequencies.append(features.get("mean_frequency", None)) + mean_freq = features.get("mean_frequency", None) + frequencies.append(mean_freq[0] if mean_freq is not None else None) frequencies = numpy.array(frequencies, dtype=float) return amps, frequencies, spike_freq_equivalent