module s2_ylm_mod
! Uses
use s2_types_mod
use s2_error_mod
use s2_dl_mod
use s2_sky_mod
! Variables
integer, public, parameter :: S2_YLM_EVAL_METHOD_LEG = 1
integer, public, parameter :: S2_YLM_EVAL_METHOD_WIG = 2
integer, public, parameter :: S2_YLM_REALITY_REAL = 1
integer, public, parameter :: S2_YLM_REALITY_IMAG = 2
integer, public, parameter :: S2_YLM_REALITY_ABS = 3
! Subroutines and functions
public function s2_ylm_sky (el, m, nside, reality, pix_scheme_in, method_in) result (ylm)
private function s2_ylm_eval_wig (el, m, theta, phi) result (ylm)
public function s2_ylm_eval_leg (el, m, theta, phi) result (ylm)
private function s2_ylm_plm (el, m, x) result (plm)
private function logfact (n) result (logfactn)
end module s2_ylm_mod
Provides functionality to compute spherical harmonic functions.
Author: J. D. McEwen (mcewen@mrao.cam.ac.uk)
Version: 0.1 February 2008
integer, public, parameter :: S2_YLM_EVAL_METHOD_LEG = 1Evalute ylms using associated Legendre functions.
integer, public, parameter :: S2_YLM_EVAL_METHOD_WIG = 2Evaluate ylms using Wigner functions.
integer, public, parameter :: S2_YLM_REALITY_REAL = 1Evaluate real part of ylms.
integer, public, parameter :: S2_YLM_REALITY_IMAG = 2Evaluate imaginary part of ylms.
integer, public, parameter :: S2_YLM_REALITY_ABS = 3Evaluate absolute value of ylms.
public function s2_ylm_sky (el, m, nside, reality, pix_scheme_in, method_in) result (ylm)
integer, intent(in) :: el
integer, intent(in) :: m
integer, intent(in) :: nside
integer, intent(in) :: reality
integer, optional, intent(in) :: pix_scheme_in
integer, optional, intent(in) :: method_in
type (s2_sky) :: ylm
! Calls: pix2ang_nest, pix2ang_ring, s2_error
end function s2_ylm_sky
Evaluate spherical harmonic function Ylm over full sky.
Variables:
Author: J. D. McEwen
Version: 0.1 February 2008
s2_ylm_eval_wig
private function s2_ylm_eval_wig (el, m, theta, phi) result (ylm)
integer, intent(in) :: el
integer, intent(in) :: m
real (kind=s2_dp), intent(in) :: theta
real (kind=s2_dp), intent(in) :: phi
complex (kind=s2_dpc) :: ylm
! Calls: s2_dl_beta_operator, s2_error
end function s2_ylm_eval_wig
Evaluate spherical harmonic function Ylm at specified value of theta
and phi using Wigner dlmn function evaluations.
Notes:
Author: J. D. McEwen
Version: 0.1 February 2008
s2_ylm_eval_leg
public function s2_ylm_eval_leg (el, m, theta, phi) result (ylm)
integer, intent(in) :: el
integer, intent(in) :: m
real (kind=s2_dp), intent(in) :: theta
real (kind=s2_dp), intent(in) :: phi
complex (kind=s2_dpc) :: ylm
end function s2_ylm_eval_leg
Evaluate spherical harmonic function Ylm at specified value of theta
and phi using associated Legendre function evaluations.
Variables:
Author: J. D. McEwen
Version: 0.1 February 2008
s2_ylm_plm
private function s2_ylm_plm (el, m, x) result (plm)
integer, intent(in) :: el
integer, intent(in) :: m
real (kind=s2_dp), intent(in) :: x
real (kind=s2_dp) :: plm
! Calls: s2_error
end function s2_ylm_plm
Computes the associated Legendre function for x, l and m.
Adapted from numerical recipes.
Notes:
Author: J. D. McEwen
Version: 0.1 June 2005
logfact
private function logfact (n) result (logfactn)
integer, intent(in) :: n
real (kind=s2_dp) :: logfactn
! Calls: s2_error
end function logfact
Computes the natural logarithm of an (integer) factorial.
Variables:
Author: J. D. McEwen
Version: 0.1 October 2007