ssht_sampling_mod Module Reference

Functionality to define sample positions for various algorithms, to compute weights and to convert 1D and 2D harmonic indices. More...

Functions/Subroutines

real(dp) ssht_sampling_weight_dh (theta_t, L)
 Compute Discoll and Healy weights.
complex(dpc) ssht_sampling_weight_mw (p)
 Compute weights for toroidal extension.
subroutine ssht_sampling_gl_thetas_weights (thetas, weights, L)
 Compute theta positions (roots of Legendre polynomials) and corresponding weights.
subroutine gauleg (x1, x2, x, w, n)
 Given the lower and upper limits of integration x1 and x2, this routine returns arrays x[1..n] and w[1..n] of length n, containing the abscissas and weights of the Gauss-Legendre n-point quadrature formula.
real(dp) ssht_sampling_dh_t2theta (t, L)
 Convert theta index to angle for Driscoll and Healy sampling.
real(dp) ssht_sampling_dh_p2phi (p, L)
 Convert phi index to angle for Driscoll and Healy sampling.
real(dp) ssht_sampling_gl_p2phi (p, L)
 Convert phi index to angle for Gauss-Legendre sampling.
real(dp) ssht_sampling_mw_t2theta (t, L)
 Convert theta index to angle for McEwen and Wiaux sampling.
real(dp) ssht_sampling_mw_p2phi (p, L)
 Convert phi index to angle for McEwen and Wiaux sampling.
real(dp) ssht_sampling_mweo_t2theta (t, L)
 Convert theta index to angle for McEwen and Wiaux even-odd sampling.
real(dp) ssht_sampling_mweo_p2phi (p, L)
 Convert phi index to angle for McEwen and Wiaux even-odd sampling.
subroutine ssht_sampling_elm2ind (ind, el, m)
 Convert (el,m) harmonic indices to 1D index used to access flm array.
subroutine ssht_sampling_ind2elm (el, m, ind)
 Convert 1D index used to access flm array to (el,m) harmonic indices.

Variables

integer, parameter SSHT_SAMPLING_DH = 1
 Flag to indicate Driscoll and Healy sampling.
integer, parameter SSHT_SAMPLING_GL = 2
 Flag to indicate Gauss-Legendre sampling.
integer, parameter SSHT_SAMPLING_MW = 3
 Flag to indicate McEwen and Wiaux sampling.
integer, parameter SSHT_SAMPLING_MWEO = 4
 Flag to indicate McEwen and Wiaux sampling for even-odd algorithm.
integer, parameter SSHT_SAMPLING_DEFAULT = SSHT_SAMPLING_MW
 Flag to indicate default sampling (McEwen and Wiaux sampling).

Detailed Description

Functionality to define sample positions for various algorithms, to compute weights and to convert 1D and 2D harmonic indices.

Author:
Jason McEwen

Function/Subroutine Documentation

subroutine ssht_sampling_mod::gauleg ( real(dp),intent(in)  x1,
real(dp),intent(in)  x2,
real(dp),dimension(1:n),intent(out)  x,
real(dp),dimension(1:n),intent(out)  w,
integer,intent(in)  n 
) [private]

Given the lower and upper limits of integration x1 and x2, this routine returns arrays x[1..n] and w[1..n] of length n, containing the abscissas and weights of the Gauss-Legendre n-point quadrature formula.

Variables:

  • x1: Lower bound of range [input].
  • x2: Upper bound of range [input].
  • x: Node positions (i.e. roots of Legendre polynomials) [output].
  • w: Corresponding weights [output].
  • n: Number of points [input].
Author:
Numerical recipes.

Definition at line 208 of file ssht_sampling_mod.f90.

Referenced by ssht_sampling_gl_thetas_weights().

real(dp) ssht_sampling_mod::ssht_sampling_dh_p2phi ( integer,intent(in)  p,
integer,intent(in)  L 
)

Convert phi index to angle for Driscoll and Healy sampling.

Notes:

  • p ranges from [0 .. 2*L-2] => 2*L-1 points in [0,2*pi).

Variables:

  • p: Phi index [input].
  • L: Harmonic band-limit [input].
  • phi: Phi angle [output].
Author:
Jason McEwen

Definition at line 299 of file ssht_sampling_mod.f90.

References ssht_types_mod::PI.

Referenced by ssht_core_mod::ssht_core_dh_forward_sov_direct(), ssht_core_mod::ssht_core_dh_inverse_direct(), ssht_core_mod::ssht_core_dh_inverse_direct_factored(), and ssht_core_mod::ssht_core_dh_inverse_sov_direct().

real(dp) ssht_sampling_mod::ssht_sampling_dh_t2theta ( integer,intent(in)  t,
integer,intent(in)  L 
)
subroutine ssht_sampling_mod::ssht_sampling_elm2ind ( integer,intent(out)  ind,
integer,intent(in)  el,
integer,intent(in)  m 
)

Convert (el,m) harmonic indices to 1D index used to access flm array.

Notes:

  • el ranges from [0 .. L-1].
  • m ranges from [-el .. el].
  • ind ranges from [0 .. L**2-1].

Variables:

  • ind: 1D index to access flm array [output].
  • el: Harmonic index [input].
  • m: Azimuthal harmonic index [input].
Author:
Jason McEwen

Definition at line 486 of file ssht_sampling_mod.f90.

Referenced by ssht_test_gen_flm_complex__interface::ran2_dp(), ssht_test_gen_flm_real__interface::ran2_dp(), ssht_core_mod::ssht_core_dh_forward_sov(), ssht_core_mod::ssht_core_dh_forward_sov_direct(), ssht_core_mod::ssht_core_dh_forward_sov_sym(), ssht_core_mod::ssht_core_dh_forward_sov_sym_real(), ssht_core_mod::ssht_core_dh_inverse_direct(), ssht_core_mod::ssht_core_dh_inverse_direct_factored(), ssht_core_mod::ssht_core_dh_inverse_sov(), ssht_core_mod::ssht_core_dh_inverse_sov_direct(), ssht_core_mod::ssht_core_dh_inverse_sov_sym(), ssht_core_mod::ssht_core_dh_inverse_sov_sym_real(), ssht_core_mod::ssht_core_gl_forward_sov_sym(), ssht_core_mod::ssht_core_gl_forward_sov_sym_real(), ssht_core_mod::ssht_core_gl_inverse_sov_sym(), ssht_core_mod::ssht_core_gl_inverse_sov_sym_real(), ssht_core_mod::ssht_core_mw_forward_sov(), ssht_core_mod::ssht_core_mw_forward_sov_conv(), ssht_core_mod::ssht_core_mw_forward_sov_conv_sym(), ssht_core_mod::ssht_core_mw_forward_sov_conv_sym_real(), ssht_core_mod::ssht_core_mw_forward_sov_direct(), ssht_core_mod::ssht_core_mw_inverse_sov(), ssht_core_mod::ssht_core_mw_inverse_sov_direct(), ssht_core_mod::ssht_core_mw_inverse_sov_sym(), ssht_core_mod::ssht_core_mw_inverse_sov_sym_real(), ssht_core_mod::ssht_core_mweo_forward_sov(), ssht_core_mod::ssht_core_mweo_forward_sov_conv(), ssht_core_mod::ssht_core_mweo_forward_sov_conv_sym(), ssht_core_mod::ssht_core_mweo_forward_sov_conv_sym_real(), ssht_core_mod::ssht_core_mweo_forward_sov_direct(), ssht_core_mod::ssht_core_mweo_inverse_direct(), ssht_core_mod::ssht_core_mweo_inverse_sov(), ssht_core_mod::ssht_core_mweo_inverse_sov_direct(), ssht_core_mod::ssht_core_mweo_inverse_sov_sym(), ssht_core_mod::ssht_core_mweo_inverse_sov_sym_real(), and ssht_test__interface::ssht_test_gen_flm_complex().

real(dp) ssht_sampling_mod::ssht_sampling_gl_p2phi ( integer,intent(in)  p,
integer,intent(in)  L 
)

Convert phi index to angle for Gauss-Legendre sampling.

Notes:

  • p ranges from [0 .. 2*L-2] => 2*L-1 points in [0,2*pi).

Variables:

  • p: Phi index [input].
  • L: Harmonic band-limit [input].
  • phi: Phi angle [output].
Author:
Jason McEwen

Definition at line 329 of file ssht_sampling_mod.f90.

References ssht_types_mod::PI.

subroutine ssht_sampling_mod::ssht_sampling_gl_thetas_weights ( real(dp),dimension(0:l-1),intent(out)  thetas,
real(dp),dimension(0:l-1),intent(out)  weights,
integer,intent(in)  L 
)

Compute theta positions (roots of Legendre polynomials) and corresponding weights.

Variables:

  • thetas(0:L-1): Theta positions [output].
  • weights(0:L-1): Corresponding weights [output]
  • L: Harmonic band-limit [input].
Author:
Jason McEwen

Definition at line 169 of file ssht_sampling_mod.f90.

References gauleg().

Referenced by ssht_core_mod::ssht_core_gl_forward_sov_sym(), ssht_core_mod::ssht_core_gl_forward_sov_sym_real(), ssht_core_mod::ssht_core_gl_inverse_sov_sym(), and ssht_core_mod::ssht_core_gl_inverse_sov_sym_real().

subroutine ssht_sampling_mod::ssht_sampling_ind2elm ( integer,intent(out)  el,
integer,intent(out)  m,
integer,intent(in)  ind 
)

Convert 1D index used to access flm array to (el,m) harmonic indices.

Notes:

  • el ranges from [0 .. L-1].
  • m ranges from [-el .. el].
  • ind ranges from [0 .. L**2-1].

Variables:

  • el: Harmonic index [output].
  • m: Azimuthal harmonic index [output].
  • ind: 1D index to access flm array [input].
Author:
Jason McEwen

Definition at line 517 of file ssht_sampling_mod.f90.

Referenced by ssht_test__interface::ssht_test_gen_flm_complex().

real(dp) ssht_sampling_mod::ssht_sampling_mw_p2phi ( integer,intent(in)  p,
integer,intent(in)  L 
)

Convert phi index to angle for McEwen and Wiaux sampling.

Notes:

  • p ranges from [0 .. 2*L-2] => 2*L-1 points in [0,2*pi).

Variables:

  • p: Phi index [input].
  • L: Harmonic band-limit [input].
  • phi: Phi angle [output].
Author:
Jason McEwen

Definition at line 389 of file ssht_sampling_mod.f90.

References ssht_types_mod::PI.

Referenced by ssht_core_mod::ssht_core_mw_forward_sov_direct(), ssht_core_mod::ssht_core_mw_forward_sp(), ssht_core_mod::ssht_core_mw_inverse_sov_direct(), and ssht_core_mod::ssht_core_mw_inverse_sp().

real(dp) ssht_sampling_mod::ssht_sampling_mw_t2theta ( integer,intent(in)  t,
integer,intent(in)  L 
)

Convert theta index to angle for McEwen and Wiaux sampling.

Notes:

  • t ranges from [0 .. 2*L-2] => 2*L-1 points in (0,2*pi).

Variables:

  • t: Theta index [input].
  • L: Harmonic band-limit [input].
  • theta: Theta angle [output].
Author:
Jason McEwen

Definition at line 359 of file ssht_sampling_mod.f90.

References ssht_types_mod::PI.

Referenced by ssht_core_mod::ssht_core_mw_forward_sov_direct(), and ssht_core_mod::ssht_core_mw_inverse_sov_direct().

real(dp) ssht_sampling_mod::ssht_sampling_mweo_p2phi ( integer,intent(in)  p,
integer,intent(in)  L 
)

Convert phi index to angle for McEwen and Wiaux even-odd sampling.

Notes:

  • p ranges from [0 .. 2*L-2] => 2*L-1 points in (0,2*pi).

Variables:

  • p: Phi index [input].
  • L: Harmonic band-limit [input].
  • phi: Phi angle [output].
Author:
Jason McEwen

Definition at line 449 of file ssht_sampling_mod.f90.

References ssht_types_mod::PI.

Referenced by ssht_core_mod::ssht_core_mweo_forward_sov_direct(), ssht_core_mod::ssht_core_mweo_forward_sp(), ssht_core_mod::ssht_core_mweo_inverse_direct(), ssht_core_mod::ssht_core_mweo_inverse_sov_direct(), and ssht_core_mod::ssht_core_mweo_inverse_sp().

real(dp) ssht_sampling_mod::ssht_sampling_mweo_t2theta ( integer,intent(in)  t,
integer,intent(in)  L 
)

Convert theta index to angle for McEwen and Wiaux even-odd sampling.

Notes:

  • t ranges from [0 .. 2*L-2] => 2*L-1 points in (0,2*pi).

Variables:

  • t: Theta index [input].
  • L: Harmonic band-limit [input].
  • theta: Theta angle [output].
Author:
Jason McEwen

Definition at line 419 of file ssht_sampling_mod.f90.

References ssht_types_mod::PI.

Referenced by ssht_core_mod::ssht_core_mweo_forward_sov_direct(), ssht_core_mod::ssht_core_mweo_inverse_direct(), and ssht_core_mod::ssht_core_mweo_inverse_sov_direct().

real(dp) ssht_sampling_mod::ssht_sampling_weight_dh ( real(dp),intent(in)  theta_t,
integer,intent(in)  L 
)

Compute Discoll and Healy weights.

Variables:

  • theta_t: Theta value to compute weight for [input].
  • L: Harmonic band-limit [input].
  • w: Corresponding weight [output]
Author:
Jason McEwen

Definition at line 100 of file ssht_sampling_mod.f90.

Referenced by ssht_core_mod::ssht_core_dh_forward_sov(), ssht_core_mod::ssht_core_dh_forward_sov_direct(), ssht_core_mod::ssht_core_dh_forward_sov_sym(), and ssht_core_mod::ssht_core_dh_forward_sov_sym_real().

complex(dpc) ssht_sampling_mod::ssht_sampling_weight_mw ( integer,intent(in)  p  ) 

Variable Documentation

Flag to indicate default sampling (McEwen and Wiaux sampling).

Definition at line 64 of file ssht_sampling_mod.f90.

integer,parameter ssht_sampling_mod::SSHT_SAMPLING_DH = 1

Flag to indicate Driscoll and Healy sampling.

Definition at line 52 of file ssht_sampling_mod.f90.

integer,parameter ssht_sampling_mod::SSHT_SAMPLING_GL = 2

Flag to indicate Gauss-Legendre sampling.

Definition at line 55 of file ssht_sampling_mod.f90.

integer,parameter ssht_sampling_mod::SSHT_SAMPLING_MW = 3

Flag to indicate McEwen and Wiaux sampling.

Definition at line 58 of file ssht_sampling_mod.f90.

Flag to indicate McEwen and Wiaux sampling for even-odd algorithm.

Definition at line 61 of file ssht_sampling_mod.f90.

Generated on Mon Oct 31 01:20:06 2011 by  doxygen 1.6.3