Skip to content

Commit

Permalink
use elephant decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz-Alexander-Kern committed Oct 21, 2024
1 parent bd8ccfa commit 4330125
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions viziphant/unitary_event_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import string
import elephant.unitary_event_analysis as ue
from elephant.trials import Trials
from elephant.utils import trials_to_list_of_spiketrainlist
from collections import namedtuple

FigureUE = namedtuple("FigureUE", ['axes_spike_events',
Expand Down Expand Up @@ -59,7 +60,7 @@
'suptitle': None,
}


@trials_to_list_of_spiketrainlist
def plot_ue(spiketrains, Js_dict, significance_level=0.05,
**plot_params):
"""
Expand Down Expand Up @@ -191,8 +192,6 @@ def plot_ue(spiketrains, Js_dict, significance_level=0.05,
Refer to `UEA Tutorial <https://elephant.readthedocs.io/en/latest/
tutorials/unitary_event_analysis.html>`_ for real-case scenario.
"""
if isinstance(spiketrains, Trials):
spiketrains = [spiketrains.get_spiketrains_from_trial_as_list(idx) for idx in range(spiketrains.n_trials)]
n_trials = len(spiketrains)
n_neurons = len(spiketrains[0])

Expand Down

0 comments on commit 4330125

Please sign in to comment.