Home > vbmeg > functions > leadfield > spherical_harmo > vb_spherical_harmo_magnetic_field.m

vb_spherical_harmo_magnetic_field

PURPOSE ^

calculate magnetic field of spherical harmonics

SYNOPSIS ^

function B_dipole = vb_spherical_harmo_magnetic_field( Xdipole, Qdipole, N, Rmax, Xmeg, Qmeg, A )

DESCRIPTION ^

 calculate magnetic field of spherical harmonics
 [usage]
   B_dipole = vb_spherical_harmo_magnetic_field( Xdipole, Qdipole, N, Rmax, Xmeg, Qmeg, A )
 [input]
   Xdipole : coordinates of dipole current (NP x 3) NP: Number of Dipole
   Qdipole : normal vectors of dipole current (NP x 3)
       N : order of spherical function
    Rmax : radius of spherical function
    Xmeg : coordinates of sensor (Nmeg) Nmeg: Number of MEG sensor
    Qmeg : orientations of sensor (Nmeg)
       A : spherical  harmonic coefficient
 [output]
  B_dipole : magnetic field of dipole current at Xdipole
           : observed at sensor Xmeg (NP x Nmeg)
 [note]
 
 [history]
   2006.07.06 (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:

SOURCE CODE ^

0001 function  B_dipole = vb_spherical_harmo_magnetic_field( Xdipole, Qdipole, N, Rmax, Xmeg, Qmeg, A )
0002 % calculate magnetic field of spherical harmonics
0003 % [usage]
0004 %   B_dipole = vb_spherical_harmo_magnetic_field( Xdipole, Qdipole, N, Rmax, Xmeg, Qmeg, A )
0005 % [input]
0006 %   Xdipole : coordinates of dipole current (NP x 3) NP: Number of Dipole
0007 %   Qdipole : normal vectors of dipole current (NP x 3)
0008 %       N : order of spherical function
0009 %    Rmax : radius of spherical function
0010 %    Xmeg : coordinates of sensor (Nmeg) Nmeg: Number of MEG sensor
0011 %    Qmeg : orientations of sensor (Nmeg)
0012 %       A : spherical  harmonic coefficient
0013 % [output]
0014 %  B_dipole : magnetic field of dipole current at Xdipole
0015 %           : observed at sensor Xmeg (NP x Nmeg)
0016 % [note]
0017 %
0018 % [history]
0019 %   2006.07.06 (Sako) initial version
0020 %
0021 % Copyright (C) 2011, ATR All Rights Reserved.
0022 % License : New BSD License(see VBMEG_LICENSE.txt)
0023 
0024 % spherical harmonics at Xdipole
0025 YG = vb_spherical_grad(Xdipole, Qdipole, N, Rmax, 'f');
0026 
0027 % magnetic field at sensor Xmeg produced by a current at Xdipole
0028 B_dipole = vb_multi_sarvas(Xdipole,Qdipole,Xmeg,Qmeg);
0029 
0030 B_dipole = B_dipole - YG * A;
0031 
0032 return;

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