|
1 | | -function [cfg] = expDesign(cfg, displayFigs) |
| 1 | +function [cfg] = expDesign(cfg) |
2 | 2 | % |
3 | 3 | % Creates the sequence of blocks and the events in them |
4 | 4 | % |
5 | | - % The conditions are consecutive static and motion blocks. It gives better results than |
6 | | - % randomised. |
| 5 | + % The conditions are consecutive static and motion blocks. |
| 6 | + % It gives better results than randomised. |
7 | 7 | % |
8 | 8 | % It can be run as a stand alone without inputs and display a visual example of the |
9 | 9 | % possible design. See `getMockConfig` to set up the mock configuration. |
10 | 10 | % |
11 | 11 | % It computes the directions to display and the task(s), at the moment: |
12 | 12 | % (1) detection of change in the color of the fixation target |
13 | | - % (2) detection of different speed of the moving dots [ W I P - if selected as a task it will |
14 | | - % give the same null output as if not selected ie no difference in speed ] |
| 13 | + % (2) detection of different speed of the moving dots |
| 14 | + % [ W I P - if selected as a task it will give the same null output |
| 15 | + % as if not selected ie no difference in speed ] |
15 | 16 | % |
16 | 17 | % EVENTS |
17 | 18 | % The ``nbEventsPerBlock`` should be a multiple of the number of motion directions requested in |
18 | 19 | % ``motionDirections`` (which should be more than 1) e.g.: |
| 20 | + % |
19 | 21 | % MT localizer: ``cfg.design.motionDirections = [ 0 90 180 270 ]; % right down left up`` |
20 | 22 | % MT_MST localizer: ``cfg.design.motionDirections = [666 -666]; % outward inward`` |
21 | 23 | % |
|
40 | 42 | % Output: |
41 | 43 | % - cfg.design.blockNames: cell array (nbBlocks, 1) with the condition name for each block |
42 | 44 | % - cfg.design.nbBlocks: integer for th etotal number of blocks in the run |
43 | | - % - cfg.design.directions: array (nbBlocks, nbEventsPerBlock) with the direction to present in a |
44 | | - % given event of a block. |
| 45 | + % - cfg.design.directions: array (nbBlocks, nbEventsPerBlock) with the direction |
| 46 | + % to present in a given event of a block. |
| 47 | + % - cfg.design.blockFixationPosition: [MT_MST] array (nbBlocks, 1) |
| 48 | + % with the position in the hemifiled |
| 49 | + % where to show the fixation cross |
45 | 50 | % - 0 90 180 270 indicate the angle for translational motion direction |
46 | 51 | % - 666 -666 indicate in/out-ward direction in radial motion |
47 | 52 | % - -1 indicates static |
48 | 53 | % - cfg.design.speeds: array (nbBlocks, nbEventsPerBlock) indicate the dots speed |
49 | 54 | % in each event, the target is represented by a higher/lower value |
50 | | - % - cfg.design.fixationTargets: array (nbBlocks, numEventsPerBlock) showing for each event if it |
51 | | - % should be accompanied by a target |
| 55 | + % - cfg.design.fixationTargets: array (nbBlocks, numEventsPerBlock) showing |
| 56 | + % for each event if it should be accompanied by a target |
| 57 | + % |
52 | 58 | % |
53 | 59 | % (C) Copyright 2020 CPP visual motion localizer developpers |
54 | 60 |
|
|
59 | 65 |
|
60 | 66 | if nargin < 1 || isempty(cfg) |
61 | 67 |
|
| 68 | + % make sure we got access to all the required functions and inputs |
| 69 | + run('../../initEnv.m'); |
| 70 | + |
62 | 71 | % ``true`` for MT+ translational localizer |
63 | 72 | % ``false`` for MT/MST localizer |
64 | | - isMT = true; |
| 73 | + isMT = false; |
65 | 74 |
|
66 | 75 | % Get mock inputs to run this function as a stand alone and get a flavour of how the design |
67 | 76 | % looks like given certain inputs. Open this function to set different inputs. |
|
85 | 94 | % Compute a matrix [nbBlocks x nbEventsPerBlock] |
86 | 95 | cfg.design.directions = setDirections(cfg); |
87 | 96 |
|
| 97 | + % Compute the fixation position (left/right hemifield) for MT/MST |
| 98 | + cfg.design.blockFixationPosition = setFixationPosition(cfg); |
| 99 | + |
88 | 100 | %% Task(s) design |
89 | 101 |
|
90 | 102 | % Compute a matrix [nbBlocks x nbEventsPerBlock] with |
|
0 commit comments