sccn / EEG-BIDS

21 stars 17 forks source link

Get `taskName` from file.task #48

Closed cll008 closed 3 years ago

cll008 commented 3 years ago

https://github.com/sccn/bids-matlab-tools/blob/16091d04fd3c9a3b273305614d5164200e2577d5/bids_export.m#L565

Instead of using opt.taskName to populate filenames, we can use file.task information (e.g. https://github.com/sccn/bids-matlab-tools/blob/16091d04fd3c9a3b273305614d5164200e2577d5/bids_export.m#L29).

This would improve handling for studies where 1 session contains multiple tasks. However, should each task still be marked as run 1? If so, the check for unique session-run combination will produce an error. Maybe that check can be bypassed on isfield(data, 'task')

dungscout96 commented 3 years ago

Seems like BIDS only allows naming one combined task, if multiple tasks are performed in one run: "In the context of brain scanning, a task is always tied to one data acquisition. Therefore, even if during one acquisition the subject performed multiple conceptually different behaviors (with different sets of instructions) they will be considered one (combined) task." (from https://bids-specification.readthedocs.io/en/stable/02-common-principles.html#definitions) I guess people will have to document all their task in the Task description.

cll008 commented 3 years ago

Interesting, thanks for the clarification. So conceptually BIDS "task" is practically "experiment name" or "study name" for EEGLAB people. I guess this is in conflict with what we have in bids_export.m (i.e. there is a subject.task field with differently named tasks as entries)?

dungscout96 commented 3 years ago

There are couple other differences in name uses between BIDS and EEGLAB that I came across. While we call each recording a dataset, they call it a run (or a data acquisition). And while we call the whole experiment a Study, BIDS calls it a dataset. Just FYI in case you come across these confusion in the future.

Seems to me the task variable is no longer used and part of legacy code. @arnodelorme can you confirm here?

cll008 commented 3 years ago

Okay. From our email discussions it sounds like sticking with the current scheme is good (and this circumvents issues where a subject performs a task with the same name multiple times in the same session).

So, opt.taskName should be 'mixed' or something more descriptive (but specifying the whole experiment/study), and names in files.task should be explained in README or other metadata.

arnodelorme commented 3 years ago

Yes, tax-mixed sound good. Or tax-visual if they are all visual.