Change this line to read event fields from TSV files (exclude "sample", "onset", "response_time", "duration").
So for example, if in the events.tsv file, we have columns onset, sample, c1, c2, trial_type, c3, duration, response_time, the list would be { 'c1' 'c2' 'trial_type', 'c3' })
You could look at the function bids_gettaskfromfolder() which also scans the directory structure to find files.
In line 70 of pop_importbids we have
Change this line to read event fields from TSV files (exclude "sample", "onset", "response_time", "duration"). So for example, if in the events.tsv file, we have columns onset, sample, c1, c2, trial_type, c3, duration, response_time, the list would be { 'c1' 'c2' 'trial_type', 'c3' })
You could look at the function bids_gettaskfromfolder() which also scans the directory structure to find files.