diff --git a/audioLocTranslational.m b/audioLocTranslational.m index 37c329f..41a867c 100644 --- a/audioLocTranslational.m +++ b/audioLocTranslational.m @@ -44,6 +44,8 @@ % % % REFACTOR THIS FUNCTION % % % [cfg] = expDesign(cfg); + + cfg.design.blockNames % % % REFACTOR THIS FUNCTION % % % diff --git a/initEnv.m b/initEnv.m index 9ca39d8..ff9214e 100644 --- a/initEnv.m +++ b/initEnv.m @@ -15,7 +15,7 @@ function initEnv octaveVersion = '4.0.3'; - matlabVersion = '9.2.0'; + matlabVersion = '8.6.0'; if isOctave @@ -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 diff --git a/lib/CPP_PTB b/lib/CPP_PTB index 7a19e0f..ea8369a 160000 --- a/lib/CPP_PTB +++ b/lib/CPP_PTB @@ -1 +1 @@ -Subproject commit 7a19e0f1d0154ea8ecbd1fa6f2a7ba9c3bade49b +Subproject commit ea8369a359c52726ff17b8627a1b3d57c5d96075 diff --git a/setParameters.m b/setParameters.m index 73a60c2..5ea568d 100644 --- a/setParameters.m +++ b/setParameters.m @@ -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); @@ -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 @@ -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 @@ -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'}; @@ -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 = []; @@ -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; diff --git a/subfun/expDesign.m b/subfun/expDesign.m index 2afb1a9..ae39615 100644 --- a/subfun/expDesign.m +++ b/subfun/expDesign.m @@ -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);