Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LNDG
Multi-Attribute-Task
Commits
7793d825
Commit
7793d825
authored
Apr 17, 2020
by
Julian Kosciessa
Browse files
updates for final EEG acquision YA; timestamp 170922
parent
3ce62a9f
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
7793d825
...
@@ -14,7 +14,9 @@
...
@@ -14,7 +14,9 @@
**/tmp*
**/tmp*
**/study_information
**/study_information
**/raw
**/raw
**/old
*.mat
*.mat
*.zip
*.m~
*.m~
*.xlsx
*.xlsx
*.png
*.png
...
...
StateSwitch/StateSwitch_createExpInfo_dynamic_170922.m
0 → 100644
View file @
7793d825
This diff is collapsed.
Click to expand it.
StateSwitch/StateSwitch_createExpInfo_dynamic_TEST_170922.m
0 → 100644
View file @
7793d825
This diff is collapsed.
Click to expand it.
StateSwitch/StateSwitch_practice_170922.m
0 → 100644
View file @
7793d825
This diff is collapsed.
Click to expand it.
StateSwitch/StateSwitch_settingsTask.m
View file @
7793d825
function
setup
=
StateSwitch_settingsTask
(
setup
)
function
setup
=
StateSwitch_settingsTask
(
setup
)
% settings for task eeg
% settings for task eeg
setup
.
DEBUG
=
0
;
setup
.
DEBUG
=
1
;
setup
.
opacity
=
.
4
;
setup
.
opacity
=
1
;
setup
.
keyB
=
1
;
setup
.
keyB
=
1
;
setup
.
ET
.
useET
=
1
;
setup
.
ET
.
useET
=
0
;
setup
.
EEG
.
useEEG
=
1
;
setup
.
EEG
.
useEEG
=
0
;
setup
.
EEG
.
DIO
.
parallelTrigger
=
1
;
setup
.
EEG
.
DIO
.
parallelTrigger
=
1
;
setup
.
EEG
.
DIO
.
protocolDynamic
=
1
;
setup
.
EEG
.
DIO
.
protocolDynamic
=
1
;
setup
.
EEG
.
waitTrigEnc
=
.
005
;
% wait 5 ms to ensure encoding of trigger
setup
.
EEG
.
waitTrigEnc
=
.
005
;
% wait 5 ms to ensure encoding of trigger
...
...
StateSwitch/StateSwitch_trialPresentation_dynamic_170911.m
View file @
7793d825
...
@@ -277,7 +277,7 @@ if expInfo.durPostCueFix > 0
...
@@ -277,7 +277,7 @@ if expInfo.durPostCueFix > 0
% ######### PostFixCueOnset ########
% ######### PostFixCueOnset ########
if
strcmp
(
expInfo
.
timing
,
'absolute'
)
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
.
Fix
Cue
-
(
ifi
/
2
);
else
else
flipWhen
=
Timing
.
FixCueOnset
+
expInfo
.
durFixCue
-
(
ifi
/
2
);
flipWhen
=
Timing
.
FixCueOnset
+
expInfo
.
durFixCue
-
(
ifi
/
2
);
end
end
...
...
TaskPipeline_v15_eeg.m
0 → 100644
View file @
7793d825
% 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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment