Skip to content

Commit

Permalink
[HOTFIX] find_outlier_trials() bug (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbara authored Nov 28, 2023
1 parent dc3c29c commit e60074b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions citation.cff
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors:
given-names: "Nicolas"
orcid: "https://orcid.org/0000-0003-1495-561X"
title: "MEEGkit"
version: 0.1.5
version: 0.1.6
doi: 10.5281/zenodo.10210992
date-released: 2023-11-27
date-released: 2023-11-28
url: "https://github.com/nbara/python-meegkit"
2 changes: 1 addition & 1 deletion meegkit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""M/EEG denoising utilities in python."""
__version__ = "0.1.5"
__version__ = "0.1.6"

from . import asr, cca, detrend, dss, lof, ress, sns, star, trca, tspca, utils

Expand Down
2 changes: 1 addition & 1 deletion meegkit/utils/denoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def find_outlier_trials(X, thresh=None, show=True):
plt.show()

thresh = thresh[1:]
if thresh:
if thresh.any():
bads, _ = find_outlier_trials(X[:, idx], thresh, show)
idx = np.setdiff1d(idx, idx[bads])

Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def test_outliers(show=False):
idx, _ = find_outlier_trials(x, 2, show=show)
np.testing.assert_array_equal(idx, np.arange(5))

idx, _ = find_outlier_trials(x, [2, 2], show=True)
idx, _ = find_outlier_trials(x, [5, 2, 2], show=True)
np.testing.assert_array_equal(idx, np.arange(5))

idx = find_outlier_samples(x, 5)
Expand Down

0 comments on commit e60074b

Please sign in to comment.