diff --git a/README.md b/README.md
index 1e66b36..adb0413 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,8 @@
# CPP_PTB
+
+
- [CPP_PTB](#cpp_ptb)
@@ -31,6 +33,8 @@
+
+
This is the Crossmodal Perception and Plasticity lab (CPP) PsychToolBox (PTB)
toolbox.
@@ -44,12 +48,16 @@ octave path.
For instructions see the following links:
+
+
| Requirements | Used version |
| -------------------------------------------------------- | ------------ |
| [PsychToolBox](http://psychtoolbox.org/) | >=3.0.14 |
| [Matlab](https://www.mathworks.com/products/matlab.html) | >=2015b |
| or [Octave](https://www.gnu.org/software/octave/) | 4.? |
+
+
Tested:
- matlab 2015b or octave 4.2.2 and PTB 3.0.14.
@@ -154,9 +162,12 @@ git submodule foreach --recursive 'git submodule update'
Download the code. Unzip. And add to the matlab path.
-Pick a specific version from [here](https://github.com/cpp-lln-lab/CPP_PTB/releases).
+Pick a specific version from
+[here](https://github.com/cpp-lln-lab/CPP_PTB/releases).
-Or take [the latest commit](https://github.com/cpp-lln-lab/CPP_PTB/archive/master.zip) - NOT RECOMMENDED.
+Or take
+[the latest commit](https://github.com/cpp-lln-lab/CPP_PTB/archive/master.zip) -
+NOT RECOMMENDED.
### Add CPP_PTB globally to the matlab path
@@ -182,6 +193,7 @@ In practice, we use the following regular expression for function names:
> Regular expressions look scary but are SUPER useful to sort through filenames:
>
> - A quick [intro to regular expression](https://www.rexegg.com/)
+>
> - And many websites allow you to "design and test" your regular expression:
> - [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)
> - ...
@@ -210,8 +222,11 @@ Thanks goes to these wonderful people
([emoji key](https://allcontributors.org/docs/en/emoji-key)):
+
+
+
+
diff --git a/docs/00-index.md b/docs/00-index.md
index 33c377c..9235f06 100644
--- a/docs/00-index.md
+++ b/docs/00-index.md
@@ -1,21 +1,22 @@
# CPP_PTB documentation
-
+
-- 1. [the CFG structure](#theCFGstructure)
-- 2. [Setting up keyboards](#Settingupkeyboards)
-- 3. [functions descriptions](#functionsdescriptions)
-- 4. [Annexes](#Annexes)
- - 4.1. [Experiment template [ WIP ]](#ExperimenttemplateWIP)
- - 4.2. [devSandbox (stand-alone)](#devSandboxstand-alone)
+
-
-
+- [CPP_PTB documentation](#cpp_ptb-documentation)
+ - [the CFG structure](#the-cfg-structure)
+ - [Setting up keyboards](#setting-up-keyboards)
+ - [functions descriptions](#functions-descriptions)
+ - [Annexes](#annexes)
+ - [Experiment template [ WIP ]](#experiment-template--wip-)
+ - [devSandbox (stand-alone)](#devsandbox-stand-alone)
-## 1. the CFG structure
+
+
+
+
+## the CFG structure
The `cfg` structure is where most of the information about your experiment will
be defined.
@@ -29,6 +30,7 @@ filled after running `setDefaultsPTB.m` and `initPTB.m`.
that that do not "depend" on your system or that PTB cannot "know". For
example the width of the screen in cm or the dimensions of the fixation
cross you want to use...
+
- `initPTB.m` will fill in the fields that ARE system dependent like the
screen refresh rate, the reference of the window that PTB opened and where
to flip stimulus to.
@@ -160,7 +162,7 @@ cfg.software.version % psychtoolbox version
cfg.software.runsOn % matlab or octave and version number
```
-## 2. Setting up keyboards
+## Setting up keyboards
To select a specific keyboard to be used by the experimenter or the participant,
you need to know the value assigned by PTB to each keyboard device.
@@ -180,6 +182,7 @@ response box in the `cfg` structure
- `cfg.keyboard.responseBox` would be the device number of the device used by
the participant to give his/her response: like the button box in the scanner
or a separate keyboard for a behavioral experiment
+
- `cfg.keyboard.keyboard` would be the device number of the keyboard on which
the experimenter will type or press the keys necessary to start or abort the
experiment.
@@ -190,25 +193,25 @@ same.
Using empty vectors (ie `[]`) or a negative value for those means that you will
let PTB find and use the default device.
-## 3. functions descriptions
+## functions descriptions
The main functions of the toolbox are described
[here](./10-functions-description.md).
-## 4. Annexes
+## Annexes
-### 4.1. Experiment template [ WIP ]
+### Experiment template {WIP}
Will be moved to a different repository
-### 4.2. devSandbox (stand-alone)
+### devSandbox (stand-alone)
-Will be moved to a different repository
+Will be moved to a different repository.
This script is a stand-alone function that can be useful as a sandbox to develop
the PTB audio/visual stimulation of your experiment. No input/output required.
-Here, a tutorial from https://peterscarfe.com/contrastgratingdemo.html is
+Here, [a tutorial](https://peterscarfe.com/contrastgratingdemo.html) is
provided for illustrative purpose (notice that some variable names are updated
to our code style). For your use, you will delete that part.
@@ -216,6 +219,7 @@ It is composed of two parts:
- a fixed structure that will initialize and close PTB in 'debug mode'
(`PsychDebugWindowConfiguration`, `SkipSyncTests`)
+
- the actual sandbox where to set your dynamic variables (the stimulation
parameters) and the 'playground' where to develop the stimulation code
diff --git a/docs/10-functions-description.md b/docs/10-functions-description.md
index fb562ce..7f8747f 100644
--- a/docs/10-functions-description.md
+++ b/docs/10-functions-description.md
@@ -1,5 +1,7 @@
# functions description
+
+
- [functions description](#functions-description)
@@ -31,6 +33,8 @@
+
+
## General functions
### initPTB
@@ -41,17 +45,24 @@ It is pretty much necessary to use this function to set up the stage for using
any other functions of CPP_PTB.
- checks OS and PTB version
+
- set some defaults
+
- set the screen details
- the window opened takes the whole screen by default
- set in debug mode with window transparency if necessary
- can skip synch test if you ask for it (nicely)
- gets the flip interval
- computes the pixel per degree of visual angle
+
- set fixation cross details
+
- set font details
+
- keyboard
+
- hides cursor
+
- sound
### cleanUp
@@ -91,14 +102,20 @@ cpp-lln-lab/CPP_BIDS).
There are several actions to perform:
- Calibration: to initialize EyeLink and run calibration
+
- 'default calibration' (default) will run a calibration with 6 points
+
- 'custom calibration' (cfg.eyeTracker.defaultCalibration = 'false') will
run a calibration with 6 points but the experimenter can choose their
position on the screen
+
- StartRecording: to start eye movements recording
+
- Message: will add a tag (e.g. 'Block_n1') in the ET output file, the tag is
a string and it is input from `varargin`
+
- StopRecordings: to stop eye movements recornding
+
- Shutdown: to save the `.edf` file with BIDS compliant name, from
cpp-lln-lab/CPP_BIDS, in the output folder and shut the connection between
the stimulation computer and the EyeLink computer
@@ -157,16 +174,21 @@ In brief, there are several actions you can execute with this function.
- init: initialize the buffer for key presses on a given device (you can also
specify the keys of interest that should be listened to).
+
- start: start listening to the key presses (carefully insert into your
script - where do you want to start buffering the responses).
+
- check: till that point, it will check the buffer for all key presses. - It
only reports presses on the keys of interest mentioned at initialization. -
It **can** also check for presses on the escape key and abort if the escape
key is part of the keys of interest.
+
- flush: empties the buffer of key presses in case you want to discard any
previous key presses.
+
- stop: stops buffering key presses. You can still restart by calling "start"
again.
+
- release: closes the buffer for good.
### pressSpaceForme