Skip to content

Commit ff750e7

Browse files
committed
update doc 1
1 parent cf92501 commit ff750e7

17 files changed

+117
-207
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*.m~
44
*octave-workspace
55

6+
.vscode/*
7+
68
# exclude content of logfiles folders
79
*.tsv
810
*.mat

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ formats:
2323
python:
2424
version: 3.7
2525
install:
26-
- requirements: docs/requirements.txt
26+
- requirements: requirements.txt

README.md

Lines changed: 2 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,8 @@
3030
<!-- TOC -->
3131

3232
- [CPP_PTB](#cpp_ptb)
33-
- [Requirements](#requirements)
3433
- [Documentation](#documentation)
3534
- [Content](#content)
36-
- [How to install](#how-to-install)
37-
- [Download with git](#download-with-git)
38-
- [Add as a submodule](#add-as-a-submodule)
39-
- [Example for submodule usage](#example-for-submodule-usage)
40-
- [Direct download](#direct-download)
41-
- [Add CPP_PTB globally to the matlab path](#add-cpp_ptb-globally-to-the-matlab-path)
4235
- [Code style guide](#code-style-guide)
4336
- [Unit tests](#unit-tests)
4437
- [Contributors ✨](#contributors-)
@@ -53,30 +46,10 @@ toolbox.
5346
Those functions are mostly wrappers around some PTB functions to facilitate
5447
their use and their reuse (#DontRepeatYourself)
5548

56-
## Requirements
57-
58-
Make sure that the following toolboxes are installed and added to the matlab /
59-
octave path.
60-
61-
For instructions see the following links:
62-
63-
<!-- lint disable -->
64-
65-
| Requirements | Used version |
66-
| -------------------------------------------------------- | ------------ |
67-
| [PsychToolBox](http://psychtoolbox.org/) | >=3.0.14 |
68-
| [Matlab](https://www.mathworks.com/products/matlab.html) | >=2015b |
69-
| or [Octave](https://www.gnu.org/software/octave/) | 4.? |
70-
71-
<!-- lint enable -->
72-
73-
Tested:
74-
75-
- matlab 2015b or octave 4.2.2 and PTB 3.0.14.
76-
7749
## Documentation
7850

79-
All the documentation is accessible [here](./docs/00-index.md).
51+
All the documentation and installtion information is accessible
52+
[here](https://cpp-ptb.readthedocs.io/en/stable/index.html#).
8053

8154
## Content
8255

@@ -95,111 +68,6 @@ All the documentation is accessible [here](./docs/00-index.md).
9568
└── tests # all the tests that that can be run by github actions
9669
```
9770

98-
## How to install
99-
100-
The easiest way to use this repository is to create a new repository by using
101-
the
102-
[template PTB experiment repository](https://github.com/cpp-lln-lab/template_PTB_experiment):
103-
this creates a new repository on your github account with all the basic folders,
104-
files and submodules already set up. You only have to then clone the repository
105-
and you are good to go.
106-
107-
### Download with git
108-
109-
```bash
110-
cd fullpath_to_directory_where_to_install
111-
# use git to download the code
112-
git clone https://github.com/cpp-lln-lab/CPP_PTB.git
113-
# move into the folder you have just created
114-
cd CPP_PTB
115-
```
116-
117-
Then get the latest commit to stay up to date:
118-
119-
```bash
120-
# from the directory where you downloaded the code
121-
git pull origin master
122-
```
123-
124-
To work with a specific version, create a branch at a specific version tag
125-
number
126-
127-
```bash
128-
# creating and checking out a branch that will be called version1 at the version tag v1.0.0
129-
git checkout -b version1 v1.0.0
130-
```
131-
132-
### Add as a submodule
133-
134-
Add it as a submodule in the repo you are working on.
135-
136-
```bash
137-
cd fullpath_to_directory_where_to_install
138-
# use git to download the code
139-
git submodule add https://github.com/cpp-lln-lab/CPP_PTB.git
140-
```
141-
142-
To get the latest commit you then need to update the submodule with the
143-
information on its remote repository and then merge those locally.
144-
145-
```bash
146-
git submodule update --remote --merge
147-
```
148-
149-
Remember that updates to submodules need to be committed as well.
150-
151-
#### Example for submodule usage
152-
153-
So say you want to clone a repo that has some nested submodules, then you would
154-
type this to get the content of all the submodules at once (here with my
155-
experiment repo):
156-
157-
```bash
158-
git clone --recurse-submodules https://github.com/user_name/yourExperiment.git
159-
```
160-
161-
This would be the way to do it "by hand"
162-
163-
```bash
164-
# clone the repo
165-
git clone https://github.com/user_name/yourExperiment.git
166-
167-
# go into the directory
168-
cd yourExperiment
169-
170-
# initialize and get the content of the first level of submodules (CPP_PTB and CPP_BIDS)
171-
git submodule init
172-
git submodule update
173-
174-
# get the nested submodules JSONio and BIDS-matlab for CPP_BIDS
175-
git submodule foreach --recursive 'git submodule init'
176-
git submodule foreach --recursive 'git submodule update'
177-
```
178-
179-
### Direct download
180-
181-
Download the code. Unzip. And add to the matlab path.
182-
183-
Pick a specific version from
184-
[here](https://github.com/cpp-lln-lab/CPP_PTB/releases).
185-
186-
Or take
187-
[the latest commit](https://github.com/cpp-lln-lab/CPP_PTB/archive/master.zip) -
188-
NOT RECOMMENDED.
189-
190-
### Add CPP_PTB globally to the matlab path
191-
192-
This is NOT RECOMMENDED as this might create conflicts if you use different
193-
versions of CPP_PTB as sub-modules.
194-
195-
Also note that this might not work at all if you have not set a command line
196-
alias to start Matlab from a terminal window by just typing `matlab`. :wink:
197-
198-
```bash
199-
# from within the CPP_PTB folder
200-
matlab -nojvm -nosplash -r "addpath(genpath(fullfile(pwd, 'src'))); savepath(); path(); exit();"
201-
```
202-
20371
## Code style guide
20472

20573
We use the `camelCase` to more easily differentiates our functions from the ones

docs/00-index.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,23 +110,15 @@ cfg.audio.initVolume = 1;
110110
cfg.audio.repeat = 1;
111111
cfg.audio.startCue = 0;
112112
cfg.audio.waitForDevice = 1;
113+
# Main changes
113114
114-
%% -------------------------------------------------------------------------- %%
115-
% eyetracker
116-
cfg.eyeTracker.do = false; % set to true if you are using an eyelink eyetracker
117-
cfg.eyeTracker.defaultCalibration = true;
118-
cfg.eyeTracker.backgroundColor = [192 192 192];
119-
cfg.eyeTracker.fontColor = [0 0 0];
120-
cfg.eyeTracker.calibrationTargetColor = [0 0 0];
121-
cfg.eyeTracker.calibrationTargetSize = 1;
122-
cfg.eyeTracker.calibrationTargetWidth = 0.5;
123-
cfg.eyeTracker.displayCalResults = 1;
115+
- update documentation using sphinx and RTD
116+
- change the API for creating and events.tsv and stim.tsv
117+
- update jupyter notebooks
124118
125-
%% -------------------------------------------------------------------------- %%
126-
% cfg.mri
127-
cfg.bids.mri.repetitionTime
119+
# Minor changes
128120
129-
%% -------------------------------------------------------------------------- %%
121+
- refactor and add tests-------------- %%
130122
SET BY initPTB
131123
%% -------------------------------------------------------------------------- %%
132124
@@ -200,9 +192,6 @@ The main functions of the toolbox are described
200192

201193
## Annexes
202194

203-
### Experiment template {WIP}
204-
205-
Will be moved to a different repository
206195

207196
### devSandbox (stand-alone)
208197

docs/10-functions-description.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ any other functions of CPP_PTB.
4949
- set some defaults
5050

5151
- set the screen details
52+
5253
- the window opened takes the whole screen by default
5354
- set in debug mode with window transparency if necessary
5455
- can skip synch test if you ask for it (nicely)

docs/source/function_description.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ List of functions in the ``src`` folder.
1515
.. autofunction:: getExperimentEnd
1616
.. autofunction:: getExperimentStart
1717
.. autofunction:: isOctave
18-
.. autofunction:: readAndFilterLogfile
1918
.. autofunction:: waitForTrigger
2019
.. autofunction:: waitFor
2120

docs/source/installation.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ Download with git
4141
:linenos:
4242
4343
cd fullpath_to_directory_where_to_install
44+
4445
# use git to download the code
4546
git clone https://github.com/cpp-lln-lab/CPP_PTB.git
47+
4648
# move into the folder you have just created
4749
cd CPP_PTB
4850
@@ -74,6 +76,7 @@ Add it as a submodule in the repo you are working on.
7476
:linenos:
7577
7678
cd fullpath_to_directory_where_to_install
79+
7780
# use git to download the code
7881
git submodule add https://github.com/cpp-lln-lab/CPP_PTB.git
7982

src/drawFieldOfVIew.m

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
% (C) Copyright 2020 CPP_PTB developers
22

33
function fov = drawFieldOfVIew(cfg, centerOnScreen)
4-
% drawFieldOfVIew(cfg)
5-
%
6-
% draws a red rectangle on the screen to materialize the field of view of
4+
%
5+
% Draws a red rectangle on the screen to materialize the field of view of
76
% the participant. This can be used during debugging to help design the
87
% stimuli if you know the FOV of the participant will be obstructed by
98
% something
10-
9+
%
10+
% USAGE::
11+
%
12+
% fov = drawFieldOfVIew(cfg, centerOnScreen)
13+
%
14+
% :param cfg:
15+
% :type cfg: structure
16+
% :param centerOnScreen:
17+
% :type centerOnScreen: boolean
18+
%
19+
% :returns: - :fov: (array) PTB rectangle
20+
%
21+
1122
if nargin < 2
1223
centerOnScreen = true;
1324
end

src/templates/templateFunctionNumpy.m

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/utils/checkPtbVersion.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
% (C) Copyright 2020 CPP_PTB developers
22

33
function checkPtbVersion()
4+
%
45
% Checks that the right dependencies are installed.
6+
%
7+
% USAGE::
8+
%
9+
% checkPtbVersion()
10+
%
511

612
printCreditsCppPtb();
713

0 commit comments

Comments
 (0)