Home > vbmeg > demo > test_scripts > yokogawa_readfunc > vb_read_yokogawa_source_info.m

vb_read_yokogawa_source_info

PURPOSE ^

[IN]

SYNOPSIS ^

function [source] = vb_read_yokogawa_source_info(fid)

DESCRIPTION ^

 [IN]
   fid : file id
 [OUT]
   source  : N structures of source information
             (N: number of sample point when ECD is estimated.)
       .source_model_name  : 'DipoleModel'
       .sample_no          : sample number when source is estimated.
       .conductor_model    : []
       .gof                : GOF
       .correlation        : correlation
       .confidence_ratio   : []
       .confidence_volume  : []
       .dipole_count       : dipole count at the sample number
       .current_dipole     : (dipole count) structures of estimated dipole infomation
                .x, .y, .z   : dipole position [m] in MEG coordinate
                .zdir, xdir  : dipole direction [deg]
                .intensity   : dipole intensity [Am]

 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:

SOURCE CODE ^

0001 function [source] = vb_read_yokogawa_source_info(fid)
0002 % [IN]
0003 %   fid : file id
0004 % [OUT]
0005 %   source  : N structures of source information
0006 %             (N: number of sample point when ECD is estimated.)
0007 %       .source_model_name  : 'DipoleModel'
0008 %       .sample_no          : sample number when source is estimated.
0009 %       .conductor_model    : []
0010 %       .gof                : GOF
0011 %       .correlation        : correlation
0012 %       .confidence_ratio   : []
0013 %       .confidence_volume  : []
0014 %       .dipole_count       : dipole count at the sample number
0015 %       .current_dipole     : (dipole count) structures of estimated dipole infomation
0016 %                .x, .y, .z   : dipole position [m] in MEG coordinate
0017 %                .zdir, xdir  : dipole direction [deg]
0018 %                .intensity   : dipole intensity [Am]
0019 %
0020 % Copyright (C) 2011, ATR All Rights Reserved.
0021 % License : New BSD License(see VBMEG_LICENSE.txt)
0022 
0023 source_info  =   GetMeg160SourceInfoM( fid );
0024 %   source_info        : (N) structures of source information. (N: number of sample point when ECD is estimated)
0025 %                       .sample_no          : sample no when source is estimated
0026 %                       .gof                : GOF
0027 %                       .correlation        : correlation
0028 %                       .dipole_count       : dipole count at the sample_no
0029 %                       .current_dipole     : (dipole count) structures of estimated dipole infomation
0030 %                               .x, .y, .z      : dipole position [m] in MEG coordinate
0031 %                               .zdir, xdir     : dipole direction [deg]
0032 %                               .intensity      : dipole intensity [Am]
0033 if isempty( source_info )
0034     source = [];
0035 else
0036     source_info_cnt = length(source_info);
0037     for no = 1:source_info_cnt
0038         source_model_name = 'DipoleModel';
0039         sample_no = source_info(no).sample_no;
0040         conductor_model = [];
0041         gof = source_info(no).gof;
0042         correlation = source_info(no).correlation;
0043         confidence_ratio = [];
0044         confidence_volume = [];
0045         dipole_count = source_info(no).dipole_count;
0046         clear current_dipole;
0047         for ecd_no = 1:dipole_count
0048             dipole_x = source_info(no).current_dipole(ecd_no).x;
0049             dipole_y = source_info(no).current_dipole(ecd_no).y;
0050             dipole_z = source_info(no).current_dipole(ecd_no).z;
0051             dipole_zdir = source_info(no).current_dipole(ecd_no).zdir;
0052             dipole_xdir = source_info(no).current_dipole(ecd_no).xdir;
0053             dipole_intensity = source_info(no).current_dipole(ecd_no).intensity;
0054             current_dipole(ecd_no) = struct('x'        , dipole_x, 'y'        , dipole_y   , 'z'        , dipole_z, ...
0055                                             'zdir'     , dipole_zdir, 'xdir'  , dipole_xdir, 'intensity', dipole_intensity );
0056         end
0057         source(no) = struct( 'source_model_name', source_model_name, ...
0058                              'sample_no'        , sample_no, ...
0059                              'conductor_model'  , conductor_model, ...
0060                              'gof'              , gof, ...
0061                              'correlation'      , correlation, ...
0062                              'confidence_ratio' , confidence_ratio, ...
0063                              'confidence_volume', confidence_volume, ...
0064                              'dipole_count'     , dipole_count, ...
0065                              'current_dipole'   , current_dipole );
0066      end
0067  end

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