Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions audioLocTranslational.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
% % % REFACTOR THIS FUNCTION % % %

[cfg] = expDesign(cfg);

cfg.design.blockNames

% % % REFACTOR THIS FUNCTION % % %

Expand Down
4 changes: 2 additions & 2 deletions initEnv.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
function initEnv

octaveVersion = '4.0.3';
matlabVersion = '9.2.0';
matlabVersion = '8.6.0';

if isOctave

Expand Down Expand Up @@ -88,7 +88,7 @@ function addDependencies()
pth = fileparts(mfilename('fullpath'));
addpath(genpath(fullfile(pth, 'lib', 'CPP_BIDS', 'src')));
addpath(fullfile(pth, 'lib', 'CPP_PTB'));
addpath(genpath(fullfile(pth, 'lib', 'CPP_PTB', 'src')));
addpath(fullfile(pth, 'subfun'));
addpath(fullfile(pth, 'input'));

end
2 changes: 1 addition & 1 deletion lib/CPP_PTB
Submodule CPP_PTB updated 1 files
+124 −86 eyeTracker.m
37 changes: 20 additions & 17 deletions setParameters.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@

%% Debug mode settings

cfg.debug.do = true; % To test the script out of the scanner, skip PTB sync
cfg.debug.do = false; % To test the script out of the scanner, skip PTB sync
cfg.debug.smallWin = false; % To test on a part of the screen, change to 1
cfg.debug.transpWin = true; % To test with trasparent full size screen
cfg.debug.transpWin = false; % To test with trasparent full size screen

cfg.verbose = false;

%% Engine parameters

cfg.testingDevice = 'pc';
cfg.eyeTracker.do = false;
cfg.testingDevice = 'mri';
cfg.eyeTracker.do = true;
cfg.audio.do = true;

cfg = setMonitor(cfg);
Expand All @@ -37,10 +37,10 @@
% cfg.design.motionType = 'translation';
% cfg.design.motionType = 'radial';
cfg.design.motionType = 'translation';
cfg.design.names = {'static', 'motion'};
cfg.design.names = {'static'; 'motion'};
cfg.design.possibleDirections = [-1 1]; % 1 motion , -1 static %NOT IN USE AT THE MOMENT
cfg.design.nbBlocks = size(cfg.design.names, 2); % TO CHECK
cfg.design.nbRepetitions = 4; % AT THE MOMENT IT IS NOT SET IN THE MAIN SCRIPT
% cfg.design.nbBlocks = size(cfg.design.names, 2); % TO CHECK
cfg.design.nbRepetitions = 14; % AT THE MOMENT IT IS NOT SET IN THE MAIN SCRIPT
cfg.design.nbEventsPerBlock = 12;

%% Timing
Expand All @@ -52,13 +52,13 @@
% block length = (cfg.eventDuration + cfg.ISI) * cfg.design.nbEventsPerBlock

% Time between blocs in secs
cfg.timing.IBI = 1.8 * 3; % 8;
cfg.timing.IBI = 1.8; % 8;
% Time between events in secs
cfg.timing.ISI = 0.1;
cfg.timing.ISI = 0;
% Number of seconds before the motion stimuli are presented
cfg.timing.onsetDelay = .1;
% Number of seconds after the end all the stimuli before ending the run
cfg.timing.endDelay = .1;
cfg.timing.endDelay = 3.6;

%% Auditory Stimulation

Expand All @@ -75,12 +75,12 @@
cfg.fixation.type = 'cross';
cfg.fixation.colorTarget = cfg.color.red;
cfg.fixation.color = cfg.color.white;
cfg.fixation.width = 1;
cfg.fixation.lineWidthPix = 2;
cfg.fixation.width = .5;
cfg.fixation.lineWidthPix = 3;
cfg.fixation.xDisplacement = 0;
cfg.fixation.yDisplacement = 0;

cfg.target.maxNbPerBlock = 2;
cfg.target.maxNbPerBlock = 0;
cfg.target.duration = 0.5; % In secs

cfg.extraColumns = {'direction', 'speed', 'target', 'event', 'block', 'keyName'};
Expand All @@ -102,14 +102,17 @@
cfg.screen.monitorDistance = 40; % distance from the screen in cm

if strcmpi(cfg.testingDevice, 'mri')
cfg.screen.monitorWidth = 50;
cfg.screen.monitorDistance = 40;
cfg.screen.monitorWidth = 25;
cfg.screen.monitorDistance = 95;
end
end

function cfg = setKeyboards(cfg)
cfg.keyboard.escapeKey = 'ESCAPE';
cfg.keyboard.responseKey = {'space', 't'};
cfg.keyboard.responseKey = {...
'r', 'g', 'y', 'b', ...
'd', 'n', 'z', 'e', ...
't'}; %dnze rgyb
cfg.keyboard.keyboard = [];
cfg.keyboard.responseBox = [];

Expand All @@ -122,7 +125,7 @@
function cfg = setMRI(cfg)
% letter sent by the trigger to sync stimulation and volume acquisition
cfg.mri.triggerKey = 't';
cfg.mri.triggerNb = 4;
cfg.mri.triggerNb = 0;

cfg.mri.repetitionTime = 1.8;

Expand Down
9 changes: 6 additions & 3 deletions subfun/expDesign.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,16 @@
% Set variables here for a dummy test of this function
if nargin < 1 || isempty(cfg)
% cfg.design.motionType = 'translation';
cfg.design.motionType = 'radial';
cfg.design.motionType = 'translation';
cfg.design.names = {'static'; 'motion'};
cfg.design.nbRepetitions = 4;
cfg.design.nbRepetitions = 16;
cfg.design.nbEventsPerBlock = 12;
cfg.target.maxNbPerBlock = 2;
cfg.target.maxNbPerBlock = 0;
displayFigs = 1;
end

fprintf('\n\nCreating design.\n\n')


[NB_BLOCKS, NB_REPETITIONS, NB_EVENTS_PER_BLOCK, MAX_TARGET_PER_BLOCK] = getInput(cfg);
[~, STATIC_INDEX, MOTION_INDEX] = assignConditions(cfg);
Expand Down