Skip to content

yyang1234/VisualBraille

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

All Contributors

codecov

Build Status

fMRI localizers for visual motion

Translational Motion

Requirements

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.?

Installation

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

Structure and function details

visualLocTranslational

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

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

Let the scanner pace the experiment

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

subfun/doDotMo

Input

  • cfg: PTB/machine configurations returned by setParameters and initPTB
  • expParameters: parameters returned by setParameters
  • logFile: structure that stores the experiment logfile to be saved

Output

  • 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.

subfun/expDesign

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.

EVENTS

The numEventsPerBlock should be a multiple of the number of "base" listed in the motionDirections and staticDirections (4 at the moment).

TARGETS

  • 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

Input

  • expParameters: parameters returned by setParameters
  • displayFigs: a boolean to decide whether to show the basic design matrix of the design

Output

  • expParameters.designBlockNames is a cell array (nr_blocks, 1) with the name for each block
  • expParameters.designDirections is an array (nr_blocks, numEventsPerBlock) with the direction to present in a given block
    • 0 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

Contributors ✨

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!

About

Visual Braille localizer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 100.0%