module comb_obj_mod
! Uses
use comb_error_mod
use s2_types_mod
use s2_sky_mod
use s2_pl_mod
! Types
public type comb_obj
! Interfaces
public interface comb_obj_init
! Subroutines and functions
private function comb_obj_init_template (template_fun, nside, amplitude, pix_scheme_in, dilation, alpha, beta, gamma, name) result (obj)
private function comb_obj_init_mother (mother, amplitude, dilation, alpha, beta, gamma, name) result (obj)
private function comb_obj_init_copy (orig) result (copy)
public subroutine comb_obj_free (obj)
public subroutine comb_obj_conv (obj, beam)
public subroutine comb_obj_compute_alm (obj, lmax, mmax)
public subroutine comb_obj_write_sky (obj, filename, comment)
public function comb_obj_get_init (obj) result (init)
public function comb_obj_get_sky (obj) result (sky)
public function comb_obj_get_amplitude (obj) result (amplitude)
public function comb_obj_get_dilation (obj) result (dilation)
public function comb_obj_get_alpha (obj) result (alpha)
public function comb_obj_get_beta (obj) result (beta)
public function comb_obj_get_gamma (obj) result (gamma)
public function comb_obj_get_name (obj) result (name)
public function comb_obj_get_beam_status (obj) result (beam_status)
end module comb_obj_mod
Provides functionality to support and manipulate a compact object defined
on the sky.
Author: J. D. McEwen (mcewen[AT]mrao.cam.ac.uk)
Version: 0.1 August 2004
public type comb_obj
private
logical :: init = .false.
type (s2_sky) :: sky
real (kind=s2_sp) :: amplitude = 0.0e0
real (kind=s2_sp) :: dilation = 1.0e0
real (kind=s2_sp) :: alpha = 0.0e0
real (kind=s2_sp) :: beta = 0.0e0
real (kind=s2_sp) :: gamma = 0.0e0
character (len=S2_STRING_LEN) :: name = 'Not specified'
logical :: beam_status = .false.
end type comb_obj
public interface comb_obj_init
module procedure comb_obj_init_template
module procedure comb_obj_init_mother
module procedure comb_obj_init_copy
end interface comb_obj_init
private function comb_obj_init_template (template_fun, nside, amplitude, pix_scheme_in, dilation, alpha, beta, gamma, name) result (obj)
interface template_fun
function template_fun (theta, phi, param) result (val)
real (kind=s2_sp), intent(in) :: theta
real (kind=s2_sp), intent(in) :: phi
real (kind=s2_sp), optional, intent(in), dimension (:) :: param
real (kind=s2_sp) :: val
end function template_fun
end interface template_fun
integer, intent(in) :: nside
real (kind=s2_sp), intent(in) :: amplitude
integer, optional, intent(in) :: pix_scheme_in
real (kind=s2_sp), optional, intent(in) :: dilation
real (kind=s2_sp), optional, intent(in) :: alpha
real (kind=s2_sp), optional, intent(in) :: beta
real (kind=s2_sp), optional, intent(in) :: gamma
character (len=*), optional, intent(in) :: name
type (comb_obj) :: obj
! Calls: comb_error, s2_sky_dilate, s2_sky_rotate, s2_sky_scale
end function comb_obj_init_template
Initialise an obj from a template function defined over the sky.
Notes:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_init_mother
private function comb_obj_init_mother (mother, amplitude, dilation, alpha, beta, gamma, name) result (obj)
type (comb_obj), intent(in) :: mother
real (kind=s2_sp), intent(in) :: amplitude
real (kind=s2_sp), intent(in) :: dilation
real (kind=s2_sp), intent(in) :: alpha
real (kind=s2_sp), intent(in) :: beta
real (kind=s2_sp), intent(in) :: gamma
character (len=*), optional, intent(in) :: name
type (comb_obj) :: obj
! Calls: comb_error, s2_sky_dilate, s2_sky_rotate, s2_sky_scale
end function comb_obj_init_mother
Initialise obj from a mother obj. The initialised obj is a scaled,
dilated and rotated version of the mother.
Notes:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_init_copy
private function comb_obj_init_copy (orig) result (copy)
type (comb_obj), intent(in) :: orig
type (comb_obj) :: copy
! Calls: comb_error
end function comb_obj_init_copy
Initialise an obj as a copy of another obj.
Variables:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_free
public subroutine comb_obj_free (obj)
type (comb_obj), intent(inout) :: obj
! Calls: comb_error, s2_sky_free
end subroutine comb_obj_free
Free all data associated with an initialised obj and reset all other
attributes.
Variables:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_conv
public subroutine comb_obj_conv (obj, beam)
type (comb_obj), intent(inout) :: obj
type (s2_pl), intent(in) :: beam
! Calls: comb_error, s2_sky_conv
end subroutine comb_obj_conv
Apply a beam by convolving it with the obj sky.
Variables:
Author: J. D. McEwen
Version: 0.1 May 2005
comb_obj_compute_alm
public subroutine comb_obj_compute_alm (obj, lmax, mmax)
type (comb_obj), intent(inout) :: obj
integer, intent(in) :: lmax
integer, intent(in) :: mmax
! Calls: comb_error, s2_sky_compute_alm
end subroutine comb_obj_compute_alm
Compute the alms of the obj sky at the lmax and mmax specified.
Variables:
Author: J. D. McEwen
Version: 0.1 May 2005
comb_obj_write_sky
public subroutine comb_obj_write_sky (obj, filename, comment)
type (comb_obj), intent(in) :: obj
character (len=*), intent(in) :: filename
character (len=*), optional, intent(in) :: comment
! Calls: comb_error, s2_sky_write_map_file
end subroutine comb_obj_write_sky
Write an obj sky map to a fits file.
Variables:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_get_init
public function comb_obj_get_init (obj) result (init)
type (comb_obj), intent(in) :: obj
logical :: init
end function comb_obj_get_init
Get init variable from the passed comb obj.
Variables:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_get_sky
public function comb_obj_get_sky (obj) result (sky)
type (comb_obj), intent(in) :: obj
type (s2_sky) :: sky
! Calls: comb_error
end function comb_obj_get_sky
Get sky variable from the passed comb obj.
Notes:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_get_amplitude
public function comb_obj_get_amplitude (obj) result (amplitude)
type (comb_obj), intent(in) :: obj
real (kind=s2_sp) :: amplitude
! Calls: comb_error
end function comb_obj_get_amplitude
Get amplitude variable from the passed comb obj.
Variables:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_get_dilation
public function comb_obj_get_dilation (obj) result (dilation)
type (comb_obj), intent(in) :: obj
real (kind=s2_sp) :: dilation
! Calls: comb_error
end function comb_obj_get_dilation
Get dilation variable from the passed comb obj.
Variables:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_get_alpha
public function comb_obj_get_alpha (obj) result (alpha)
type (comb_obj), intent(in) :: obj
real (kind=s2_sp) :: alpha
! Calls: comb_error
end function comb_obj_get_alpha
Get alpha variable from the passed comb obj.
Variables:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_get_beta
public function comb_obj_get_beta (obj) result (beta)
type (comb_obj), intent(in) :: obj
real (kind=s2_sp) :: beta
! Calls: comb_error
end function comb_obj_get_beta
Get beta variable from the passed comb obj.
Variables:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_get_gamma
public function comb_obj_get_gamma (obj) result (gamma)
type (comb_obj), intent(in) :: obj
real (kind=s2_sp) :: gamma
! Calls: comb_error
end function comb_obj_get_gamma
Get gamma variable from the passed comb obj.
Variables:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_get_name
public function comb_obj_get_name (obj) result (name)
type (comb_obj), intent(in) :: obj
character (len=S2_STRING_LEN) :: name
! Calls: comb_error
end function comb_obj_get_name
Get name variable from the passed comb obj.
Variables:
Author: J. D. McEwen
Version: 0.1 August 2004
comb_obj_get_beam_status
public function comb_obj_get_beam_status (obj) result (beam_status)
type (comb_obj), intent(in) :: obj
logical :: beam_status
! Calls: comb_error
end function comb_obj_get_beam_status
Get beam_status variable from the passed comb obj.
Variables:
Author: J. D. McEwen
Version: 0.1 May 2005