Skip to content

Commit dd1f057

Browse files
committed
clean doc and move fixation functions in a separate folder
1 parent ab91603 commit dd1f057

File tree

4 files changed

+72
-53
lines changed

4 files changed

+72
-53
lines changed

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
[![](https://img.shields.io/badge/Octave-CI-blue?logo=Octave&logoColor=white)](https://github.com/cpp-lln-lab/CPP_PTB/actions)
2+
![](https://github.com/cpp-lln-lab/CPP_PTB/workflows/CI/badge.svg)
3+
4+
[![Build Status](https://travis-ci.com/cpp-lln-lab/CPP_BIDS.svg?branch=master)](https://travis-ci.com/cpp-lln-lab/CPP_PTB)
5+
6+
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
7+
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
8+
<!-- ALL-CONTRIBUTORS-BADGE:END -->
9+
10+
# CPP_PTB
11+
112
<!-- vscode-markdown-toc -->
213
* 1. [Requirements](#Requirements)
314
* 2. [Code guidestyle](#Codeguidestyle)
@@ -17,17 +28,13 @@
1728
numbering=true
1829
autoSave=true
1930
/vscode-markdown-toc-config -->
20-
<!-- /vscode-markdown-toc --># CPP_PTB
31+
<!-- /vscode-markdown-toc -->
2132

22-
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
23-
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
24-
<!-- ALL-CONTRIBUTORS-BADGE:END -->
2533

26-
This is List of Crossmodal Perception and Plasticity lab (CPP) PsychToolBox (PTB) toolbox.
34+
This is the Crossmodal Perception and Plasticity lab (CPP) PsychToolBox (PTB) toolbox.
2735

2836
Those functions are mostly wrappers around some PTB functions to facilitate their use and to have a codebase to facilitate their reuse.
2937

30-
3138
## 1. <a name='Requirements'></a>Requirements
3239

3340
Make sure that the following toolboxes are installed and added to the matlab / octave path.

docs/functions_description.md

Lines changed: 59 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,31 @@
1+
# functions description
2+
13
<!-- vscode-markdown-toc -->
2-
* 1. [function details](#functiondetails)
4+
* 1. [ General functions](#Generalfunctions)
35
* 1.1. [initPTB](#initPTB)
4-
* 1.2. [testKeyboards](#testKeyboards)
5-
* 1.3. [cleanUp](#cleanUp)
6-
* 1.4. [getExperimentStart](#getExperimentStart)
7-
* 1.5. [getExperimentEnd](#getExperimentEnd)
8-
* 1.6. [getResponse](#getResponse)
9-
* 1.7. [deg2Pix](#deg2Pix)
10-
* 1.8. [drawFixationCross](#drawFixationCross)
11-
* 1.9. [eyeTracker](#eyeTracker)
12-
* 1.10. [pressSpace4me](#pressSpace4me)
13-
* 1.11. [standByScreen](#standByScreen)
14-
* 1.12. [waitForTrigger](#waitForTrigger)
6+
* 1.2. [cleanUp](#cleanUp)
7+
* 1.3. [getExperimentStart](#getExperimentStart)
8+
* 1.4. [getExperimentEnd](#getExperimentEnd)
9+
* 1.5. [deg2Pix](#deg2Pix)
10+
* 1.6. [eyeTracker](#eyeTracker)
11+
* 1.7. [standByScreen](#standByScreen)
12+
* 1.8. [waitForTrigger](#waitForTrigger)
13+
* 2. [Keyboard functions: response collection and aborting experiment](#Keyboardfunctions:responsecollectionandabortingexperiment)
14+
* 2.1. [testKeyboards](#testKeyboards)
15+
* 2.2. [getResponse](#getResponse)
16+
* 2.3. [pressSpace4me](#pressSpace4me)
17+
* 3. [Fixations](#Fixations)
18+
* 3.1. [drawFixationCross](#drawFixationCross)
19+
* 4. [Drawing dots](#Drawingdots)
20+
* 5. [Drawing apertures](#Drawingapertures)
1521

1622
<!-- vscode-markdown-toc-config
1723
numbering=true
1824
autoSave=true
1925
/vscode-markdown-toc-config -->
20-
<!-- /vscode-markdown-toc --># functions description
21-
22-
23-
24-
## 1. <a name='functiondetails'></a>function details
26+
<!-- /vscode-markdown-toc -->
2527

28+
## 1. <a name='Generalfunctions'></a> General functions
2629

2730
### 1.1. <a name='initPTB'></a>initPTB
2831

@@ -38,26 +41,48 @@ This will initialize PsychToolBox
3841
- keyboard
3942
- sound
4043

41-
### 1.2. <a name='testKeyboards'></a>testKeyboards
42-
43-
Checks that the keyboards asked for properly connected.
44-
45-
If no key is pressed on the correct keyboard after the timeOut time this exits with an error.
46-
47-
### 1.3. <a name='cleanUp'></a>cleanUp
44+
### 1.2. <a name='cleanUp'></a>cleanUp
4845

4946
A wrapper function to close all windows, ports, show mouse cursor, close keyboard queues
5047
and give access back to the keyboards.
5148

52-
### 1.4. <a name='getExperimentStart'></a>getExperimentStart
49+
### 1.3. <a name='getExperimentStart'></a>getExperimentStart
5350

5451
Wrapper function that will show a fixation cross and collect a start timestamp in `cfg.experimentStart`
5552

56-
### 1.5. <a name='getExperimentEnd'></a>getExperimentEnd
53+
### 1.4. <a name='getExperimentEnd'></a>getExperimentEnd
5754

5855
Wrapper function that will show a fixation cross and display in the console the whole experiment's duration in minutes and seconds
5956

60-
### 1.6. <a name='getResponse'></a>getResponse
57+
### 1.5. <a name='deg2Pix'></a>deg2Pix
58+
59+
For a given field value in degrees of visual angle in the input `structure`,
60+
this computes its value in pixel using the pixel per degree value of the `cfg` structure
61+
and returns a structure with an additional field with Pix suffix holding that new value.
62+
63+
### 1.6. <a name='eyeTracker'></a>eyeTracker
64+
65+
This will handle the Eye Tracker (EyeLink set up) and can be called to initialize the connection and start the calibration, start/stop eye(s) movement recordings and save the `*.edf` file (named with BIDS specification from cpp-lln-lab/CPP_BIDS).
66+
67+
### 1.7. <a name='standByScreen'></a>standByScreen
68+
69+
It shows a basic one-page instruction stored in `cfg.task.instruction` and wait for `space` stroke.
70+
71+
### 1.8. <a name='waitForTrigger'></a>waitForTrigger
72+
73+
Counts a certain number of triggers coming from the mri/scanner before returning.
74+
Requires number of triggers to wait for.
75+
76+
77+
## 2. <a name='Keyboardfunctions:responsecollectionandabortingexperiment'></a>Keyboard functions: response collection and aborting experiment
78+
79+
### 2.1. <a name='testKeyboards'></a>testKeyboards
80+
81+
Checks that the keyboards asked for properly connected.
82+
83+
If no key is pressed on the correct keyboard after the timeOut time this exits with an error.
84+
85+
### 2.2. <a name='getResponse'></a>getResponse
6186

6287
It is wrapper function to use `KbQueue` which is definitely what you should use to collect responses.
6388

@@ -83,29 +108,16 @@ In brief, there are several actions you can execute with this function.
83108
- stop: Stops buffering key presses. You can still restart by calling "start" again.
84109
- release: Closes the buffer for good.
85110

86-
### 1.7. <a name='deg2Pix'></a>deg2Pix
87-
88-
For a given field value in degrees of visual angle in the input `structure`,
89-
this computes its value in pixel using the pixel per degree value of the `cfg` structure
90-
and returns a structure with an additional field with Pix suffix holding that new value.
91-
92-
### 1.8. <a name='drawFixationCross'></a>drawFixationCross
93-
94-
Define the parameters of the fixation cross in `cfg` and `expParameters` and this does the rest.
95-
96-
### 1.9. <a name='eyeTracker'></a>eyeTracker
97-
98-
This will handle the Eye Tracker (EyeLink set up) and can be called to initialize the connection and start the calibration, start/stop eye(s) movement recordings and save the `*.edf` file (named with BIDS specification from cpp-lln-lab/CPP_BIDS).
99-
100-
### 1.10. <a name='pressSpace4me'></a>pressSpace4me
111+
### 2.3. <a name='pressSpace4me'></a>pressSpace4me
101112

102113
Use that to stop your script and only restart when the space bar is pressed.
103114

104-
### 1.11. <a name='standByScreen'></a>standByScreen
115+
## 3. <a name='Fixations'></a>Fixations
105116

106-
It shows a basic one-page instruction stored in `cfg.task.instruction` and wait for `space` stroke.
117+
### 3.1. <a name='drawFixationCross'></a>drawFixationCross
107118

108-
### 1.12. <a name='waitForTrigger'></a>waitForTrigger
119+
Define the parameters of the fixation cross in `cfg` and `expParameters` and this does the rest.
109120

110-
Counts a certain number of triggers coming from the mri/scanner before returning.
111-
Requires number of triggers to wait for.
121+
## 4. <a name='Drawingdots'></a>Drawing dots
122+
123+
## 5. <a name='Drawingapertures'></a>Drawing apertures
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)