Skip to content

Commit c0b4657

Browse files
committed
Merge remote-tracking branch 'cpp-lln-lab/master'
2 parents fd9b1b1 + e7be247 commit c0b4657

22 files changed

+560
-295
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[![](https://img.shields.io/badge/Octave-CI-blue?logo=Octave&logoColor=white)](https://github.com/cpp-lln-lab/CPP_PTB/actions)
22
![](https://github.com/cpp-lln-lab/CPP_PTB/workflows/CI/badge.svg)
33

4-
[![Build Status](https://travis-ci.com/cpp-lln-lab/CPP_BIDS.svg?branch=master)](https://travis-ci.com/cpp-lln-lab/CPP_PTB)
4+
[![Build Status](https://travis-ci.com/cpp-lln-lab/CPP_PTB.svg?branch=master)](https://travis-ci.com/cpp-lln-lab/CPP_PTB)
5+
6+
[![codecov](https://codecov.io/gh/cpp-lln-lab/CPP_PTB/branch/master/graph/badge.svg)](https://codecov.io/gh/cpp-lln-lab/CPP_PTB)
57

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

demos/CPP_waitForTriggerDemo.m

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
cd ..;
1+
addpath(genpath(fullfile(pwd, '..', 'src')));
22

3+
%%
34
cfg.testingDevice = 'mri';
45

5-
cfg.mri.triggerNb = 4;
6+
cfg.mri.triggerNb = 2;
67

78
cfg.mri.triggerKey = 'space';
89

910
KbName('UnifyKeyNames');
1011

11-
waitForTrigger(cfg);
12+
%%
13+
% waitForTrigger(cfg);
14+
15+
%%
16+
quietMode = true;
17+
% waitForTrigger(cfg, [], quietMode);
18+
19+
%%
20+
nbTriggersToWait = 1;
21+
waitForTrigger(cfg, [], quietMode, nbTriggersToWait);

docs/functions_description.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* 1.6. [eyeTracker](#eyeTracker)
1111
* 1.7. [standByScreen](#standByScreen)
1212
* 1.8. [waitForTrigger](#waitForTrigger)
13-
* 1.9 [readAndFilterLogfile](#readAndFilterLogfile)
13+
* 1.9. [readAndFilterLogfile](#readAndFilterLogfile)
1414
* 2. [Keyboard functions: response collection and aborting experiment](#Keyboardfunctions:responsecollectionandabortingexperiment)
1515
* 2.1. [testKeyboards](#testKeyboards)
1616
* 2.2. [getResponse](#getResponse)
@@ -19,6 +19,10 @@
1919
* 3.1. [drawFixationCross](#drawFixationCross)
2020
* 4. [Drawing dots](#Drawingdots)
2121
* 5. [Drawing apertures](#Drawingapertures)
22+
* 6. [Randomization](#Randomization)
23+
* 6.1. [shuffle](#shuffle)
24+
* 6.2. [setTargetPositionInSequence](#setTargetPositionInSequence)
25+
* 6.3. [repeatShuffleConditions](#repeatShuffleConditions)
2226

2327
<!-- vscode-markdown-toc-config
2428
numbering=true
@@ -65,6 +69,15 @@ and returns a structure with an additional field with Pix suffix holding that ne
6569

6670
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).
6771

72+
There are several actions to perform:
73+
74+
- Calibration: to initialize EyeLink and run calibration
75+
- 'default calibration' (default) will run a calibration with 6 points
76+
- 'custom calibration' (cfg.eyeTracker.defaultCalibration = 'false') will run a calibration with 6 points but the experimenter can choose their position on the screen
77+
- StartRecording: to start eye movements recording
78+
- StopRecordings: to stop eye movements recornding
79+
- 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
80+
6881
### 1.7. <a name='standByScreen'></a>standByScreen
6982

7083
It shows a basic one-page instruction stored in `cfg.task.instruction` and wait for `space` stroke.
@@ -74,7 +87,7 @@ It shows a basic one-page instruction stored in `cfg.task.instruction` and wait
7487
Counts a certain number of triggers coming from the mri/scanner before returning.
7588
Requires number of triggers to wait for.
7689

77-
### 1.9 <a name='readAndFilterLogfile'></a>readAndFilterLogfile
90+
### 1.9. <a name='readAndFilterLogfile'></a>readAndFilterLogfile
7891

7992
Displays in the command window part of the `*events.tsv` file filterd by an element (e.g. 'trigger'). It can take the last output produced (through `cfg`) or any output BIDS compatible (through file path).
8093

@@ -125,3 +138,19 @@ Define the parameters of the fixation cross in `cfg` and `expParameters` and thi
125138
## 4. <a name='Drawingdots'></a>Drawing dots
126139

127140
## 5. <a name='Drawingapertures'></a>Drawing apertures
141+
142+
## 6. <a name='Randomization'></a>Randomization
143+
144+
Functions that can be used to create random stimuli sequences.
145+
146+
### 6.1. <a name='shuffle'></a>shuffle
147+
148+
Is just there to replace the Shuffle function from PTB in case it is not in the path. Can be useful for testing or for continuous integration.
149+
150+
### 6.2. <a name='setTargetPositionInSequence'></a>setTargetPositionInSequence
151+
152+
For a sequence of length `seqLength` where we want to insert `nbTarget` targets, this will return `nbTarget` random position in that sequence and make sure that they are not in consecutive positions.
153+
154+
### 6.3. <a name='repeatShuffleConditions'></a>repeatShuffleConditions
155+
156+
Given `baseConditionVector`, a vector of conditions (coded as numbers), this will create a longer vector made of `nbRepeats` of this base vector and make sure that a given condition is not repeated one after the other.

manualTests/miss_hit.cfg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
2+
line_length: 100
3+
regex_function_name: "((test_[a-z]+)|[a-z]+)(([A-Z]){1}[A-Za-z]+)*"
4+
suppress_rule: "copyright_notice"
5+
6+
# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
7+
metric "cnest": limit 4
8+
metric "file_length": limit 500
9+
metric "cyc": limit 15
10+
metric "parameters": limit 5
File renamed without changes.

miss_hit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# styly guide (https://florianschanda.github.io/miss_hit/style_checker.html)
1+
# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
22
line_length: 100
33
regex_function_name: "[a-z]+(([A-Z]){1}[A-Za-z]+)*"
44
suppress_rule: "copyright_notice"

src/cleanUp.m

100644100755
File mode changed.

0 commit comments

Comments
 (0)