File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 37
37
import matplotlib .pyplot as plt
38
38
39
39
from pyprep .prep_pipeline import PrepPipeline
40
+ from pyprep .removeTrend import removeTrend
40
41
41
42
###############################################################################
42
43
# Let's download some data for testing. Picking the 1st run of subject 4 here.
168
169
169
170
EEG_new_matlab = sio .loadmat (fname_mat2 )
170
171
EEG_new_matlab = EEG_new_matlab ["save_data" ]
171
- EEG_new = prep .EEG_new
172
+ EEG_new = removeTrend ( prep .EEG_raw , sample_rate = prep . sfreq )
172
173
EEG_new_max = np .max (abs (EEG_new ), axis = None )
173
174
EEG_new_diff = EEG_new - EEG_new_matlab
174
175
EEG_new_mse = ((EEG_new_diff / EEG_new_max ) ** 2 ).mean (axis = None )
201
202
202
203
EEG_clean_matlab = sio .loadmat (fname_mat3 )
203
204
EEG_clean_matlab = EEG_clean_matlab ["save_data" ]
204
- EEG_clean = prep .EEG
205
+ EEG_clean = prep .EEG_filtered
205
206
EEG_max = np .max (abs (EEG_clean ), axis = None )
206
207
EEG_diff = EEG_clean - EEG_clean_matlab
207
208
EEG_mse = ((EEG_diff / EEG_max ) ** 2 ).mean (axis = None )
You can’t perform that action at this time.
0 commit comments