You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-34Lines changed: 52 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -29,21 +29,19 @@
29
29
30
30
# fMRI localizers for visual motion
31
31
32
-
## Translational Motion
33
-
34
32
## Requirements
35
33
36
-
Make sure that the following toolboxes are installed and added to the matlab / octave path.
34
+
Make sure that the following toolboxes are installed and added to the matlab / octave path. See the next section on how to install the submodule toolboxes.
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)
59
+
Running this script will show blocks of motion dots and static dots. Motion blocks will show dots moving in one of four directions (up-, down-, left-, and right-ward) (MT+ localizer) or dots moving inward and outward in the peripheral of the screen (MT/MST localizer).
62
60
63
-
By default it is run in `Debug mode`meaning that it does not run care about subjID, run n., fMRI triggers, Eye Tracker, etc..
61
+
Run in `Debug mode`(see `setParameters.m`) it does not care about subjID, run n., Eye Tracker (soon, at the moment it needs to be set off manually), etc..
64
62
65
63
Any details of the experiment can be changed in `setParameters.m` (e.g., experiment mode, motion stimuli details, exp. design, etc.)
66
64
@@ -85,7 +83,7 @@ Any details of the experiment can be changed in `setParameters.m` (e.g., experim
85
83
Set `cfg.pacedByTriggers.do` to `true` and you can then set all the details in this `if` block
86
84
87
85
```matlab
88
-
% Time is here in in terms of number repetition time (i.e MRI volumes)
86
+
% Time is here in terms of `repetition time (TR)` (i.e. MRI volumes)
89
87
if cfg.pacedByTriggers.do
90
88
91
89
cfg.pacedByTriggers.quietMode = true;
@@ -107,45 +105,65 @@ end
107
105
108
106
### subfun/doDotMo
109
107
108
+
Wrapper function that present the dot stimulation (static or motion) per event.
109
+
110
110
#### Input
111
111
112
-
-`cfg`: PTB/machine configurations returned by `setParameters` and `initPTB`
113
-
-`expParameters`: parameters returned by `setParameters`
112
+
-`cfg`: PTB/machine and experiment configurations returned by `setParameters` and `initPTB`
114
113
-`logFile`: structure that stores the experiment logfile to be saved
114
+
-`thisEvent`: structure that stores information about the event to present regarding the dots (static or motion, direction, etc.)
115
+
-`thisFixation`: structure that stores information about the fixation cross task to present
116
+
-`dots`: [...]
117
+
-`iEvent`: index of the event of the block at the moment of the presentation
115
118
116
119
#### Output
117
120
118
121
- Event `onset`
119
122
- Event `duration`
123
+
-`dots`: [...]
120
124
121
-
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.
125
+
> NB: 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.
122
126
123
-
### subfun/expDesign
127
+
### subfun/expDesign(MtMst)
124
128
125
-
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.
129
+
These functions, one per MT+ and one per MT/MST localizer, create the sequence of blocks and the events in them. The conditions are consecutive static and motion blocks (Gives better results than randomised).
126
130
127
-
#### EVENTS
131
+
It can be run as a stand alone without inputs and display a visual example of the possible design. See `getMockConfig` to set up the mock configuration.
128
132
129
-
The `numEventsPerBlock` should be a multiple of the number of "base" listed in the `motionDirections` and `staticDirections` (4 at the moment).
133
+
It computes the directions to display and the task(s), at the moment
134
+
1. detection of change in the color of the fixation target
135
+
2. detection of different speed of the moving dots [ W I P - if selected as a task it will give the same null output as if not selected ie no difference in speed]
130
136
131
-
#### TARGETS
137
+
#### Events
132
138
133
-
- If there are 2 targets per block we make sure that they are at least 2 events apart.
134
-
- Targets cannot be on the first or last event of a block
139
+
The ``nbEventsPerBlock`` should be a multiple of the number of motion directions requested in ``motionDirections`` (which should be more than 1) e.g.:
140
+
- MT localizer: `cfg.design.motionDirections = [ 0 90 180 270 ]; % right down left up`
-`expParameters`: parameters returned by `setParameters`
139
-
-`displayFigs`: a boolean to decide whether to show the basic design matrix of the design
145
+
- Directions:
146
+
1. Directions are all presented in random orders in `numEventsPerBlock/nDirections` consecutive chunks. This evenly distribute the directions across the block.
147
+
2. No same consecutive direction
140
148
141
-
#### Output
149
+
- Color change detection of the fixation cross:
150
+
1. If there are 2 targets per block we make sure that they are at least 2 events apart.
151
+
2. Targets cannot be on the first or last event of a block.
152
+
3. No less than 1 target per event position in the whole run
153
+
154
+
#### Input:
155
+
-`cfg`: parameters returned by setParameters
156
+
-`displayFigs`: a boolean to decide whether to show the basic design matrix of the design
142
157
143
-
-`expParameters.designBlockNames` is a cell array `(nr_blocks, 1)` with the name for each block
144
-
-`expParameters.designDirections` is an array `(nr_blocks, numEventsPerBlock)` with the direction to present in a given block
145
-
-`0 90 180 270` indicate the angle
146
-
-`-1` indicates static
147
-
-`expParameters.designSpeeds` is an array `(nr_blocks, numEventsPerBlock) * speedEvent`
148
-
-`expParameters.designFixationTargets` is an array `(nr_blocks, numEventsPerBlock)` showing for each event if it should be accompanied by a target
158
+
#### Output:
159
+
-`cfg.design.blockNames`: cell array (nbBlocks, 1) with the condition name for each block
160
+
-`cfg.design.nbBlocks`: integer for th etotal number of blocks in the run
161
+
-`cfg.design.directions`: array (nbBlocks, nbEventsPerBlock) with the direction to present in a given event of a block.
162
+
- 0 90 180 270 indicate the angle for translational motion direction
163
+
- 666 -666 indicate in/out-ward direction in radial motion
164
+
- -1 indicates static
165
+
-`cfg.design.speeds`: array (nbBlocks, nbEventsPerBlock) indicate the dots speed in each event, the target is represented by a higher/lower value
166
+
-`cfg.design.fixationTargets`: array (nbBlocks, numEventsPerBlock) showing for each event if it should be accompanied by a target
0 commit comments