Skip to content

Commit ecf30b0

Browse files
committed
Update readme
1 parent 342a3ba commit ecf30b0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ logFile.extraColumns = {'Speed', 'is_Fixation'};
6363
logFile = saveEventsFile('open', expParameters, logFile);
6464
6565
% The information about 2 events that we want to save
66+
% NOTE : If the user DOES NOT provide `onset`, `trial_type`, this events will be skipped.
6667
logFile(1,1).onset = 2;
6768
logFile(1,1).trial_type = 'motion_up';
6869
logFile(1,1).duration = 1;
@@ -118,6 +119,24 @@ saveEventsFile('close', expParameters, logFile);
118119
119120
```
120121

122+
If you have many columns to define but only a few with several columns, you can do this:
123+
124+
```matlab
125+
% define the extra columns: they will be added to the tsv files in the order the user input them
126+
logFile.extraColumns = {'Speed', 'is_Fixation'};
127+
128+
[cfg, expParameters] = createFilename(cfg, expParameters);
129+
130+
% dummy call to initialize the logFile variable
131+
logFile = saveEventsFile('open', expParameters, logFile);
132+
133+
% set the real length we really want
134+
logFile.extraColumns.Speed.length = 12;
135+
136+
% actual inititalization
137+
logFile = saveEventsFile('open', expParameters, logFile);
138+
```
139+
121140
## Functions descriptions
122141

123142
### userInputs
@@ -163,6 +182,9 @@ For the moment the date of acquisition is appended to the filename
163182

164183
Function to save output files for events that will be BIDS compliant.
165184

185+
If the user DOES NOT provide `onset`, `trial_type`, this events will be skipped. `duration` will be set to "NaN" if
186+
no value is provided.
187+
166188
### checkCFG
167189

168190
Check that we have all the fields that we need in the experiment parameters.

0 commit comments

Comments
 (0)