0001 function vb_job_import_eeg_data(root_dir, base_name)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 eeg_parm.Measurement = 'EEG';
0017 eeg_parm.device = 'BIOSEMI';
0018
0019 eeg_parm.eeginfo_version = [];
0020 eeg_parm.verbose_swt = false;
0021
0022
0023 [bdf_path, bdf_name] = ...
0024 vb_get_session_filename(root_dir.bdf, base_name, '.bdf');
0025
0026 Nfile = length(bdf_path);
0027
0028
0029 [pos_path, pos_file] = vb_get_ext_filename(root_dir.bdf, '.pos.mat');
0030 [face_path, face_file] = vb_get_ext_filename(root_dir.bdf, '.face.mat');
0031
0032 if exist(pos_path,'file'),
0033 eeg_parm.pos_file = [root_dir.eeg '/' pos_file];
0034 if ~exist(eeg_parm.pos_file,'file'),
0035 copyfile(pos_path, eeg_parm.pos_file);
0036 end
0037 else
0038 eeg_parm.pos_file = [];
0039 end
0040 if exist(face_path,'file'),
0041 eeg_parm.face_file = [root_dir.eeg '/' face_file];
0042 if ~exist(eeg_parm.face_file,'file'),
0043 copyfile(face_path, eeg_parm.face_file);
0044 end
0045 else
0046 eeg_parm.face_file = [];
0047 end
0048
0049 for n = 1:Nfile
0050
0051 eeg_parm.measurement_file = bdf_path{n};
0052
0053
0054 eeg_parm.output_file = [bdf_name{n} '.eeg.mat'];
0055 eeg_parm.bin_data_dir = ['bin_' bdf_name{n}];
0056
0057
0058 vb_job_meg(root_dir.eeg, eeg_parm);
0059 end