Skip to content

Commit 40cb5f5

Browse files
Merge pull request #1 from marcobarilari/marco_add-docs
Readme doc based on the visual loc
2 parents a91db6e + 2d68d40 commit 40cb5f5

File tree

2 files changed

+95
-1
lines changed

2 files changed

+95
-1
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*DS_Store
2+
3+
*.m~
4+
*octave-workspace
5+
6+
# exclude content of logfiles folders
7+
*/logfiles/*
8+
*/*/*/logfiles/*
9+
*.tsv
10+
*.mat

README.md

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,85 @@
1-
# motion_Auditory-Localizer
1+
# Auditory Translational Motion
2+
3+
## Requirements
4+
5+
Make sure that the following toolboxes are installed and added to the matlab / octave path.
6+
7+
For instructions see the following links:
8+
9+
| Requirements | Used version |
10+
|----------------------------------------------------------|--------------|
11+
| [CPP_BIDS](https://github.com/cpp-lln-lab/CPP_BIDS) | ? |
12+
| [CPP_PTB](https://github.com/cpp-lln-lab/CPP_PTB) | ? |
13+
| [PsychToolBox](http://psychtoolbox.org/) | >=3.0.14 |
14+
| [Matlab](https://www.mathworks.com/products/matlab.html) | >=2017 |
15+
| or [octave](https://www.gnu.org/software/octave/) | >=4.? |
16+
17+
## Installing dependencies
18+
19+
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.
20+
21+
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.
22+
23+
```matlab
24+
getDependencies('update')
25+
```
26+
27+
If you already have the appropriate version but just want to add them to the matlab path, then run.
28+
29+
```matlab
30+
getDependencies()
31+
```
32+
## Structure and function details
33+
34+
35+
### visualLocTranslational
36+
37+
Running this script will play blocks of motion static sounds. Motion blocks will play sounds moving in one of four directions (up-, down-, left-, and right-ward)
38+
39+
By default it is run in `Debug mode` meaning that it does not run care about subjID, run n., fMRI triggers, Eye Tracker, etc..
40+
41+
Any details of the experiment can be changed in `setParameters.m` (e.g., experiment mode, motion stimuli details, exp. design, etc.)
42+
43+
### setParameters
44+
45+
`setParameters.m` is the core engine of the experiment. It contains the following tweakable sections:
46+
47+
- Debug mode setting
48+
- MRI settings
49+
- Engine parameters:
50+
- Monitor parameters
51+
- Monitor parameters for PsychToolBox
52+
- Keyboards
53+
- Experiment Design
54+
- Auditory Stimulation
55+
- Task(s)
56+
- Instructions
57+
- Task #1 parameters
58+
59+
### subfun/expDesign
60+
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 a possible design.
61+
62+
#### EVENTS
63+
The `numEventsPerBlock` should be a multiple of the number of "base" listed in the `motionDirections` and `staticDirections` (4 at the moment).
64+
65+
#### TARGETS:
66+
- If there are 2 targets per block we make sure that they are at least 2 events apart.
67+
- Targets cannot be on the first or last event of a block
68+
69+
#### Input:
70+
- `expParameters`: parameters returned by `setParameters`
71+
- `displayFigs`: a boolean to decide whether to show the basic design matrix of the design
72+
73+
#### Output:
74+
- `expParameters.designBlockNames` is a cell array `(nr_blocks, 1)` with the name for each block
75+
- `expParameters.designDirections` is an array `(nr_blocks, numEventsPerBlock)` 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 `(nr_blocks, numEventsPerBlock) * speedEvent`
79+
- `expParameters.designFixationTargets` is an array `(nr_blocks, numEventsPerBlock)` showing for each event if it should be accompanied by a target
80+
81+
### subfun/eyeTracker
82+
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.
83+
84+
### subfun/wait4Trigger
85+
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

Comments
 (0)