Skip to content

Commit a5db2a9

Browse files
committed
move config related doc into docs folder
1 parent 88d8ae1 commit a5db2a9

File tree

4 files changed

+101
-106
lines changed

4 files changed

+101
-106
lines changed

README.md

Lines changed: 17 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,27 @@
1313
# Auditory Translational Motion
1414

1515
- [Auditory Translational Motion](#auditory-translational-motion)
16+
- [`audioLocTranslational`](#audioloctranslational)
17+
- [`setParameters`](#setparameters)
1618
- [Requirements](#requirements)
1719
- [Installation](#installation)
18-
- [Structure and function details](#structure-and-function-details)
19-
- [audioLocTranslational](#audioloctranslational)
20-
- [setParameters](#setparameters)
21-
- [Let the scanner pace the experiment](#let-the-scanner-pace-the-experiment)
22-
- [subfun/expDesign](#subfunexpdesign)
23-
- [EVENTS](#events)
24-
- [TARGETS](#targets)
25-
- [Input](#input)
26-
- [Output](#output)
2720
- [Contributors ✨](#contributors-)
2821

22+
## `audioLocTranslational`
23+
24+
Running this script will play blocks of motion/static sounds. Motion blocks will
25+
play sounds moving in one of four directions (up-, down-, left-, and right-ward)
26+
27+
By default it is run in `Debug mode` meaning that it does not care about subjID,
28+
run n., fMRI triggers, Eye Tracker, etc..
29+
30+
Any details of the experiment can be changed in `setParameters.m` (e.g.,
31+
experiment mode, motion stimuli details, exp. design, etc.)
32+
33+
### `setParameters`
34+
35+
`setParameters.m` is the core engine of the experiment. See [docs/configuration](.docs/../docs/configuration.md) for more information.
36+
2937
## Requirements
3038

3139
Make sure that the following toolboxes are installed and added to the matlab /
@@ -48,100 +56,7 @@ repository. You can install it all with git by doing.
4856
git clone --recurse-submodules https://github.com/cpp-lln-lab/localizer_auditory_motion.git
4957
```
5058

51-
## Structure and function details
52-
53-
### audioLocTranslational
54-
55-
Running this script will play blocks of motion/static sounds. Motion blocks will
56-
play sounds moving in one of four directions (up-, down-, left-, and right-ward)
57-
58-
By default it is run in `Debug mode` meaning that it does not care about subjID,
59-
run n., fMRI triggers, Eye Tracker, etc..
60-
61-
Any details of the experiment can be changed in `setParameters.m` (e.g.,
62-
experiment mode, motion stimuli details, exp. design, etc.)
63-
64-
### setParameters
65-
66-
`setParameters.m` is the core engine of the experiment. It contains the
67-
following tweakable sections:
68-
69-
- Debug mode setting
70-
- Engine parameters:
71-
- Devices parameters
72-
- Monitor parameters
73-
- Keyboard parameters
74-
- MRI parameters
75-
- Experiment Design
76-
- Timing
77-
- Auditory Stimulation
78-
- Task(s)
79-
- Instructions
80-
- Task #1 parameters
81-
82-
#### Let the scanner pace the experiment
83-
84-
Set `cfg.pacedByTriggers.do` to `true` and you can then set all the details in
85-
this `if` block
86-
87-
```matlab
88-
% Time is here in in terms of number repetition time (i.e MRI volumes)
89-
if cfg.pacedByTriggers.do
90-
91-
cfg.pacedByTriggers.quietMode = true;
92-
cfg.pacedByTriggers.nbTriggers = 1;
93-
94-
cfg.timing.eventDuration = cfg.mri.repetitionTime / 2 - 0.04; % second
95-
96-
% Time between blocs in secs
97-
cfg.timing.IBI = 0;
98-
% Time between events in secs
99-
cfg.timing.ISI = 0;
100-
% Number of seconds before the motion stimuli are presented
101-
cfg.timing.onsetDelay = 0;
102-
% Number of seconds after the end all the stimuli before ending the run
103-
cfg.timing.endDelay = 2;
104-
105-
end
106-
```
107-
108-
### subfun/expDesign
109-
110-
Creates the sequence of blocks and the events in them. The conditions are
111-
consecutive static and motion blocks (Gives better results than randomised). It
112-
can be run as a stand alone without inputs to display a visual example of a
113-
possible design.
114-
115-
#### EVENTS
116-
117-
The `numEventsPerBlock` should be a multiple of the number of "base" listed in
118-
the `motionDirections` and `staticDirections` (4 at the moment).
119-
120-
#### TARGETS
121-
122-
- If there are 2 targets per block we make sure that they are at least 2 events
123-
apart.
124-
- Targets cannot be on the first or last event of a block
125-
126-
#### Input
127-
128-
- `expParameters`: parameters returned by `setParameters`
129-
- `displayFigs`: a boolean to decide whether to show the basic design matrix of
130-
the design
131-
132-
#### Output
13359

134-
- `expParameters.designBlockNames` is a cell array `(nr_blocks, 1)` with the
135-
name for each block
136-
- `expParameters.designDirections` is an array `(nr_blocks, numEventsPerBlock)`
137-
with the direction to present in a given block
138-
- `0 90 180 270` indicate the angle
139-
- `-1` indicates static
140-
- `expParameters.designSpeeds` is an array
141-
`(nr_blocks, numEventsPerBlock) * speedEvent`
142-
- `expParameters.designFixationTargets` is an array
143-
`(nr_blocks, numEventsPerBlock)` showing for each event if it should be
144-
accompanied by a target
14560

14661
## Contributors ✨
14762

audioLocTranslational.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@
9090

9191
% we wait for a trigger every 2 events
9292
if cfg.pacedByTriggers.do && mod(iEvent, 2) == 1
93-
waitForTrigger( ...
94-
cfg, ...
93+
waitForTrigger(cfg, ...
9594
cfg.keyboard.responseBox, ...
9695
cfg.pacedByTriggers.quietMode, ...
9796
cfg.pacedByTriggers.nbTriggers);

docs/configuration.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
## Structure and function details
2+
3+
`setParameters.m` is the core engine of the experiment. It contains the
4+
following tweakable sections. See
5+
[docs/configuration](.docs/../docs/configuration.md) for more information.
6+
7+
- Debug mode setting
8+
- Engine parameters:
9+
- Devices parameters
10+
- Monitor parameters
11+
- Keyboard parameters
12+
- MRI parameters
13+
- Experiment Design
14+
- Timing
15+
- Auditory Stimulation
16+
- Task(s)
17+
- Instructions
18+
- Task #1 parameters
19+
20+
#### Let the scanner pace the experiment
21+
22+
Set `cfg.pacedByTriggers.do` to `true` and you can then set all the details in
23+
this `if` block
24+
25+
```matlab
26+
% Time is here in in terms of number repetition time (i.e MRI volumes)
27+
if cfg.pacedByTriggers.do
28+
29+
cfg.pacedByTriggers.quietMode = true;
30+
cfg.pacedByTriggers.nbTriggers = 1;
31+
32+
cfg.timing.eventDuration = cfg.mri.repetitionTime / 2 - 0.04; % second
33+
34+
% Time between blocs in secs
35+
cfg.timing.IBI = 0;
36+
% Time between events in secs
37+
cfg.timing.ISI = 0;
38+
% Number of seconds before the motion stimuli are presented
39+
cfg.timing.onsetDelay = 0;
40+
% Number of seconds after the end all the stimuli before ending the run
41+
cfg.timing.endDelay = 2;
42+
43+
end
44+
```
45+
46+
### subfun/expDesign
47+
48+
Creates the sequence of blocks and the events in them. The conditions are
49+
consecutive static and motion blocks (Gives better results than randomised). It
50+
can be run as a stand alone without inputs to display a visual example of a
51+
possible design.
52+
53+
#### EVENTS
54+
55+
The `numEventsPerBlock` should be a multiple of the number of "base" listed in
56+
the `motionDirections` and `staticDirections` (4 at the moment).
57+
58+
#### TARGETS
59+
60+
- If there are 2 targets per block we make sure that they are at least 2 events
61+
apart.
62+
- Targets cannot be on the first or last event of a block
63+
64+
#### Input
65+
66+
- `expParameters`: parameters returned by `setParameters`
67+
- `displayFigs`: a boolean to decide whether to show the basic design matrix of
68+
the design
69+
70+
#### Output
71+
72+
- `expParameters.designBlockNames` is a cell array `(nr_blocks, 1)` with the
73+
name for each block
74+
- `expParameters.designDirections` is an array `(nr_blocks, numEventsPerBlock)`
75+
with the direction to present in a given block
76+
- `0 90 180 270` indicate the angle
77+
- `-1` indicates static
78+
- `expParameters.designSpeeds` is an array
79+
`(nr_blocks, numEventsPerBlock) * speedEvent`
80+
- `expParameters.designFixationTargets` is an array
81+
`(nr_blocks, numEventsPerBlock)` showing for each event if it should be
82+
accompanied by a target

setParameters.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
% by default the data will be stored in an output folder created where the
99
% setParamters.m file is
1010
% change that if you want the data to be saved somewhere else
11-
cfg.dir.output = fullfile( ...
12-
fileparts(mfilename('fullpath')), 'output');
11+
cfg.dir.output = fullfile(fileparts(mfilename('fullpath')), 'output');
1312

1413
%% Debug mode settings
1514

0 commit comments

Comments
 (0)