-
Notifications
You must be signed in to change notification settings - Fork 1
/
StartConditioningExps.m
107 lines (82 loc) · 3.29 KB
/
StartConditioningExps.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
clear all; clc;
savename=input('Please type Subject ID - then press enter: ','s');
LoadConstants;
%---- Edit Here to select audio stimuli -----
%Constants.audiodir=PITCH_HUMAN;
%Constants.audiodir=RHYTHM_ELEC;
%Constants.audiodir=RHYTHM_HUMAN;
%Constants.audiodir=VOLUME;
Constants.audiodir=PITCH_ELEC;
%---- Edit Here to select movies & fixation image ----
%Constants.imagedir=ALIEN_DIRECTORY; Constants.fixpoint_img='alien';
Constants.imagedir=DINO_DIRECTORY; Constants.fixpoint_img='dino';
%Constants.imagedir=SNAIL_DIRECTORY; Constants.fixpoint_img='snail';
%Constants.imagedir=COMBO_DIRECTORY; %Constants.fixpoint_img='snail';
%--- For Training part Part 3 & Full Exp this must be defined ---
%Constants.StimulusAssignment=Constants.HiLeft_LoRight;
Constants.StimulusAssignment=Constants.HiRight_LoLeft;
%--For the full Experiment--
Constants.AudioStimulusHeldConstant=Constants.LOW;
%Constants.AudioStimulusHeldConstant=Constants.HIGH; % for PITCH - it MUST be this one - HIGH held constant so that the difficult trials are at the end and not at the start.
%load movie to keep attention
try
disp('Loading Attention Keeper Video')
attnObj=VideoReader([pwd '/STIMULI/VISUAL/' 'Pocoyo 3x00 El Show de Pocoyo.mov']);
catch ME
disp('Attention Keeper NOT loaded - Check filename & path')
ME;
end
%%%----------- Edit Here to select which part of experiment you want to run
if(Constants.UseEyeTracker)
HideCursor
end
%%%---Training Parts 1A----- Part one alternates Left & Right
Constants.numTrialEval=2; %for training how many trials to evaluate over
Constants.numTrialCorrect=2; % what number correct are needed?
Constants.LRvisible=0; %1=left, 2=right (the target is visible)
Constants.TrainHiLo=1; %1=Hi, 2=Low
Constants.savefile=[expdir 'data/' savename '.' num2str(GetSecs) '.Train1A.data.mat'];
disp('Start Training 1A')
RunExpTest_Training
%%%---Training Parts 1A-----
if(~ESC_PRESSED)
DEBUG=1; %stops racker from recalibrating between conditions
Constants.TrainHiLo=2; % 1=Hi, 2=Low
Constants.savefile=[expdir 'data/' savename '.' num2str(GetSecs) '.Train1B.data.mat'];
disp('Start Training 1B')
RunExpTest_Training
end
if(~ESC_PRESSED)
%%%---Training Parts 1B-----
Constants.TrainHiLo=1; %1=Hi, 2=Low
Constants.savefile=[expdir 'data/' savename '.' num2str(GetSecs) '.Train1C.data.mat'];
disp('Start Training 1C')
RunExpTest_Training
end
%%%---Training Parts 1C-----
if(~ESC_PRESSED)
Constants.TrainHiLo=2; % 1=Hi, 2=Low
Constants.savefile=[expdir 'data/' savename '.' num2str(GetSecs) '.Train2.data.mat'];
disp('Start Training 1D')
RunExpTest_Training
end
if(~ESC_PRESSED)
%%%---Training Parts 2-----Now we don't use animation
Constants.TrainingTrials=0;
Constants.TrainHiLo=3; %0=normal, 1=Hi, 2=Low, 3=Hi&Lo
Constants.savefile=[expdir 'data/' savename '.' num2str(GetSecs) '.Train3.data.mat'];
Constants.numTrialEval=6; %for training how Smany trials to evaluate over
Constants.numTrialCorrect=5; % what number correct are needed?
disp('Start Training 2')
RunExpTest_Training
end
if(~ESC_PRESSED)
%%%---- FULL EXPERIMENT ----
Constants.savefile=[expdir 'data/' savename '.' num2str(GetSecs) '.FullExp.data.mat'];
%no training
RunExpTest_FullExperiment
end
ShowCursor
%clean up
sca;
clear all;