/QRealHarmonics [ module ]

[ Top ] [ module ]

NAME

QRealHarmonics

AUTHOR

W. Hergert

PACKAGE

QPack.m

USAGE

QRealHarmonics[l_,m_,theta_,phi_] construction of real harmonics

INPUT

OUTPUT

real linear combination of spherical harmonics

LITERATURE

SOURCE

27 QRealHarmonics[l_,m_,\[Theta]_,\[Phi]_]:=Module[{y1,y2,sp,sp1},y1=SphericalHarmonicY[l,m,\[Theta],\[Phi]];y2=SphericalHarmonicY[l,-m,\[Theta],\[Phi]];
28 If[m==0,
29 sp=y1,
30 If[m>0,
31 sp=(y1+(-1)^m y2 )/Sqrt[2],
32 sp=(y2-(-1)^m y1)/(I Sqrt[2])]];sp1=FullSimplify[sp];
33 Return[sp1]
34 ]