Skip to content

Commit 1468de8

Browse files
committed
rename and move around vars
1 parent ef063ea commit 1468de8

File tree

1 file changed

+44
-36
lines changed

1 file changed

+44
-36
lines changed

setParameters.m

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,38 @@
3232
% MRI settings
3333
cfg = setMRI(cfg);
3434

35-
cfg.audio.channels = 2;
36-
3735
%% Experiment Design
38-
cfg.names = {'static', 'motion'};
39-
cfg.possibleDirections = [-1 1]; % 1 motion , -1 static
40-
cfg.numBlocks = size(cfg.possibleDirections, 2);
41-
cfg.numRepetitions = 1; % AT THE MOMENT IT IS NOT SET IN THE MAIN SCRIPT
36+
37+
cfg.design.names = {'static', 'motion'};
38+
cfg.design.possibleDirections = [-1 1]; % 1 motion , -1 static
39+
cfg.design.numBlocks = size(cfg.possibleDirections, 2); % TO CHECK
40+
cfg.design.numRepetitions = 1; % AT THE MOMENT IT IS NOT SET IN THE MAIN SCRIPT
41+
cfg.design.nbEventsPerBlock = 12;
4242

4343
%% Timing
44-
cfg.IBI = 0; % 8;
45-
cfg.ISI = 0.1; % Time between events in secs
46-
cfg.onsetDelay = 1; % Number of seconds before the motion stimuli are presented
47-
cfg.endDelay = 1; % Number of seconds after the end all the stimuli before ending the run
44+
45+
% FOR 7T: if you want to create localizers on the fly, the following must be
46+
% multiples of the scanneryour sequence TR
47+
%
48+
% IBI
49+
% block length = (cfg.eventDuration + cfg.ISI) * cfg.design.nbEventsPerBlock
50+
51+
% Time between blocs in secs
52+
cfg.timing.IBI = 1.8 * 3; % 8;
53+
% Time between events in secs
54+
cfg.timing.ISI = 0.1;
55+
% Number of seconds before the motion stimuli are presented
56+
cfg.timing.onsetDelay = .1;
57+
% Number of seconds after the end all the stimuli before ending the run
58+
cfg.timing.endDelay = .1;
4859

4960
%% Auditory Stimulation
5061

51-
% expParameters.experimentType = 'Gratings'; %Dots/Gratings % Visual modality is in RDKs %NOT USED IN THE MAIN SCIPT
52-
cfg.speedEvent = 8; % speed in visual angles
53-
cfg.numEventsPerBlock = 12; % Number of events per block (should not be changed)
54-
cfg.eventDuration = 10;
62+
cfg.audio.channels = 2;
5563

56-
%% Task
64+
%% Task(s)
5765

58-
cfg.task.name = 'visual localizer';
66+
cfg.task.name = 'auditory localizer';
5967

6068
% Instruction
6169
cfg.task.instruction = '1-Detect the RED fixation cross\n \n\n';
@@ -76,6 +84,26 @@
7684

7785
end
7886

87+
function cfg = setMonitor(cfg)
88+
89+
% Monitor parameters for PTB
90+
cfg.color.white = [255 255 255];
91+
cfg.color.black = [0 0 0];
92+
cfg.color.red = [255 0 0];
93+
cfg.color.grey = mean([cfg.color.black; cfg.color.white]);
94+
cfg.color.background = cfg.color.black;
95+
cfg.text.color = cfg.color.white;
96+
97+
% Monitor parameters
98+
cfg.screen.monitorWidth = 50; % in cm
99+
cfg.screen.monitorDistance = 40; % distance from the screen in cm
100+
101+
if strcmpi(cfg.testingDevice, 'mri')
102+
cfg.screen.monitorWidth = 50;
103+
cfg.screen.monitorDistance = 40;
104+
end
105+
end
106+
79107
function cfg = setKeyboards(cfg)
80108
cfg.keyboard.escapeKey = 'ESCAPE';
81109
cfg.keyboard.responseKey = {'space', 't'};
@@ -99,23 +127,3 @@
99127
cfg.bids.MRI.TaskDescription = [];
100128

101129
end
102-
103-
function cfg = setMonitor(cfg)
104-
105-
% Monitor parameters for PTB
106-
cfg.color.white = [255 255 255];
107-
cfg.color.black = [0 0 0];
108-
cfg.color.red = [255 0 0];
109-
cfg.color.grey = mean([cfg.color.black; cfg.color.white]);
110-
cfg.color.background = cfg.color.black;
111-
cfg.text.color = cfg.color.white;
112-
113-
% Monitor parameters
114-
cfg.screen.monitorWidth = 50; % in cm
115-
cfg.screen.monitorDistance = 40; % distance from the screen in cm
116-
117-
if strcmpi(cfg.testingDevice, 'mri')
118-
cfg.screen.monitorWidth = 50;
119-
cfg.screen.monitorDistance = 40;
120-
end
121-
end

0 commit comments

Comments
 (0)