sccn / EEG-BIDS

21 stars 17 forks source link

Fix issue where multiple files within a non-eeg modality folder gets overwritten by the last file #199

Closed sjeung closed 4 months ago

sjeung commented 5 months ago

Hi, I noticed that the loop within function pop_importbids/import_noneeg overwrites the outputs instead of concatenating. This was causing only the last file to be imported when multiple non-eeg files were present in a single modality specific folder.

For example, in this data set (EEG+motion)

sub-01\ses-body\motion\sub-01_ses-body_task-Rotation_tracksys-HTCVive_motion.tsv sub-01\ses-body\motion\sub-01_ses-body_task-Rotation_tracksys-PhaseSpace_motion.tsv

Would output only

derivatives\eeglab\sub-01\ses-body\motion\sub-01_ses-body_task-Rotation_tracksys-PhaseSpace_motion.set

With the fix the code lines that call import_noneeg and save the data set are looped over.