Open zenBen opened 6 years ago
Have tested this with the HeadIT dataset here
All data was downloaded to the same directory, and files (which are all named eeg_recording_1.bdf) were renamed to the form sNN_eeg_1.bdf (where NN is a two digit number from [01..12]). The same procedure was applied to channel location files.
This worked fine after small changes to CTAP_load_chanlocs.m
and ctapeeg_load_chanlocs.m
, to handle mismatched numbers of channels in EEG and chanlocs.
There may be a separate chanlocs file required for each recording, and we do not have an option to handle this.
Chanlocs can exist in three ways:
For each scenario, there are options for CTAP:
Cfg.eeg.chanlocs
= the full file path, this is the (only?) currently supported approachchanlocs files can be: (a) in the same directory, or (b) different directories 2a.
Cfg.eeg.chanlocs
= the chanlocs directory. Read that directory inCTAP_load_chanlocs()
, and pick the chanlocs file with closest matching filename to the data filepath2measconf()
.2b. list of chanlocs for each recording exists in the measurement config spreadsheet
read_measinfo_spreadsheet()
to discover chanlocsThese options imply different required user behaviour:
Cfg.eeg.chanlocs
= the full file path, this is how it currently worksCfg.eeg.chanlocs
= the chanlocs directory, minimal change but possibly buggy due to file matching 2b. add chanlocs file path to each recording entry in the measurement config spreadsheet, laborious and safe, but makesCfg.eeg.chanlocs
redundant, which requires a different approach to auto checking and documentationread_measinfo_spreadsheet()
writes a cell string array of filepaths to chanlocs inCfg.eeg.chanlocs
, andCTAP_load_chanlocs()
is upgraded to read thatCfg.eeg.chanlocs
= some dummy value? Or how not to trigger error inctap_auto_config()
? And then don't callCTAP_load_chanlocs()
(which won't be needed).EDIT added feature to support solution 2a. This might easily break if chanlocs files are not named in uniform way, and can only work for chanlocs all in the same directory. Created function
find_closest_file()
, which could also be used inpath2measconf()
, but that code is complex enough that I won't mess with it now.