-
Notifications
You must be signed in to change notification settings - Fork 5
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
Nina Forde
committed
Jan 25, 2022
1 parent
7a429d0
commit 09fd53a
Showing
4 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
%Parameter=load('/udd/nforde/Nina/StageEEGpre/data/RAWformat_Test4_results/project_state.mat') | ||
restoredefaultpath; | ||
clear all; | ||
clc; %First, clean the environment | ||
|
||
addpath( '/home/nforde/Documents/StageEEGpre/dependencies/automagic-master'); | ||
|
||
|
||
addAutomagicPaths(); | ||
|
||
name = '24janv2'; | ||
dataFolder = '/home/nforde/Documents/StageEEGpre/data/formatBIDS'; | ||
resultsFolder = '/home/nforde/Documents/StageEEGpre/data/formatBIDS_24janv_results2'; | ||
ext = '.dat'; | ||
|
||
% Params= struct('FilterParams', struct('high', struct('freq', 0.1000, 'order', []),... % Default order for filtering | ||
% 'low', struct('freq', 35, 'order', [])),... | ||
% 'CRDParams', struct([]),... | ||
% 'PrepParams', struct('lineFrequencies', 50), ... | ||
% 'HighvarParams', struct('sd', 25,... | ||
% 'cutoff', 100, ... | ||
% 'rejRatio', 0.5000), ... | ||
% 'MinvarParams', struct('sd', 1),... | ||
% 'InterpolationParams', struct('method', 'spherical'), ... | ||
% 'ICLabelParams', struct([]),... | ||
% 'EEGSystem', struct('name', 'EGI',... | ||
% 'sys10_20', 0, ... | ||
% 'locFile', '', ... | ||
% 'refChan', struct('idx', []), ... | ||
% 'fileLocType', '',... | ||
% 'eogChans', [], ... | ||
% 'tobeExcludedChans', []), ... | ||
% 'Settings', struct('trackAllSteps', 1, ... | ||
% 'pathToSteps', '/allSteps.mat',... | ||
% 'colormap','Default',... | ||
% 'sortChans', 0)... | ||
% ); | ||
|
||
Params=load('/home/nforde/Documents/StageEEGpre/data/formatBIDS_24janv_results2/project_state.mat'); | ||
Params=Params.self.params; | ||
sRate= []; | ||
VisualisationParams = struct(); | ||
|
||
|
||
|
||
|
||
|
||
% Template for all the parameters | ||
|
||
|
||
|
||
project = Project(name, dataFolder, resultsFolder, ext, Params, VisualisationParams,sRate); | ||
project.preprocessAll(); | ||
%project.interpolateSelected(); |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
%dd | ||
restoredefaultpath; | ||
clear all; | ||
clc; | ||
|
||
addpath(genpath('/home/nforde/Documents/StageEEGpre/dependencies/article/MATLAB-EEG-preProcessing-master'))% pour doSegment | ||
addpath(genpath('/home/nforde/Documents/StageEEGpre/dependencies/eeglab_current/eeglab2021.1'))% pour pop rmbase | ||
|
||
|
||
dataFolder = '/home/nforde/Documents/StageEEGpre/data/formatBIDS_24janv_results2/sujets2'; | ||
cd(dataFolder) | ||
filenames = dir('allSteps_RewardProcessing*') %Compile list of all data | ||
|
||
|
||
for participant = 1:2%Cycle through participants | ||
|
||
%Get participant name information | ||
disp(['Participant: ', num2str(participant)]) %Display current participant being processed | ||
participant_number = strsplit(filenames(participant).name(1:end-4),'_') %Split filename into components | ||
participant_varname = ['segmented',participant_number{3}] %Create new file name | ||
EEG = []; %Clear past data | ||
file=load(filenames(participant).name); %Load participant output | ||
EEG=file.EEGFinal | ||
|
||
|
||
|
||
|
||
%Determine markers of interest for WAV later | ||
markers = {'S110','S111'}; %Loss, win | ||
|
||
|
||
[EEG] = doSegmentData(EEG,markers,[-500 1498]); %Segment Data (S110 = Loss, S111 = Win). The segment window of interest is -200 to 1000ms, and we here add 300 ms before and after this because time-frequency edge artifacts (this is different than the first pass because we were being more conservative then) | ||
%baseline correction | ||
EEG = pop_rmbase( EEG, [-200/1000,0]); | ||
save(participant_varname,'EEG') %Save the current output | ||
|
||
end |