File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 9191 cfg.task.name = ' auditory localizer' ;
9292
9393 % Instruction
94- cfg.task.instruction = ' 1-Detect the RED fixation cross\n \n\n ' ;
94+ cfg.task.instruction = [' 1 - Detect the RED fixation cross\n ' ...
95+ ' 2 - Detected the shorter repeated sounds' ];
9596
9697 % Fixation cross (in pixels)
9798 cfg.fixation.type = ' cross' ;
101102 cfg.fixation.lineWidthPix = 3 ;
102103 cfg.fixation.xDisplacement = 0 ;
103104 cfg.fixation.yDisplacement = 0 ;
104-
105+
105106 cfg.target.maxNbPerBlock = 2 ;
106107 cfg.target.duration = 0.5 ; % In secs
107108
151152
152153 cfg.mri.repetitionTime = 1.8 ;
153154
154- cfg.bids.MRI.Instructions = ' Detect the RED fixation cross' ;
155+ cfg.bids.MRI.Instructions = [' 1 - Detect the RED fixation cross\n ' ...
156+ ' 2 - Detected the shorter repeated sounds' ];
155157 cfg.bids.MRI.TaskDescription = [];
156158
157159end
Original file line number Diff line number Diff line change 7676 while 1
7777
7878 fixationTargets = zeros(NB_BLOCKS , NB_EVENTS_PER_BLOCK );
79+
80+ soundTargets = zeros(NB_BLOCKS , NB_EVENTS_PER_BLOCK );
7981
8082 for iBlock = 1 : NB_BLOCKS
8183
8284 % Set target
8385 % - if there are 2 targets per block we make sure that they are at least
8486 % 2 events apart
8587 % - targets cannot be on the first or last event of a block
86- % - no more than 2 target in the same event order
8788
89+ % Fixation targets
8890 nbTarget = numTargetsForEachBlock(iBlock );
8991
9092 chosenPosition = setTargetPositionInSequence( ...
9395 [1 NB_EVENTS_PER_BLOCK ]);
9496
9597 fixationTargets(iBlock , chosenPosition ) = 1 ;
98+
99+ % Sound targets
100+ nbTarget = numTargetsForEachBlock(iBlock );
101+
102+ chosenPosition = setTargetPositionInSequence( ...
103+ NB_EVENTS_PER_BLOCK , ...
104+ nbTarget , ...
105+ [1 NB_EVENTS_PER_BLOCK ]);
106+
107+ soundTargets(iBlock , chosenPosition ) = 1 ;
96108
97109 end
98110
99- % Check rule 3
100- if max(sum (fixationTargets )) < NB_REPETITIONS - 1
111+ % Check that fixation and shorter sound are not presented in the same event
112+ if max(unique (fixationTargets + soundTargets )) < 2
101113 break
102114 end
103115
111123 cfg = setDirections(cfg );
112124
113125 cfg.design.fixationTargets = fixationTargets ;
126+
127+ cfg.design.soundTargets = soundTargets ;
114128
115129 %% Plot
116130 diplayDesign(cfg , displayFigs );
You can’t perform that action at this time.
0 commit comments