Skip to content

Commit 45c9ba1

Browse files
authored
Merge pull request #127 from Remi-Gau/remi-clean_markdown
fix markdown linter
2 parents 3dccdcb + 3ca22cc commit 45c9ba1

File tree

3 files changed

+64
-22
lines changed

3 files changed

+64
-22
lines changed

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
# CPP_PTB
1515

16+
<!-- lint disable -->
17+
1618
<!-- TOC -->
1719

1820
- [CPP_PTB](#cpp_ptb)
@@ -31,6 +33,8 @@
3133

3234
<!-- /TOC -->
3335

36+
<!-- lint enable -->
37+
3438
This is the Crossmodal Perception and Plasticity lab (CPP) PsychToolBox (PTB)
3539
toolbox.
3640

@@ -44,12 +48,16 @@ octave path.
4448

4549
For instructions see the following links:
4650

51+
<!-- lint disable -->
52+
4753
| Requirements | Used version |
4854
| -------------------------------------------------------- | ------------ |
4955
| [PsychToolBox](http://psychtoolbox.org/) | >=3.0.14 |
5056
| [Matlab](https://www.mathworks.com/products/matlab.html) | >=2015b |
5157
| or [Octave](https://www.gnu.org/software/octave/) | 4.? |
5258

59+
<!-- lint enable -->
60+
5361
Tested:
5462

5563
- matlab 2015b or octave 4.2.2 and PTB 3.0.14.
@@ -154,9 +162,12 @@ git submodule foreach --recursive 'git submodule update'
154162

155163
Download the code. Unzip. And add to the matlab path.
156164

157-
Pick a specific version from [here](https://github.com/cpp-lln-lab/CPP_PTB/releases).
165+
Pick a specific version from
166+
[here](https://github.com/cpp-lln-lab/CPP_PTB/releases).
158167

159-
Or take [the latest commit](https://github.com/cpp-lln-lab/CPP_PTB/archive/master.zip) - NOT RECOMMENDED.
168+
Or take
169+
[the latest commit](https://github.com/cpp-lln-lab/CPP_PTB/archive/master.zip) -
170+
NOT RECOMMENDED.
160171

161172
### Add CPP_PTB globally to the matlab path
162173

@@ -182,6 +193,7 @@ In practice, we use the following regular expression for function names:
182193
> Regular expressions look scary but are SUPER useful to sort through filenames:
183194
>
184195
> - A quick [intro to regular expression](https://www.rexegg.com/)
196+
>
185197
> - And many websites allow you to "design and test" your regular expression:
186198
> - [regexper](https://regexper.com/#%5Ba-z%5D%2B%28%28%5BA-Z%5D%7C%5B0-9%5D%29%7B1%7D%5Ba-z%5D%2B%29)
187199
> - ...
@@ -210,8 +222,11 @@ Thanks goes to these wonderful people
210222
([emoji key](https://allcontributors.org/docs/en/emoji-key)):
211223

212224
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
225+
213226
<!-- prettier-ignore-start -->
227+
214228
<!-- markdownlint-disable -->
229+
215230
<table>
216231
<tr>
217232
<td align="center"><a href="https://remi-gau.github.io/"><img src="https://avatars3.githubusercontent.com/u/6961185?v=4" width="100px;" alt=""/><br /><sub><b>Remi Gau</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/CPP_PTB/commits?author=Remi-Gau" title="Code">💻</a> <a href="#design-Remi-Gau" title="Design">🎨</a> <a href="https://github.com/cpp-lln-lab/CPP_PTB/commits?author=Remi-Gau" title="Documentation">📖</a> <a href="https://github.com/cpp-lln-lab/CPP_PTB/issues?q=author%3ARemi-Gau" title="Bug reports">🐛</a> <a href="#userTesting-Remi-Gau" title="User Testing">📓</a> <a href="#ideas-Remi-Gau" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-Remi-Gau" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-Remi-Gau" title="Maintenance">🚧</a> <a href="https://github.com/cpp-lln-lab/CPP_PTB/commits?author=Remi-Gau" title="Tests">⚠️</a> <a href="#question-Remi-Gau" title="Answering Questions">💬</a></td>
@@ -221,6 +236,7 @@ Thanks goes to these wonderful people
221236
</table>
222237

223238
<!-- markdownlint-enable -->
239+
224240
<!-- prettier-ignore-end -->
225241

226242
<!-- ALL-CONTRIBUTORS-LIST:END -->

docs/00-index.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
# CPP_PTB documentation
22

3-
<!-- vscode-markdown-toc -->
3+
<!-- lint disable -->
44

5-
- 1. [the CFG structure](#theCFGstructure)
6-
- 2. [Setting up keyboards](#Settingupkeyboards)
7-
- 3. [functions descriptions](#functionsdescriptions)
8-
- 4. [Annexes](#Annexes)
9-
- 4.1. [Experiment template [ WIP ]](#ExperimenttemplateWIP)
10-
- 4.2. [devSandbox (stand-alone)](#devSandboxstand-alone)
5+
<!-- TOC -->
116

12-
<!-- vscode-markdown-toc-config
13-
numbering=true
14-
autoSave=true
15-
/vscode-markdown-toc-config -->
16-
<!-- /vscode-markdown-toc -->
7+
- [CPP_PTB documentation](#cpp_ptb-documentation)
8+
- [the CFG structure](#the-cfg-structure)
9+
- [Setting up keyboards](#setting-up-keyboards)
10+
- [functions descriptions](#functions-descriptions)
11+
- [Annexes](#annexes)
12+
- [Experiment template [ WIP ]](#experiment-template--wip-)
13+
- [devSandbox (stand-alone)](#devsandbox-stand-alone)
1714

18-
## 1. <a name='theCFGstructure'></a>the CFG structure
15+
<!-- /TOC -->
16+
17+
<!-- lint enable -->
18+
19+
## the CFG structure
1920

2021
The `cfg` structure is where most of the information about your experiment will
2122
be defined.
@@ -29,6 +30,7 @@ filled after running `setDefaultsPTB.m` and `initPTB.m`.
2930
that that do not "depend" on your system or that PTB cannot "know". For
3031
example the width of the screen in cm or the dimensions of the fixation
3132
cross you want to use...
33+
3234
- `initPTB.m` will fill in the fields that ARE system dependent like the
3335
screen refresh rate, the reference of the window that PTB opened and where
3436
to flip stimulus to.
@@ -160,7 +162,7 @@ cfg.software.version % psychtoolbox version
160162
cfg.software.runsOn % matlab or octave and version number
161163
```
162164

163-
## 2. <a name='Settingupkeyboards'></a>Setting up keyboards
165+
## Setting up keyboards
164166

165167
To select a specific keyboard to be used by the experimenter or the participant,
166168
you need to know the value assigned by PTB to each keyboard device.
@@ -180,6 +182,7 @@ response box in the `cfg` structure
180182
- `cfg.keyboard.responseBox` would be the device number of the device used by
181183
the participant to give his/her response: like the button box in the scanner
182184
or a separate keyboard for a behavioral experiment
185+
183186
- `cfg.keyboard.keyboard` would be the device number of the keyboard on which
184187
the experimenter will type or press the keys necessary to start or abort the
185188
experiment.
@@ -190,32 +193,33 @@ same.
190193
Using empty vectors (ie `[]`) or a negative value for those means that you will
191194
let PTB find and use the default device.
192195

193-
## 3. <a name='functionsdescriptions'></a>functions descriptions
196+
## functions descriptions
194197

195198
The main functions of the toolbox are described
196199
[here](./10-functions-description.md).
197200

198-
## 4. <a name='Annexes'></a>Annexes
201+
## Annexes
199202

200-
### 4.1. <a name='ExperimenttemplateWIP'></a>Experiment template [ WIP ]
203+
### Experiment template {WIP}
201204

202205
Will be moved to a different repository
203206

204-
### 4.2. <a name='devSandboxstand-alone'></a>devSandbox (stand-alone)
207+
### devSandbox (stand-alone)
205208

206-
Will be moved to a different repository
209+
Will be moved to a different repository.
207210

208211
This script is a stand-alone function that can be useful as a sandbox to develop
209212
the PTB audio/visual stimulation of your experiment. No input/output required.
210213

211-
Here, a tutorial from https://peterscarfe.com/contrastgratingdemo.html is
214+
Here, [a tutorial](https://peterscarfe.com/contrastgratingdemo.html) is
212215
provided for illustrative purpose (notice that some variable names are updated
213216
to our code style). For your use, you will delete that part.
214217

215218
It is composed of two parts:
216219

217220
- a fixed structure that will initialize and close PTB in 'debug mode'
218221
(`PsychDebugWindowConfiguration`, `SkipSyncTests`)
222+
219223
- the actual sandbox where to set your dynamic variables (the stimulation
220224
parameters) and the 'playground' where to develop the stimulation code
221225

docs/10-functions-description.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# functions description
22

3+
<!-- lint disable -->
4+
35
<!-- TOC -->
46

57
- [functions description](#functions-description)
@@ -31,6 +33,8 @@
3133

3234
<!-- /TOC -->
3335

36+
<!-- lint enable -->
37+
3438
## General functions
3539

3640
### initPTB
@@ -41,17 +45,24 @@ It is pretty much necessary to use this function to set up the stage for using
4145
any other functions of CPP_PTB.
4246

4347
- checks OS and PTB version
48+
4449
- set some defaults
50+
4551
- set the screen details
4652
- the window opened takes the whole screen by default
4753
- set in debug mode with window transparency if necessary
4854
- can skip synch test if you ask for it (nicely)
4955
- gets the flip interval
5056
- computes the pixel per degree of visual angle
57+
5158
- set fixation cross details
59+
5260
- set font details
61+
5362
- keyboard
63+
5464
- hides cursor
65+
5566
- sound
5667

5768
### cleanUp
@@ -91,14 +102,20 @@ cpp-lln-lab/CPP_BIDS).
91102
There are several actions to perform:
92103

93104
- Calibration: to initialize EyeLink and run calibration
105+
94106
- 'default calibration' (default) will run a calibration with 6 points
107+
95108
- 'custom calibration' (cfg.eyeTracker.defaultCalibration = 'false') will
96109
run a calibration with 6 points but the experimenter can choose their
97110
position on the screen
111+
98112
- StartRecording: to start eye movements recording
113+
99114
- Message: will add a tag (e.g. 'Block_n1') in the ET output file, the tag is
100115
a string and it is input from `varargin`
116+
101117
- StopRecordings: to stop eye movements recornding
118+
102119
- Shutdown: to save the `.edf` file with BIDS compliant name, from
103120
cpp-lln-lab/CPP_BIDS, in the output folder and shut the connection between
104121
the stimulation computer and the EyeLink computer
@@ -157,16 +174,21 @@ In brief, there are several actions you can execute with this function.
157174

158175
- init: initialize the buffer for key presses on a given device (you can also
159176
specify the keys of interest that should be listened to).
177+
160178
- start: start listening to the key presses (carefully insert into your
161179
script - where do you want to start buffering the responses).
180+
162181
- check: till that point, it will check the buffer for all key presses. - It
163182
only reports presses on the keys of interest mentioned at initialization. -
164183
It **can** also check for presses on the escape key and abort if the escape
165184
key is part of the keys of interest.
185+
166186
- flush: empties the buffer of key presses in case you want to discard any
167187
previous key presses.
188+
168189
- stop: stops buffering key presses. You can still restart by calling "start"
169190
again.
191+
170192
- release: closes the buffer for good.
171193

172194
### pressSpaceForme

0 commit comments

Comments
 (0)