Import M/EEG data and create MEG-MAT (.meg.mat) or EEG-MAT (.eeg.mat) file. (VBMEG public function) This function is available for MEG data : Yokogawa EEG data : BIOSEMI, BRAINAMP [syntax] vb_job_meg(meg_parm) vb_job_meg(proj_root, meg_parm) [old style] [input] proj_root: <<string>> VBMEG project root directory. meg_parm : <<struct>> Depend on the measurement data to be imported. @see vb_set_yokogawa_meg_parm.m @see vb_set_meg_parm_biosemi.m @see vb_set_meg_parm_brainamp.m --- fields for Yokogawa MEG data Measurement : <required> 'MEG' device : <required> 'YOKOGAWA' yokogawa_file: <required> Filename of Yokogawa MEG data. : Raw (.raw), continuous (.con), and averaged (.ave) : are supported. meg_file : <required> VBMEG MEG file (.meg.mat) that will be made. : This field must include the full extension. : MEG : ".meg.mat" : EEG : ".eeg.mat" pos_file : <optional> Sensor position file (.pos.mat). memory_max : <optional> Maximum memory size in one loading data from : yokogawa file. To calculate block size with the number of : channel. [const.DEFAULT_MEMORY_MAX (=10M)] : @see vb_meg_yokogawa_make_data.m : @see vb_define_yokogawa.m ex_ch_gain : <optional> This is applied for amplitude of external signals. [output] none [note] VBMEG MEG(.meg.mat)/EEG(.eeg.mat) file is created. [history] 2008-02-13 (Sako) support EEG 2010-05-30 Taku Yoshioka Minor change (verbose level support) 2011-02-17 (Sako) rewrote help in accordance with the latest specification 2014-08-06 (rhayashi) supported BRAINAMP data import. Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function vb_job_meg(varargin) 0002 % Import M/EEG data and create MEG-MAT (.meg.mat) or EEG-MAT (.eeg.mat) file. 0003 % (VBMEG public function) 0004 % 0005 % This function is available for 0006 % MEG data : Yokogawa 0007 % EEG data : BIOSEMI, BRAINAMP 0008 % 0009 % [syntax] 0010 % vb_job_meg(meg_parm) 0011 % vb_job_meg(proj_root, meg_parm) [old style] 0012 % 0013 % [input] 0014 % proj_root: <<string>> VBMEG project root directory. 0015 % meg_parm : <<struct>> Depend on the measurement data to be imported. 0016 % @see vb_set_yokogawa_meg_parm.m 0017 % @see vb_set_meg_parm_biosemi.m 0018 % @see vb_set_meg_parm_brainamp.m 0019 % 0020 % --- fields for Yokogawa MEG data 0021 % Measurement : <required> 'MEG' 0022 % device : <required> 'YOKOGAWA' 0023 % yokogawa_file: <required> Filename of Yokogawa MEG data. 0024 % : Raw (.raw), continuous (.con), and averaged (.ave) 0025 % : are supported. 0026 % meg_file : <required> VBMEG MEG file (.meg.mat) that will be made. 0027 % : This field must include the full extension. 0028 % : MEG : ".meg.mat" 0029 % : EEG : ".eeg.mat" 0030 % pos_file : <optional> Sensor position file (.pos.mat). 0031 % memory_max : <optional> Maximum memory size in one loading data from 0032 % : yokogawa file. To calculate block size with the number of 0033 % : channel. [const.DEFAULT_MEMORY_MAX (=10M)] 0034 % : @see vb_meg_yokogawa_make_data.m 0035 % : @see vb_define_yokogawa.m 0036 % ex_ch_gain : <optional> This is applied for amplitude of external signals. 0037 % 0038 % [output] 0039 % none 0040 % 0041 % [note] 0042 % VBMEG MEG(.meg.mat)/EEG(.eeg.mat) file is created. 0043 % 0044 % [history] 0045 % 2008-02-13 (Sako) support EEG 0046 % 2010-05-30 Taku Yoshioka 0047 % Minor change (verbose level support) 0048 % 2011-02-17 (Sako) rewrote help in accordance with the latest specification 0049 % 2014-08-06 (rhayashi) supported BRAINAMP data import. 0050 % 0051 % Copyright (C) 2011, ATR All Rights Reserved. 0052 % License : New BSD License(see VBMEG_LICENSE.txt) 0053 0054 if length(varargin) == 1 0055 proj_root = []; 0056 meg_parm = varargin{1}; 0057 elseif length(varargin) == 2 0058 proj_root = varargin{1}; 0059 meg_parm = varargin{2}; 0060 end 0061 0062 proj_root = vb_rm_trailing_slash(proj_root); 0063 0064 % --- CHECK DEVICE --- % 0065 [Measurement, Device] = vb_meg_parm_get_measurement(meg_parm); 0066 0067 if isempty(Measurement) || isempty(Device) 0068 vb_disp_nonl(sprintf('(%s) Measurement and device', mfilename)); 0069 vb_disp(sprintf(' are required parameters of meg_parm')); 0070 vb_disp(sprintf('(%s) Please check meg_parm', mfilename)); 0071 return; 0072 else 0073 Measurement = upper(Measurement); 0074 Device = upper(Device); 0075 end 0076 0077 % --- MEG --- % 0078 switch Measurement 0079 case 'MEG' 0080 switch Device 0081 case 'YOKOGAWA' 0082 vb_meg_yokogawa_make_data(proj_root, meg_parm); 0083 otherwise 0084 make_sbi_meg_data(proj_root, meg_parm); 0085 end 0086 0087 case 'EEG' 0088 switch Device 0089 case {'BIOSEMI', 'BRAINAMP'} 0090 vb_job_eeg_gateway(proj_root, meg_parm); 0091 otherwise 0092 error('(%s)unexpected Device : %s', func_, Measurement); 0093 end 0094 otherwise 0095 error('(%s)unexpected Measurement : %s', func_, Measurement); 0096 end 0097 0098 % project_file save 0099 proj_file = get_project_filename; 0100 if isempty(proj_file) 0101 return; 0102 end 0103 0104 project_file_mgr('load', proj_file); 0105 project_file_mgr('add', 'meg_parm', meg_parm); 0106 return; 0107 %%% END OF FILE %%%