Skip to content

Commit

Permalink
Merge pull request #1134 from dengemann/drop_log_perc
Browse files Browse the repository at this point in the history
FIX: perecentage non-ignored
  • Loading branch information
Denis A. Engemann committed Feb 16, 2014
2 parents 75a6178 + 78521da commit 0beb58d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mne/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -2644,7 +2644,8 @@ def plot_drop_log(drop_log, threshold=0, n_max_plot=20, subject='Unknown',
import matplotlib.pyplot as plt
scores = Counter([ch for d in drop_log for ch in d if ch not in ignore])
ch_names = np.array(list(scores.keys()))
perc = 100 * np.mean([len(d) > 0 for d in drop_log])
perc = 100 * np.mean([len(d) > 0 for d in drop_log
if not any([r in ignore for r in d])])
if perc < threshold or len(ch_names) == 0:
return perc
counts = 100 * np.array(list(scores.values()), dtype=float) / len(drop_log)
Expand Down

0 comments on commit 0beb58d

Please sign in to comment.