|
1 | | -# Motion Visual-Localizer |
| 1 | +# fMRI localizers for visual motion |
2 | 2 |
|
3 | | -This repo collects the most common localizers in use to define hMT/V5 |
| 3 | +# Translational Motion |
4 | 4 |
|
5 | | -1. Radial Motion |
6 | | -2. [Translational motion](/Visual-loc_translational) (4 directions: up-, dowm-, left-, right-ward) |
| 5 | +## Requirements |
| 6 | + |
| 7 | +Make sure that the following toolboxes are installed and added to the matlab / octave path. |
| 8 | + |
| 9 | +For instructions see the following links: |
| 10 | + |
| 11 | +| Requirements | Used version | |
| 12 | +|----------------------------------------------------------|--------------| |
| 13 | +| [CPP_BIDS](https://github.com/cpp-lln-lab/CPP_BIDS) | ? | |
| 14 | +| [CPP_PTB](https://github.com/cpp-lln-lab/CPP_PTB) | ? | |
| 15 | +| [PsychToolBox](http://psychtoolbox.org/) | >=3.0.14 | |
| 16 | +| [Matlab](https://www.mathworks.com/products/matlab.html) | >=2017 | |
| 17 | +| or [octave](https://www.gnu.org/software/octave/) | >=4.? | |
| 18 | + |
| 19 | +## Installing dependencies |
| 20 | + |
| 21 | +All the dependencies needed to run this are listed in the [mpm-requirements.txt file](.mpm-requirements.txt). If those functions are not in the matlab path the scripts in this repository will not work. |
| 22 | + |
| 23 | +If you are using the [matlab package manager](https://github.com/mobeets/mpm), you can simply download the appropriate version of those dependencies and add them to your path by running the `getDependencies` function. |
| 24 | + |
| 25 | +```matlab |
| 26 | +getDependencies('update') |
| 27 | +``` |
| 28 | + |
| 29 | +If you already have the appropriate version but just want to add them to the matlab path, then run. |
| 30 | + |
| 31 | +```matlab |
| 32 | +getDependencies() |
| 33 | +``` |
| 34 | +## Structure and function details |
| 35 | + |
| 36 | +### visualLocTranslational |
| 37 | + |
| 38 | +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) |
| 39 | + |
| 40 | +By default it is run in `Debug mode` meaning that it does not run care about subjID, run n., fMRI triggers, Eye Tracker, etc.. |
| 41 | + |
| 42 | +Any details of the experiment can be changed in `setParameters.m` (e.g., experiment mode, motion stimuli details, exp. design, etc.) |
| 43 | + |
| 44 | +### setParameters |
| 45 | + |
| 46 | +`setParameters.m` is the core engine of the experiment. It contains the following tweakable sections: |
| 47 | + |
| 48 | +- Debug mode setting |
| 49 | +- MRI settings |
| 50 | +- Engine parameters: |
| 51 | + - Monitor parameters |
| 52 | + - Monitor parameters for PsychToolBox |
| 53 | +- Keyboards |
| 54 | +- Experiment Design |
| 55 | +- Visual Stimulation |
| 56 | +- Task(s) |
| 57 | + - Instructions |
| 58 | + - Task #1 parameters |
| 59 | + |
| 60 | +### subfun/doDotMo |
| 61 | + |
| 62 | +#### Input: |
| 63 | +- `cfg`: PTB/machine configurations returned by `setParameters` and `initPTB` |
| 64 | +- `expParameters`: parameters returned by `setParameters` |
| 65 | +- `logFile`: structure that stores the experiment logfile to be saved |
| 66 | + |
| 67 | +#### Output: |
| 68 | +- Event `onset` |
| 69 | +- Event `duration` |
| 70 | + |
| 71 | +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. |
| 72 | + |
| 73 | +### subfun/expDesign |
| 74 | +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. |
| 75 | + |
| 76 | +#### EVENTS |
| 77 | +The `numEventsPerBlock` should be a multiple of the number of "base" listed in the `motionDirections` and `staticDirections` (4 at the moment). |
| 78 | + |
| 79 | +#### TARGETS: |
| 80 | +- If there are 2 targets per block we make sure that they are at least 2 events apart. |
| 81 | +- Targets cannot be on the first or last event of a block |
| 82 | + |
| 83 | +#### Input: |
| 84 | +- `expParameters`: parameters returned by `setParameters` |
| 85 | +- `displayFigs`: a boolean to decide whether to show the basic design matrix of the design |
| 86 | + |
| 87 | +#### Output: |
| 88 | +- `expParameters.designBlockNames` is a cell array `(nr_blocks, 1)` with the name for each block |
| 89 | +- `expParameters.designDirections` is an array `(nr_blocks, numEventsPerBlock)` with the direction to present in a given block |
| 90 | + - `0 90 180 270` indicate the angle |
| 91 | + - `-1` indicates static |
| 92 | +- `expParameters.designSpeeds` is an array `(nr_blocks, numEventsPerBlock) * speedEvent` |
| 93 | +- `expParameters.designFixationTargets` is an array `(nr_blocks, numEventsPerBlock)` showing for each event if it should be accompanied by a target |
| 94 | + |
| 95 | +### subfun/eyeTracker |
| 96 | +Eyetracker script, still to be debugged. Will probably moved in the CPP_PTB package. It deals with the calibration (dufault or custom), eye movements recording and saving the files. |
| 97 | + |
| 98 | +### subfun/wait4Trigger |
| 99 | +Simple functions that counts the triggers sent by the MRI computer to the stimulation computer to sync brain volume recordings and stimulation. |
0 commit comments