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