Skip to content

Commit 194739f

Browse files
authored
Merge pull request #82 from Remi-Gau/remi-doc
update doc
2 parents 0a4aa72 + 7add189 commit 194739f

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

docs/functions_description.md

Lines changed: 22 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
@@ -74,7 +78,7 @@ It shows a basic one-page instruction stored in `cfg.task.instruction` and wait
7478
Counts a certain number of triggers coming from the mri/scanner before returning.
7579
Requires number of triggers to wait for.
7680

77-
### 1.9 <a name='readAndFilterLogfile'></a>readAndFilterLogfile
81+
### 1.9. <a name='readAndFilterLogfile'></a>readAndFilterLogfile
7882

7983
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).
8084

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

127131
## 5. <a name='Drawingapertures'></a>Drawing apertures
132+
133+
## 6. <a name='Randomization'></a>Randomization
134+
135+
Functions that can be used to create random stimuli sequences.
136+
137+
### 6.1. <a name='shuffle'></a>shuffle
138+
139+
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.
140+
141+
### 6.2. <a name='setTargetPositionInSequence'></a>setTargetPositionInSequence
142+
143+
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.
144+
145+
### 6.3. <a name='repeatShuffleConditions'></a>repeatShuffleConditions
146+
147+
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.

src/randomization/repeatShuffleConditions.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
% shuffledRepeats = repeatShuffleConditions(baseConditionVector, nbRepeats)
33
%
44
% given baseConditionVector, a vector of conditions (coded as numbers), this will
5-
% create a longer vector made of nbRepeats of this base vector and makesure
5+
% create a longer vector made of nbRepeats of this base vector and make sure
66
% that a given condition is not repeated one after the other
77

88
% TODO

0 commit comments

Comments
 (0)