Skip to content

Commit 06cc39e

Browse files
committed
Merge remote-tracking branch 'cpp-lln-lab/master'
2 parents e74400a + 023447d commit 06cc39e

File tree

6 files changed

+174
-130
lines changed

6 files changed

+174
-130
lines changed

initEnv.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ function addDependencies()
8888
pth = fileparts(mfilename('fullpath'));
8989
addpath(fullfile(pth, 'lib', 'CPP_BIDS', 'src'));
9090
addpath(fullfile(pth, 'lib', 'CPP_PTB'));
91+
addpath(genpath(fullfile(pth, 'lib', 'CPP_PTB', 'src')));
9192
addpath(fullfile(pth, 'subfun'));
9293

9394
end

setParameters.m

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'output');
1212

1313
%% Debug mode settings
14-
14+
1515
cfg.debug.do = true; % To test the script out of the scanner, skip PTB sync
1616
cfg.debug.smallWin = false; % To test on a part of the screen, change to 1
1717
cfg.debug.transpWin = true; % To test with trasparent full size screen
@@ -34,23 +34,32 @@
3434

3535
%% Experiment Design
3636

37+
% cfg.design.motionType = 'translation';
38+
% cfg.design.motionType = 'radial';
39+
cfg.design.motionType = 'translation';
3740
cfg.design.names = {'static'; 'motion'};
3841
cfg.design.nbRepetitions = 4;
3942
cfg.design.nbEventsPerBlock = 12; % DO NOT CHANGE
4043

4144
%% Timing
42-
45+
46+
% FOR 7T: if you want to create localizers on the fly, the following must be
47+
% multiples of the scanneryour sequence TR
48+
%
49+
% IBI
50+
% block length = (cfg.eventDuration + cfg.ISI) * cfg.design.nbEventsPerBlock
51+
4352
% Time between blocs in secs
44-
cfg.IBI = .5; % 8;
53+
cfg.IBI = 1.8 * 3; % 8;
4554
% Time between events in secs
46-
cfg.ISI = 0.5;
55+
cfg.ISI = 0.1;
4756
% Number of seconds before the motion stimuli are presented
4857
cfg.onsetDelay = .1;
4958
% Number of seconds after the end all the stimuli before ending the run
5059
cfg.endDelay = .1;
5160

52-
cfg.eventDuration = 1; % second
53-
61+
cfg.eventDuration = 0.8; % second
62+
5463
%% Visual Stimulation
5564

5665
% Speed in visual angles / second
@@ -91,13 +100,13 @@
91100
cfg.target.maxNbPerBlock = 2;
92101
cfg.target.duration = 0.05; % In secs
93102

94-
cfg.extraColumns = {'direction', 'speed', 'target', 'event', 'block'};
95-
103+
cfg.extraColumns = {'direction', 'speed', 'target', 'event', 'block', 'keyName'};
104+
96105
end
97106

98107
function cfg = setKeyboards(cfg)
99108
cfg.keyboard.escapeKey = 'ESCAPE';
100-
cfg.keyboard.responseKey = {'space'};
109+
cfg.keyboard.responseKey = {'space', 't'};
101110
cfg.keyboard.keyboard = [];
102111
cfg.keyboard.responseBox = [];
103112

@@ -112,7 +121,7 @@
112121
cfg.mri.triggerKey = 't';
113122
cfg.mri.triggerNb = 4;
114123

115-
cfg.mri.repetitionTime = 2;
124+
cfg.mri.repetitionTime = 1.8;
116125

117126
cfg.bids.MRI.Instructions = 'Detect the RED fixation cross';
118127
cfg.bids.MRI.TaskDescription = [];

subfun/doDotMo.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
% We assumed that zero is at the top left, but we want it to be
3434
% in the center, so shift the dots up and left, which just means
3535
% adding half of the screen width in pixel to both the x and y direction.
36-
thisEvent.dot.positions = (dots.positions - cfg.screen.winWidth / 2)';
36+
thisEvent.dot.positions = (dots.positions - cfg.dot.matrixWidth / 2)';
3737

3838
%% make textures
3939
dotTexture('make', cfg, thisEvent);
@@ -46,7 +46,7 @@
4646

4747
apertureTexture('draw', cfg, thisEvent);
4848

49-
% If this frame shows a target we change the color
49+
% If this frame shows a target we change the color of the cross
5050
thisFixation.fixation = cfg.fixation;
5151
thisFixation.screen = cfg.screen;
5252
if thisEvent.target(1) && GetSecs < (onset + cfg.target.duration)

0 commit comments

Comments
 (0)