Skip to content

Commit

Permalink
Try fixing PREP example
Browse files Browse the repository at this point in the history
  • Loading branch information
a-hurst committed Jul 3, 2021
1 parent 7bc3a0f commit 3e67ad7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/run_full_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import matplotlib.pyplot as plt

from pyprep.prep_pipeline import PrepPipeline
from pyprep.removeTrend import removeTrend

###############################################################################
# Let's download some data for testing. Picking the 1st run of subject 4 here.
Expand Down Expand Up @@ -168,7 +169,7 @@

EEG_new_matlab = sio.loadmat(fname_mat2)
EEG_new_matlab = EEG_new_matlab["save_data"]
EEG_new = prep.EEG_new
EEG_new = removeTrend(prep.EEG_raw, sample_rate=prep.sfreq)
EEG_new_max = np.max(abs(EEG_new), axis=None)
EEG_new_diff = EEG_new - EEG_new_matlab
EEG_new_mse = ((EEG_new_diff / EEG_new_max) ** 2).mean(axis=None)
Expand Down Expand Up @@ -201,7 +202,7 @@

EEG_clean_matlab = sio.loadmat(fname_mat3)
EEG_clean_matlab = EEG_clean_matlab["save_data"]
EEG_clean = prep.EEG
EEG_clean = prep.EEG_filtered
EEG_max = np.max(abs(EEG_clean), axis=None)
EEG_diff = EEG_clean - EEG_clean_matlab
EEG_mse = ((EEG_diff / EEG_max) ** 2).mean(axis=None)
Expand Down

0 comments on commit 3e67ad7

Please sign in to comment.