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

vb_meginfo_get_calibinfo

PURPOSE ^

return CalibInfo struct from MEGinfo for calibration

SYNOPSIS ^

function [calib_info] = vb_meginfo_get_calibinfo( meg_info )

DESCRIPTION ^

 return CalibInfo struct from MEGinfo for calibration

 [usage]
   [calib_info] = vb_meginfo_get_calibinfo( meg_info )

 [input]
     meg_info : <required> which must have a "CalibInfo" field
              :  If this is empty or invalid (which does not have CalibInfo
              :  field etc), return empty.

 [output]
   calib_info : <<struct>> meg_info.CalibInfo as it be
              :  .channel_id    [n_channel x 1]
              :  .sensor_gain   [n_channel x 1]
              :  .sensor_offset [n_channel x 1]
              :  .FLL_gain      [n_fll x 1]
              :  .data_bit_len  [1 x 1]
              :  .analog_range  [1 x 1] [VOLT]

 [note]
   The meg_info.calib_info is different from the original calib_info 
   loaded by getYkgwHdrCalib function.

 [history]
   2011-07-08 (Sako) initial version

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [calib_info] = vb_meginfo_get_calibinfo( meg_info )
0002 % return CalibInfo struct from MEGinfo for calibration
0003 %
0004 % [usage]
0005 %   [calib_info] = vb_meginfo_get_calibinfo( meg_info )
0006 %
0007 % [input]
0008 %     meg_info : <required> which must have a "CalibInfo" field
0009 %              :  If this is empty or invalid (which does not have CalibInfo
0010 %              :  field etc), return empty.
0011 %
0012 % [output]
0013 %   calib_info : <<struct>> meg_info.CalibInfo as it be
0014 %              :  .channel_id    [n_channel x 1]
0015 %              :  .sensor_gain   [n_channel x 1]
0016 %              :  .sensor_offset [n_channel x 1]
0017 %              :  .FLL_gain      [n_fll x 1]
0018 %              :  .data_bit_len  [1 x 1]
0019 %              :  .analog_range  [1 x 1] [VOLT]
0020 %
0021 % [note]
0022 %   The meg_info.calib_info is different from the original calib_info
0023 %   loaded by getYkgwHdrCalib function.
0024 %
0025 % [history]
0026 %   2011-07-08 (Sako) initial version
0027 
0028 if ~exist('meg_info', 'var'), meg_info = []; end
0029 
0030 calib_info = [];
0031 
0032 if isempty(meg_info), return; end
0033 if ~isfield(meg_info, 'CalibInfo') || isempty(meg_info.CalibInfo)
0034   return;
0035 end
0036 calib_info = meg_info.CalibInfo;
0037 return;
0038 
0039 % --- END OF FILE --- %

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