load data from yokogawa file, and store the loaded data in binary format [usage] [data] = vb_meg_yokogawa_store_bin(ykgwfile, ... meg_info, out_base, verbose_swt) [input] ykgwfile : <required> yokogawa file meg_info : <required> <<struct>> meg information out_base : <required> base directory of data directory : normally, it is the path of new MEG-MAT file. verbose_swt : <optional> switch to output verbose message [true] [output] data : acquired data [n_channel x n_sample x n_trial] [note] See also vb_meg_yokogawa_store_bin_channel [history] 2007-06-12 (Sako) initial version 2007-08-22 (Sako) changed stored directory specification 2009-06-23 (Sako) changed to store data of 'Evoked_Raw' by channel 2011-02-17 (Sako) added new argument 'out_base' 2011-06-22 (Sako) modified to fit the new YOKOGAWA library Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [data] = vb_meg_yokogawa_store_bin(ykgwfile, ... 0002 meg_info, out_base, verbose_swt) 0003 % load data from yokogawa file, and store the loaded data in binary format 0004 % 0005 % [usage] 0006 % [data] = vb_meg_yokogawa_store_bin(ykgwfile, ... 0007 % meg_info, out_base, verbose_swt) 0008 % 0009 % [input] 0010 % ykgwfile : <required> yokogawa file 0011 % meg_info : <required> <<struct>> meg information 0012 % out_base : <required> base directory of data directory 0013 % : normally, it is the path of new MEG-MAT file. 0014 % verbose_swt : <optional> switch to output verbose message [true] 0015 % 0016 % [output] 0017 % data : acquired data [n_channel x n_sample x n_trial] 0018 % 0019 % [note] 0020 % See also 0021 % vb_meg_yokogawa_store_bin_channel 0022 % 0023 % [history] 0024 % 2007-06-12 (Sako) initial version 0025 % 2007-08-22 (Sako) changed stored directory specification 0026 % 2009-06-23 (Sako) changed to store data of 'Evoked_Raw' by channel 0027 % 2011-02-17 (Sako) added new argument 'out_base' 0028 % 2011-06-22 (Sako) modified to fit the new YOKOGAWA library 0029 % 0030 % Copyright (C) 2011, ATR All Rights Reserved. 0031 % License : New BSD License(see VBMEG_LICENSE.txt) 0032 0033 % --- CHECK ARGUMENTS --- % 0034 % if ~exist('fid', 'var'), fid = []; end 0035 if ~exist('ykgwfile', 'var'), ykgwfile = ''; end 0036 if ~exist('meg_info', 'var'), meg_info = []; end 0037 if ~exist('out_base', 'var'), out_base = ''; end 0038 if ~exist('verbose_swt', 'var'), verbose_swt = []; end 0039 0040 [ykgwfile, meg_info, out_base, VERBOSE] = ... 0041 inner_check_arguments(ykgwfile, meg_info, out_base, verbose_swt); 0042 0043 % --- MAIN PROCEDURE --------------------------------------------------------- % 0044 % 0045 [data] = ... 0046 vb_meg_yokogawa_store_bin_channel(ykgwfile, meg_info, out_base, verbose_swt); 0047 return; 0048 % 0049 % --- END OF MAIN PROCEDURE -------------------------------------------------- % 0050 0051 0052 % --- INNER FUNCTIONS -------------------------------------------------------- % 0053 % 0054 % --- inner_check_arguments() 0055 % 0056 function [ykgwfile, meg_info, out_base, verbose_swt] = ... 0057 inner_check_arguments(ykgwfile, meg_info, out_base, verbose_swt) 0058 0059 func_ = mfilename; 0060 0061 if isempty(ykgwfile) 0062 error('(%s) ykgwfile is a required parameter', func_); 0063 end 0064 0065 if isempty(meg_info) 0066 error('(%s) meg_info is a required parameter', func_); 0067 end 0068 0069 if isempty(out_base) 0070 error('(%s) out_base is a required parameter', func_); 0071 end 0072 0073 if isempty(vb_meginfo_get_acqtype(meg_info)) 0074 error('(%s) MEGinfo does not have ''acq_type'' field', func_); 0075 end 0076 0077 if isempty(verbose_swt) 0078 verbose_swt = true; 0079 end 0080 return; 0081 % 0082 % --- end of inner_check_arguments() 0083 % 0084 % --- END OF INNER FUNCTIONS ------------------------------------------------- % 0085 0086 % --- END OF FILE --- %