-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Authors: Daniel Strohmeier <[email protected]> | ||
# Fahimeh Mamashli <[email protected]> | ||
# Padma Sundaram <[email protected]> | ||
# Mohammad Daneshzand <[email protected]> | ||
# | ||
# License: BSD (3-clause) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
# Authors: Daniel Strohmeier <[email protected]> | ||
# Fahimeh Mamashli <[email protected]> | ||
# Padma Sundaram <[email protected]> | ||
# Mohammad Daneshzand <[email protected]> | ||
# | ||
# License: BSD (3-clause) | ||
|
||
|
@@ -59,7 +62,7 @@ def test_fix_stim_artifact(): | |
base_t2 = b_end - e_start | ||
baseline_mean = epochs.get_data()[:, :, base_t1:base_t2].mean(axis=2)[0][0] | ||
data = epochs.get_data()[:, :, tmin_samp:tmax_samp] | ||
assert data[0][0][0] == base_data | ||
assert data[0][0][0] == baseline_mean | ||
|
||
# use window before stimulus in raw | ||
event_idx = np.where(events[:, 2] == 1)[0][0] | ||
|
@@ -86,7 +89,7 @@ def test_fix_stim_artifact(): | |
baseline=baseline, mode='constant') | ||
data, times = raw[:, (tidx + tmin_samp):(tidx + tmax_samp)] | ||
baseline_mean, _ = raw[:, (tidx + b_start):(tidx + b_end)] | ||
assert data_base.mean(axis=1)[0] == data[0][0] | ||
assert baseline_mean.mean(axis=1)[0] == data[0][0] | ||
|
||
# get epochs from raw with fixed data | ||
tmin, tmax, event_id = -0.2, 0.5, 1 | ||
|
@@ -120,4 +123,4 @@ def test_fix_stim_artifact(): | |
base_t2 = int(baseline[1] * evoked.info['sfreq']) - evoked.first | ||
data = evoked.data[:, tmin_samp:tmax_samp] | ||
baseline_mean = evoked.data[:, base_t1:base_t2].mean(axis=1)[0] | ||
assert data[0][0] == data_base | ||
assert data[0][0] == baseline_mean |