Home > functions > leadfield > vb_job_leadfield_meg_sphere.m

vb_job_leadfield_meg_sphere

PURPOSE ^

actual worker function for MEG-SPHERE

SYNOPSIS ^

function [basis, basis_parm] = vb_job_leadfield_meg_sphere(proj_root, basis_parm)

DESCRIPTION ^

 actual worker function for MEG-SPHERE
 [usage]
   [basis, basis_parm] = vb_job_leadfield_meg_sphere(proj_root, basis_parm)
 [input]
    proj_root : <required> project root directory
   basis_parm : <required> <<struct>>
              :  data set in which the specification of calculation is defined
 [output]
   none
 [note]
   <<prior conditions>>
     1) proj_root is valid
     2) basis_parm is commonly valid
 [history]
   2007-01-26 (Sako) initial version

 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 [basis, basis_parm] = vb_job_leadfield_meg_sphere(proj_root, basis_parm)
0002 % actual worker function for MEG-SPHERE
0003 % [usage]
0004 %   [basis, basis_parm] = vb_job_leadfield_meg_sphere(proj_root, basis_parm)
0005 % [input]
0006 %    proj_root : <required> project root directory
0007 %   basis_parm : <required> <<struct>>
0008 %              :  data set in which the specification of calculation is defined
0009 % [output]
0010 %   none
0011 % [note]
0012 %   <<prior conditions>>
0013 %     1) proj_root is valid
0014 %     2) basis_parm is commonly valid
0015 % [history]
0016 %   2007-01-26 (Sako) initial version
0017 %
0018 % Copyright (C) 2011, ATR All Rights Reserved.
0019 % License : New BSD License(see VBMEG_LICENSE.txt)
0020 
0021 % --- CHECK ARGUMENTS --- %
0022 [proj_root, basis_parm] = inner_check_arguments(proj_root, basis_parm);
0023 
0024 % --- MAIN PROCEDURE --------------------------------------------------------- %
0025 %
0026 % pre-processing
0027 [Basis_mode, pick, Qpick, Wsensor, V0, V, xx] = ...
0028   vb_lf_preprocess(proj_root, basis_parm);
0029 
0030 % Change center of coordinate
0031 pick = [pick(:,1)-V0(1), pick(:,2)-V0(2), pick(:,3)-V0(3)];
0032 V    = [   V(:,1)-V0(1),    V(:,2)-V0(2),    V(:,3)-V0(3)];
0033     
0034 % Calculate current direction according to 'Basis_mode'
0035 [V,xx] = vb_current_vector(V, xx, Basis_mode);
0036 
0037 NV      = size(V,1);
0038 Npick   = size(pick,1);
0039 
0040 fprintf('--- MEG Sphere model (Sarvas)\n');
0041 
0042 BB = zeros(NV , Npick);
0043     
0044 for i=1:Npick,
0045     BB(:,i) = vb_sarvas_new(V, xx, pick(i,:), Qpick(i,:) );
0046 end
0047     
0048 basis = BB * Wsensor';
0049 %
0050 % --- END OF MAIN PROCEDURE -------------------------------------------------- %
0051 
0052 
0053 % --- INNER FUNCTIONS -------------------------------------------------------- %
0054 %
0055 function [proj_root, basis_parm] = inner_check_arguments(proj_root, basis_parm)
0056 % there is no unique points to check MEG-SPHERE
0057 return;
0058 %
0059 % --- END OF INNER FUNCTIONS ------------------------------------------------- %
0060 
0061 %%% END OF FILE %%%

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005