sccn / EEG-BIDS

21 stars 17 forks source link

_eeg.json TaskName field indicate "mixed" for multi-task datasets #185

Closed neuromechanist closed 2 months ago

neuromechanist commented 1 year ago

The _eeg.json files for multi-task datasets only mention "mixed" for every task under each subject. This seems to stem from line 630 of bids_export, where the TaskName is set to mixed if there is more than one task is detected for a subject.

The desired behavior should be copying the task name from data.task or task and run numbers from the data.task and data.run fields, respectively.

An examples for this issue the HBN dataset where there are multiple tasks per subject. Here is the example of a JSON file for one of the tasks (sub-NDARAA948VFH_task-contrastChangeDetection_run-2_eeg.json):

{
  "PowerLineFrequency": 60,
  "TaskName": "mixed",
  "EEGChannelCount": 129,
  "EEGReference": "Cz",
  "RecordingType": "continuous",
  "RecordingDuration": 676.808,
  "SamplingFrequency": 500,
  "EOGChannelCount": 0,
  "ECGChannelCount": 0,
  "EMGChannelCount": 0,
  "SoftwareFilters": "n/a"
}

SCCN developers can access the files on /qumulo/yahya/cmi_bids_R3_20

dungscout96 commented 2 months ago

We implemented in fc0d17eb85dc415d0f2158e7d216f5d864372adf. @neuromechanist can you pull the latest change and test it out?

dungscout96 commented 2 months ago

Seems like this issue is now resolved with the test in https://github.com/sccn/bids-matlab-tools/pull/217