Commit 7793d825 authored by Julian Kosciessa's avatar Julian Kosciessa
Browse files

updates for final EEG acquision YA; timestamp 170922

parent 3ce62a9f
......@@ -14,7 +14,9 @@
**/tmp*
**/study_information
**/raw
**/old
*.mat
*.zip
*.m~
*.xlsx
*.png
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
function setup = StateSwitch_settingsTask(setup)
% settings for task eeg
setup.DEBUG = 0;
setup.opacity = .4;
setup.DEBUG = 1;
setup.opacity = 1;
setup.keyB = 1;
setup.ET.useET = 1;
setup.EEG.useEEG = 1;
setup.ET.useET = 0;
setup.EEG.useEEG = 0;
setup.EEG.DIO.parallelTrigger = 1;
setup.EEG.DIO.protocolDynamic = 1;
setup.EEG.waitTrigEnc = .005; % wait 5 ms to ensure encoding of trigger
......
......@@ -277,7 +277,7 @@ if expInfo.durPostCueFix > 0
% ######### PostFixCueOnset ########
if strcmp(expInfo.timing, 'absolute')
flipWhen = Timing.RunInitiation+(indBlock)*expInfo.durBlockOnset+(indBlock-1)*expInfo.blockLengthDim*expInfo.trialDuration.all+(indBlock-1)*expInfo.durReward+(indTrial-1)*expInfo.trialDuration.all+expInfo.trialDuration.Cue-(ifi/2);
flipWhen = Timing.RunInitiation+(indBlock)*expInfo.durBlockOnset+(indBlock-1)*expInfo.blockLengthDim*expInfo.trialDuration.all+(indBlock-1)*expInfo.durReward+(indTrial-1)*expInfo.trialDuration.all+expInfo.trialDuration.FixCue-(ifi/2);
else
flipWhen = Timing.FixCueOnset+expInfo.durFixCue-(ifi/2);
end
......
% Main script for the state switching EEG experiment (September 2017)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% enter subject ID & task variant %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
prompt = {'Enter subject ID:','Enter paradigm (dynamic/words/visual):'};
dlg_title = 'StateSwitch Input';
num_lines = 1;
defaultans = {'0000','dynamic'};
answer = inputdlg(prompt,dlg_title,num_lines,defaultans);
setup.subj = answer{1}; % task materials: 'words', 'visual', 'dynamic'
setup.task = answer{2};
disp(['Continuing with subject ',setup.subj, ' and ', setup.task, ' task version.']);
%% add required paths
if ispc
pn.root = ['C:',filesep,'Users',filesep,'eeg',filesep,'Desktop',filesep,'StateSwitchEEG',filesep,'C_Paradigm',filesep];
else
pn.root = [filesep,'Volumes',filesep,'LNDG',filesep,'stateSwitch',filesep,'B_paradigm',filesep,'StateSwitchEEG',filesep,'C_Paradigm_170922',filesep];
end
pn.CB = [pn.root, 'checker',filesep]; addpath(pn.CB);
pn.MAT = [pn.root, 'dotsx',filesep]; addpath(pn.MAT);
pn.SS = [pn.root, 'StateSwitch',filesep]; addpath(pn.SS);
pn.Stroop = [pn.root, 'Stroop',filesep]; addpath(pn.Stroop);
addpath(genpath([pn.root, 'functions',filesep]));
addpath(genpath([pn.root, 'helper',filesep]));
if ispc
addpath(['C:',filesep,'toolbox',filesep,'Psychtoolbox']); % PTB 3.0.11
else
addpath(genpath('/Users/Shared/Psychtoolbox/')); % PTB 3.0.13 (160606)
end
%% create results directory
setup.subjectsPath = [pn.root,filesep,'data',filesep, setup.subj '_' datestr(now, 'yymmdd_HHMM') filesep]; mkdir(setup.subjectsPath);
diary([setup.subjectsPath, setup.subj, '_ptbnotes_setup.txt']); version
%% set up PTB
if ispc
Screen('Preference', 'SkipSyncTests', 0);
else
Screen('Preference', 'SkipSyncTests', 1);
oldLevel = Screen('Preference', 'Verbosity', 4); % output debugging info
PsychDebugWindowConfiguration(0,0.3)
% setenv('PSYCH_ALLOW_DANGEROUS', '1');
end
%% resting state
questdlg('Ready for Resting State?', 'Rest','YES!','YES!');
setup = StateSwitch_settingsResting(setup);
StateSwitch_resting_170829(setup)
%% perform Stroop task
questdlg('Ready for Stroop?', 'Stroop','YES!','YES!');
setup = StateSwitch_settingsStroop(setup);
expInfo.StroopRun = '1';
Stroop_170907(setup, expInfo)
%% practice task
questdlg('Ready for Switch Practice?', 'Practice','YES!','YES!');
cd(pn.root);
setup = StateSwitch_settingsTaskPractice(setup);
expInfo = []; expInfo = eval(['StateSwitch_createExpInfo_',setup.task,'_170922']);
StateSwitch_practice_170922(expInfo, setup);
%% run state switching task
questdlg('Ready for Switch Task?', 'Task','YES!','YES!');
cd(pn.root);
setup = StateSwitch_settingsTask(setup);
expInfo = []; expInfo = eval(['StateSwitch_createExpInfo_',setup.task,'_170922']);
StateSwitch_experiment_170911(expInfo, setup)
%% perform second Stroop task
questdlg('Ready for Second Stroop?', 'Stroop 2','YES!','YES!');
setup = StateSwitch_settingsStroop(setup);
expInfo.StroopRun = '2';
Stroop_170907(setup, expInfo)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment