From 1381d8fa54adfd91ca12573aaa4c99531ff46438 Mon Sep 17 00:00:00 2001 From: Frithjof Gressmann Date: Thu, 21 Sep 2023 23:06:13 -0500 Subject: [PATCH] Fix stimulus return shape mismatch --- src/miv_simulator/clamps/network.py | 2 +- src/miv_simulator/plotting.py | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/miv_simulator/clamps/network.py b/src/miv_simulator/clamps/network.py index 75184d9..7597dfd 100644 --- a/src/miv_simulator/clamps/network.py +++ b/src/miv_simulator/clamps/network.py @@ -1427,7 +1427,7 @@ def init_rate_dist_objfun( np.isclose(target_rate_vector, 0.0, atol=1e-3, rtol=1e-3) ] = 0.0 - trj_x, trj_y, trj_d, trj_t = stimulus.read_stimulus( + trj_d, trj_t = stimulus.read_stimulus( input_features_path if input_features_path is not None else spike_events_path, diff --git a/src/miv_simulator/plotting.py b/src/miv_simulator/plotting.py index d9a0486..29492fd 100644 --- a/src/miv_simulator/plotting.py +++ b/src/miv_simulator/plotting.py @@ -882,16 +882,17 @@ def plot_spike_raster( sct = None if len(pop_spkinds) > 0: - sct = axes[i].scatter( - pop_spkts, - pop_spkinds, - s=1, - linewidths=fig_options.lw, - marker=marker, - c=pop_colors[pop_name], - alpha=0.5, - label=pop_name, - ) + for this_pop_spkts, this_pop_spkinds in zip(pop_spkts, pop_spkinds): + sct = axes[i].scatter( + this_pop_spkts, + this_pop_spkinds, + s=1, + linewidths=fig_options.lw, + marker=marker, + c=pop_colors[pop_name], + alpha=0.5, + label=pop_name, + ) axes[i].spines["top"].set_visible(False) axes[i].spines["bottom"].set_visible(False)