Make sure that the following toolboxes are installed and added to the matlab / octave path.
For instructions see the following links:
Requirements | Used version |
---|---|
CPP_BIDS | ? |
CPP_PTB | ? |
PsychToolBox | >=3.0.14 |
Matlab | >=2017 |
or octave | >=4.? |
The CPP_BIDS and CPP_PTB dependencies are already set up as submodule to this repository. You can install it all with git by doing.
git clone --recurse-submodules https://github.com/cpp-lln-lab/localizer_visual_motion.git
Running this script will show blocks of motion dots (soon also moving gratings) and static dots. Motion blocks will show dots(/gratings) moving in one of four directions (up-, down-, left-, and right-ward)
By default it is run in Debug mode
meaning that it does not run care about subjID, run n., fMRI triggers, Eye Tracker, etc..
Any details of the experiment can be changed in setParameters.m
(e.g., experiment mode, motion stimuli details, exp. design, etc.)
setParameters.m
is the core engine of the experiment. It contains the following tweakable sections:
- Debug mode setting
- MRI settings
- Engine parameters:
- Monitor parameters
- Monitor parameters for PsychToolBox
- Keyboards
- Experiment Design
- Visual Stimulation
- Task(s)
- Instructions
- Task #1 parameters
Set cfg.pacedByTriggers.do
to true
and you can then set all the details in this if
block
% Time is here in in terms of number repetition time (i.e MRI volumes)
if cfg.pacedByTriggers.do
cfg.pacedByTriggers.quietMode = true;
cfg.pacedByTriggers.nbTriggers = 1;
cfg.timing.eventDuration = cfg.mri.repetitionTime / 2 - 0.04; % second
% Time between blocs in secs
cfg.timing.IBI = 0;
% Time between events in secs
cfg.timing.ISI = 0;
% Number of seconds before the motion stimuli are presented
cfg.timing.onsetDelay = 0;
% Number of seconds after the end all the stimuli before ending the run
cfg.timing.endDelay = 2;
end
cfg
: PTB/machine configurations returned bysetParameters
andinitPTB
expParameters
: parameters returned bysetParameters
logFile
: structure that stores the experiment logfile to be saved
- Event
onset
- Event
duration
The dots are drawn on a square that contains the round aperture, then any dots outside of the aperture is turned into a NaN so effectively the actual number of dots on the screen at any given time is not the one that you input but a smaller number (nDots / Area of aperture) on average.
Creates the sequence of blocks and the events in them. The conditions are consecutive static and motion blocks (Gives better results than randomised). It can be run as a stand alone without inputs to display a visual example of possible design.
The numEventsPerBlock
should be a multiple of the number of "base" listed in the motionDirections
and staticDirections
(4 at the moment).
- If there are 2 targets per block we make sure that they are at least 2 events apart.
- Targets cannot be on the first or last event of a block
expParameters
: parameters returned bysetParameters
displayFigs
: a boolean to decide whether to show the basic design matrix of the design
expParameters.designBlockNames
is a cell array(nr_blocks, 1)
with the name for each blockexpParameters.designDirections
is an array(nr_blocks, numEventsPerBlock)
with the direction to present in a given block0 90 180 270
indicate the angle-1
indicates static
expParameters.designSpeeds
is an array(nr_blocks, numEventsPerBlock) * speedEvent
expParameters.designFixationTargets
is an array(nr_blocks, numEventsPerBlock)
showing for each event if it should be accompanied by a target
Thanks goes to these wonderful people (emoji key):
Mohamed Rezk 💻 🎨 🤔 |
marcobarilari 💻 🎨 🤔 🐛 📓 👀 💬 🚇 🚧 |
Remi Gau 💻 🎨 🤔 🐛 📓 👀 💬 🚇 🚧 |
CerenB 🐛 📓 |
iqrashahzad14 💻 🤔 |
This project follows the all-contributors specification. Contributions of any kind welcome!