Home > vbmeg > functions > device > meg > vb_meginfo_load_data_bit_len.m

vb_meginfo_load_data_bit_len

PURPOSE ^

load data bit length from yokogawa file

SYNOPSIS ^

function [bit_len] = vb_meginfo_load_data_bit_len(meg_info)

DESCRIPTION ^

 load data bit length from yokogawa file

 [usage]
   [bit_len] = vb_meginfo_load_data_bit_len(meg_info)

 [input]
   meg_info : <required> <<struct>> MEG header information

 [output]
    bit_len : loaded data bit length

 [note]
   if given MEGinfo does not have acquisition file field, return empty
 
   See also:
     getYkgwHdrCalib

 [history]
   2007-06-12 (Sako) initial version
   2007-08-22 (Sako) modified name of yokogawa_lib function
   2008-06-16 (Sako) modified adding fclose
   2011-06-23 (Sako) modified to use the new YOKOGAWA library

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function [bit_len] = vb_meginfo_load_data_bit_len(meg_info)
0002 % load data bit length from yokogawa file
0003 %
0004 % [usage]
0005 %   [bit_len] = vb_meginfo_load_data_bit_len(meg_info)
0006 %
0007 % [input]
0008 %   meg_info : <required> <<struct>> MEG header information
0009 %
0010 % [output]
0011 %    bit_len : loaded data bit length
0012 %
0013 % [note]
0014 %   if given MEGinfo does not have acquisition file field, return empty
0015 %
0016 %   See also:
0017 %     getYkgwHdrCalib
0018 %
0019 % [history]
0020 %   2007-06-12 (Sako) initial version
0021 %   2007-08-22 (Sako) modified name of yokogawa_lib function
0022 %   2008-06-16 (Sako) modified adding fclose
0023 %   2011-06-23 (Sako) modified to use the new YOKOGAWA library
0024 %
0025 % Copyright (C) 2011, ATR All Rights Reserved.
0026 % License : New BSD License(see VBMEG_LICENSE.txt)
0027 
0028 % --- CHECK ARGUMENTS --- %
0029 if ~exist('meg_info', 'var'), meg_info = []; end
0030 [meg_info] = inner_check_arguments(meg_info);
0031 
0032 % --- MAIN PROCEDURE --------------------------------------------------------- %
0033 %
0034 
0035 % --- CONSTANTS
0036 acq_file = vb_meginfo_get_acqfile(meg_info);
0037 
0038 if isempty(acq_file)
0039   bit_len = [];
0040   return;
0041 end
0042 
0043 calib = getYkgwHdrCalib(acq_file);
0044 bit_len = calib.ad.bit;
0045 
0046 return;
0047 %
0048 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0049 
0050 
0051 % --- INNER FUNCTIONS -------------------------------------------------------- %
0052 %
0053 % --- inner_check_arguments()
0054 %
0055 function [meg_info] = inner_check_arguments(meg_info)
0056 
0057 func_ = mfilename;
0058 
0059 if isempty(meg_info)
0060   error('(%s)meg_info is a required parameter', func_);
0061 end
0062 %
0063 % --- end of inner_check_arguments()
0064 %
0065 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0066 
0067 % --- END OF FILE --- %

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005