|
9 | 9 | % [logFile] = saveEventsFile(action, cfg, logFile) |
10 | 10 | % |
11 | 11 | % :param action: Defines the operation to do. The different possibilities are |
12 | | - % ``'init'``, ``'open'``, ``'open_stim'``, ``'save'`` or ``'close'``. |
| 12 | + % ``'init'``, ``'init_stim'``, ``'open'``, ``'save'`` or ``'close'``. |
13 | 13 | % For more information on each case see below. |
14 | 14 | % :type action: string |
15 | 15 | % :param cfg: Configuration variable. See ``checkCFG()``. |
|
31 | 31 | % |
32 | 32 | % Actions: |
33 | 33 | % |
34 | | - % .. todo: |
35 | | - % wait for updates on the API of this function to finish updating |
36 | | - % |
37 | 34 | % Example:: |
38 | 35 | % |
39 | | - % logFile = saveEventsFile('init', [cfg], logFile) |
40 | | - % logFile = saveEventsFile('open', [cfg], logFile) |
41 | | - % logFile = saveEventsFile('open_stim', [cfg], logFile) |
42 | | - % logFile = saveEventsFile('save', [cfg], logFile) |
| 36 | + % logFile = saveEventsFile('init', cfg, logFile) |
| 37 | + % logFile = saveEventsFile('init_stim', cfg, logFile) |
| 38 | + % logFile = saveEventsFile('open', cfg, logFile) |
| 39 | + % logFile = saveEventsFile('save', cfg, logFile) |
| 40 | + % |
| 41 | + % - ``'init'`` and ``'init_stim'`` are used for events and stimuli tsv files respectively. |
| 42 | + % This initializes the extra columns to be save. |
43 | 43 | % |
44 | 44 | % - ``'open'`` will create the file ID and return it in ``logFile.fileID`` using |
45 | 45 | % the information in the ``cfg`` structure. |
|
52 | 52 | % logFile = saveEventsFile('open', cfg, logFile); |
53 | 53 | % |
54 | 54 | % - ``'save'`` will save the data contained in logfile by using the file ID |
55 | | - % ``logFile.fileID``; logfile must then contain: |
| 55 | + % ``logFile.fileID``. |
| 56 | + % If saving a stimulus file then the only the fields of ``logFile.extraColumns`` |
| 57 | + % will be saved. |
| 58 | + % For regular _events.tsv files, then ``logFile`` must then contain: |
56 | 59 | % |
57 | 60 | % - logFile.onset |
58 | | - % - logFile.trial_type |
59 | 61 | % - logFile.duration |
| 62 | + % |
| 63 | + % Otherwise it will be skipped. |
60 | 64 | % |
61 | 65 | % Example:: |
62 | 66 | % |
63 | | - % logFile = saveEventsFile('open', cfg, logFile); |
| 67 | + % logFile = saveEventsFile('save', cfg, logFile); |
64 | 68 | % |
65 | 69 | % - ``'close'`` closes the file with file ID ``logFile.fileID``. |
66 | 70 | % If ``cfg.verbose`` is superior to ``1`` then this will tell you |
|
0 commit comments