[Fwd: [Eeglablist] Associated Legendre polynomial]

Robert Oostenveld roberto at smi.auc.dk
Mon Mar 8 01:23:36 PST 2004


> From: "Birju Patel" <patelb at eden.rutgers.edu>
> Date: 5 March 2004 16:46:36 GMT+01:00
> To: <eeglablist at sccn.ucsd.edu>
> Subject: [Eeglablist] Associated Legendre polynomial
>
> I've noticed that the implementation of the legendre polynomials in the
> dipole fitting plugin includes the (-1)^m phase factor in the 
> definition of
> the associated legendre polynomial of order m (the 3-shell model uses 
> order
> m=1).  However, most of the references sited in the literature of the
> 3-shell model point back to old (1930 - 1950) physics texts, where the
> associated legendre polynomial is defined without the (-1)^m factor.
>

Hi Birju

I am not sure to what part of the algorithm you are referring, to the 
plgndr function or to the eeg_leadfield4 function (actually the 4-shell 
equations are also used to compute the 3-shell model potential). The 
latter one calls plgndr and if you would leave out the (-1)^m in one 
function you would have to include it again in the other. To quote from 
mathworld (http://mathworld.wolfram.com/LegendrePolynomial.html)

"There are two sign conventions for associated Legendre polynomials. 
Some authors (e.g., Arfken 1985, pp. 668-669) omit the Condon-Shortley 
phase (-1)^m, while others include it (e.g., Abramowitz and Stegun 
1972, Press et al. 1992, and the LegendreP[l, m, z] command of 
Mathematica). Care is therefore needed in comparing polynomials 
obtained from different sources."

> Does anyone know if the 3-shell model equations change with these two
> slightly different definitions of the Legendre polynomial?

The plgndr mex function is based upon the Numerical Recipies code, and 
therefore includes it. The implemented solution for the 4-sphere model 
also assumes the (-1)^m to be in the associated Legendre polynomial.

If you want to validate the computation of the 3-sphere potential, you 
can compare it with the 1-sphere potential by taking three spheres with 
identical connductivity, e.g.

vol1.r = 1;
vol1.c = 1;
vol3.r = [0.8 0.9 1];
vol3.c = [1 1 1];
elc = rand(20,3);   % just take a random set of electrodes
elc = elc ./ repmat(sqrt(sum(elc.^2,2)),1,3);  % normalise them to ly 
on sphere
eeg_leadfield([0 0 0.5], elc, vol1)
eeg_leadfield([0 0 0.5], elc, vol3)

and compare the output of the last two (you can also call the 
eeg_leadfield1 and eeg_leadfield4 functions directly).

I hope that this answers your question.

best regards,
Robert

----------------------------------------------
Robert Oostenveld, PhD
Center for Sensory-Motor Interaction (SMI)
Aalborg University, Denmark

and

F.C. Donders Centre for Cognitive Neuroimaging
University Nijmegen
P.O. Box 9101
NL-6500 AH Nijmegen
The Netherlands

Tel: +31 (0)24 3619695
Fax: +31 (0)24 3610989







More information about the Eeglablist mailing list