|
a |
|
b/code/preprocessing/signal_pair_prepare.m |
|
|
1 |
|
|
|
2 |
|
|
|
3 |
data_path = 'C:\EEG_EEGN\EOG_all_4514.mat';%%%%%·ΕΘλcΕΜΌ΄ΏΙ |
|
|
4 |
|
|
|
5 |
EEG_epochs_512hz = resample(EEG_epochs', 512, 500)'; |
|
|
6 |
|
|
|
7 |
%EOG_all_epochs = preprocessed_EOG; |
|
|
8 |
%% Randomly scrambled data |
|
|
9 |
|
|
|
10 |
randIndex = randperm(size(EEG_epochs_512hz,1)); |
|
|
11 |
EEG_epochs_512hz_random_4535 = EEG_epochs_512hz(randIndex,:); |
|
|
12 |
EEG_epochs_512hz_random_5598 = [EEG_epochs_512hz_random_4535(1:1063,:); EEG_epochs_512hz_random_4535]; |
|
|
13 |
EEG_epochs_512hz = EEG_epochs_512hz(1:4514,:); |
|
|
14 |
%EEG_4514_random_500hz = EEG_4514_random; |
|
|
15 |
%% Store as .Mat & .npy file |
|
|
16 |
fs = 256 |
|
|
17 |
output='C:\EEGdenoiseNet\data'; |
|
|
18 |
save([output, filesep, 'EMG_all_epochs.mat'], 'EMG_all_epochs','fs'); |
|
|
19 |
writeNPY(EEG_epochs_512hz, [output, filesep, 'EEG_all_epochs_512hz.npy']); |