vec_math
Class SphericalHarmonics

java.lang.Object
  extended by vec_math.SphericalHarmonics

public class SphericalHarmonics
extends Object

Calculates spherical harmonics.


Nested Class Summary
static class SphericalHarmonics.LM
          Implementation of an l,m-tupel.
static class SphericalHarmonics.Orthogonal
          For testing of these classes, we integrate numerically in theta space.
 
Constructor Summary
SphericalHarmonics()
           
 
Method Summary
private static double normalize(int l, int mpm)
          Returns the normalization constant for Ylm
static Complex orthogonalYlm(int l, int m, double phi, double theta)
          Returns the spherical harmonics of order l and m evaluated at phi and theta as a complex.
static Complex orthonormalYlm(int l, int m, double phi, double theta)
          Returns the spherical harmonics of order l and m evaluated at phi and theta as a complex.
static double realOrthonormalYlm(int l, int m, double phi, double theta)
          Returns normalized real spherical harmonics.
static double realPlm(int l, int m, double phi, double costh)
           
static double realYlm(int l, int m, double phi, double theta)
          Returns a spherical harmonics that is real on the entire sphere.
static double realZonalOrthonormalPlm(int l, int m, double phi, double x, double xlow, double xhigh)
          Returns spherical harmonics orthonormal on a polar zone defined by two polar angles.
static double realZonalOrthonormalYlm(int l, int m, double phi, double theta, double thetalow, double thetahigh)
          Returns spherical harmonics orthogonal on a polar zone defined by two polar angles.
static double realZonalPlm(int l, int m, double phi, double x, double xlow, double xhigh)
          Returns spherical harmonics orthogonal on a polar zone defined by two polar angles.
static double realZonalYlm(int l, int m, double phi, double theta, double thetalow, double thetahigh)
          Returns spherical harmonics orthogonal on a polar zone defined by two polar angles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SphericalHarmonics

public SphericalHarmonics()
Method Detail

orthogonalYlm

public static Complex orthogonalYlm(int l,
                                    int m,
                                    double phi,
                                    double theta)
Returns the spherical harmonics of order l and m evaluated at phi and theta as a complex. This method returns non-normalized values.

Parameters:
l - angular momentum number.
m - Azimuthal wave number
phi - Azimuth angle, zero to 2π
theta - Polar angle, zero to π
Returns:
Pml(cos(theta))*e(imphi)

orthonormalYlm

public static Complex orthonormalYlm(int l,
                                     int m,
                                     double phi,
                                     double theta)
Returns the spherical harmonics of order l and m evaluated at phi and theta as a complex. This method returns normalized values to the sphere.
 sqrt((2l+1)/4pi*(l-m)!/(l+m)!)Pml(cos(θ)eim&phi
 

Parameters:
l - angular momentum number.
m - Azimuthal wave number
phi - Azimuth angle, zero to 2π
theta - Polar angle, zero to π
Returns:
Yml, orthonormal on sphere

normalize

private static double normalize(int l,
                                int mpm)
Returns the normalization constant for Ylm


realYlm

public static double realYlm(int l,
                             int m,
                             double phi,
                             double theta)
Returns a spherical harmonics that is real on the entire sphere. These functions might be used for spherical harmonics expansion. The functions are not normalized


realPlm

public static double realPlm(int l,
                             int m,
                             double phi,
                             double costh)

realOrthonormalYlm

public static double realOrthonormalYlm(int l,
                                        int m,
                                        double phi,
                                        double theta)
Returns normalized real spherical harmonics.


realZonalYlm

public static double realZonalYlm(int l,
                                  int m,
                                  double phi,
                                  double theta,
                                  double thetalow,
                                  double thetahigh)
Returns spherical harmonics orthogonal on a polar zone defined by two polar angles. You will use that for function expansion, because these are faster than normalized ones.


realZonalPlm

public static double realZonalPlm(int l,
                                  int m,
                                  double phi,
                                  double x,
                                  double xlow,
                                  double xhigh)
Returns spherical harmonics orthogonal on a polar zone defined by two polar angles. Arguments are alread cosined.


realZonalOrthonormalYlm

public static double realZonalOrthonormalYlm(int l,
                                             int m,
                                             double phi,
                                             double theta,
                                             double thetalow,
                                             double thetahigh)
Returns spherical harmonics orthogonal on a polar zone defined by two polar angles. You will use that if the coefficients of your function expansion has to be defined for orthonormal harmonics. This is interesting if they are further processed, like in spectral analysis.


realZonalOrthonormalPlm

public static double realZonalOrthonormalPlm(int l,
                                             int m,
                                             double phi,
                                             double x,
                                             double xlow,
                                             double xhigh)
Returns spherical harmonics orthonormal on a polar zone defined by two polar angles. You will use that if the coefficients of your function expansion has to be defined for orthonormal harmonics. This is interesting if they are further processed, like in spectral analysis.