Data Types | Public Member Functions | Private Attributes | List of all members
bianchi2_sky_mod Module Reference

Provides functionality to simulate a Bianchi2 VII_h model of the CMB, incorporating a cosmological constant. Uses the s2_sky module to create healpix sky maps. More...

Data Types

type  bianchi2_sky
 Bianchi 2 sky object that contains parameters and simulated sky. More...
 

Public Member Functions

type(bianchi2_sky) function, public bianchi2_sky_init (omega_matter_in, omega_lambda_in, h, zE_in, wH, rhand, nside)
 Initialise bianchi2 object by performing a bianchi2 simulation that incorporates a cosmological constant. More...
 
type(bianchi2_sky) function, public bianchi2_sky_init_alm (omega_matter_in, omega_lambda_in, h, zE_in, wH, rhand, nside, lmax, Ntheta, alpha, beta, gamma, lut)
 Initialise parameters passed as arguments. More...
 
subroutine, public bianchi2_sky_free (b)
 Free all memory associated with a bianchi2 object. More...
 
subroutine, public bianchi2_sky_param_write (b)
 Write parameters of the Bianchi2 simulation to standard output. More...
 
subroutine, public bianchi2_sky_compute_map (b, nside)
 Compute the map of the bianchi2 sky, assuming the alms are already defined. More...
 
subroutine, public bianchi2_sky_compute_alm (b, lmax, mmax)
 Compute the alm of the bianchi2 sky, assuming the map is already defined. More...
 
subroutine, public bianchi2_sky_compute_cl (b, lmax, Cl)
 Compute the power spectrum Cl of a bianchi2 sky object. Alms must already be computed. More...
 
type(s2_sky) function, public bianchi2_sky_get_sky (b)
 Get sky variable from the passed bianchi2 object. More...
 
subroutine, public bianchi2_sky_get_alm (b, alm)
 Get alms contained in a bianchi2 sky object. Alms must already be computed. More...
 
subroutine, public bianchi2_sky_apply_beam (b, fwhm, lmax)
 Apply Gaussian beam with specified FWHM. (FWHM must be passed in arcmin.) More...
 
subroutine, public bianchi2_sky_write (b, filename, file_type, comment)
 Write the bianchi2 simulated sky to a file. More...
 
subroutine, public bianchi2_sky_write_cl (Cl, lmax, rescale_Cl, filename)
 Write the bianchi2 simulated power spectrum to a file. More...
 
subroutine, public bianchi2_sky_rotate (b, alpha, beta, gamma, lmax, nside, rotation_alm)
 Rotate the simulated sky of the bianchi2 object. More...
 
subroutine get_results (tstop_use, R_final, RH_final, cos_bit_final, sin_bit_final)
 This returns the values found at the end of the integral. More...
 
subroutine fcn (t, vars, ff)
 
subroutine out (t, vals)
 
subroutine get_tau (tau_needed)
 
real(s2_dp) function f1r (a)
 
real(s2_dp) function bianchi2_sky_comp_ix (l, lmax, Ntheta, X_grid, lut)
 Compute IA and IB integrals required in Bianchi2 simulation. More...
 

Private Attributes

real(s2_dp), parameter bianchi2_cmb_t = 2.725d3
 CMB T to convert Delta_T / T map to just Delta_T map. More...
 

Detailed Description

Provides functionality to simulate a Bianchi2 VII_h model of the CMB, incorporating a cosmological constant. Uses the s2_sky module to create healpix sky maps.

Authors
Jason McEwen
Anthony Lasenby

Definition at line 31 of file bianchi2_sky_mod.f90.

Member Function/Subroutine Documentation

subroutine, public bianchi2_sky_mod::bianchi2_sky_apply_beam ( type(bianchi2_sky), intent(inout)  b,
real(s2_sp), intent(in)  fwhm,
integer, intent(in)  lmax 
)

Apply Gaussian beam with specified FWHM. (FWHM must be passed in arcmin.)

Note
Error occurs if alms are not already computed.
Parameters
[in,out]bBianchi2 object containing sky that is to be comvolved with the beam.
[in]fwhmGaussian beam FWHM to use (specified in arcmin).
[in]lmaxMaximum harmonic l to consider.
Authors
Jason McEwen

Definition at line 870 of file bianchi2_sky_mod.f90.

Referenced by bianchi2_sim().

real(s2_dp) function bianchi2_sky_mod::bianchi2_sky_comp_ix ( integer, intent(in)  l,
integer, intent(in)  lmax,
integer, intent(in)  Ntheta,
real(s2_dp), dimension(0:), intent(in)  X_grid,
type(bianchi2_lut), intent(in), optional  lut 
)

Compute IA and IB integrals required in Bianchi2 simulation.

Parameters
[in]lHarmonic l to compute IA_l or IB_l for.
[in]NthetaNumber of terms in use in the integration.
[in]X_gridContains the values A_grid(itheta) or B_grid(itheta).
[in]lutOptional LUT containing precomputed associated Legendre functions.
Return values
IXValue of the integral.
Authors
Thibaut Josset

Definition at line 1393 of file bianchi2_sky_mod.f90.

References bianchi2_lut_mod::bianchi2_lut_access(), and bianchi2_lut_mod::bianchi2_lut_plgndr().

Referenced by bianchi2_sky_init_alm().

subroutine, public bianchi2_sky_mod::bianchi2_sky_compute_alm ( type(bianchi2_sky), intent(inout)  b,
integer, intent(in)  lmax,
integer, intent(in)  mmax 
)

Compute the alm of the bianchi2 sky, assuming the map is already defined.

Parameters
[in,out]bBianchi2 object containing sky to compute alms of.
[in]lmaxMaximum harmonic l to consider when computing alms. [in] mmax Maximum harmonic m to consider when computing alms.
Authors
Jason McEwen

Definition at line 731 of file bianchi2_sky_mod.f90.

References bianchi2_error_mod::bianchi2_error().

Referenced by bianchi2_sim(), and bianchi2_sky_rotate().

subroutine, public bianchi2_sky_mod::bianchi2_sky_compute_cl ( type(bianchi2_sky), intent(in)  b,
integer, intent(in)  lmax,
real(s2_sp), dimension(0:lmax), intent(out Cl 
)

Compute the power spectrum Cl of a bianchi2 sky object. Alms must already be computed.

Parameters
[in]bBianchi2 object containing sky that in turn contained the alms used to compute the power spectrum.
[in]lmaxMaximum harmonic l to consider to get the alms and to compute the power spectrum.
[in,out]ClPower spectrum of simulated bianchi map.
Authors
Thibaut Josset

Definition at line 763 of file bianchi2_sky_mod.f90.

References bianchi2_error_mod::bianchi2_error().

Referenced by bianchi2_sim().

subroutine, public bianchi2_sky_mod::bianchi2_sky_compute_map ( type(bianchi2_sky), intent(inout)  b,
integer, intent(in)  nside 
)

Compute the map of the bianchi2 sky, assuming the alms are already defined.

Parameters
[in,out]bBianchi2 object containing alms to compute map of.
[in]nsideHealpix nside to compute map at.
Authors
Jason McEwen

Definition at line 701 of file bianchi2_sky_mod.f90.

References bianchi2_error_mod::bianchi2_error().

Referenced by bianchi2_sim(), and bianchi2_sky_rotate().

subroutine, public bianchi2_sky_mod::bianchi2_sky_free ( type(bianchi2_sky), intent(inout)  b)

Free all memory associated with a bianchi2 object.

Parameters
[in,out]bBianchi2 object to free.
Authors
Jason McEwen

Definition at line 640 of file bianchi2_sky_mod.f90.

References bianchi2_error_mod::bianchi2_error().

Referenced by bianchi2_sim().

subroutine, public bianchi2_sky_mod::bianchi2_sky_get_alm ( type(bianchi2_sky), intent(in)  b,
complex(s2_spc), dimension(:,:), intent(out alm 
)

Get alms contained in a bianchi2 sky object. Alms must already be computed.

Note
Error occurs if alms are not already computed.
Parameters
[in]bBianchi2 object containing sky that in turn contained the alms to get.
Return values
almAlms of simulated bianchi map extracted.
Authors
Jason McEwen

Definition at line 838 of file bianchi2_sky_mod.f90.

References bianchi2_error_mod::bianchi2_error().

Referenced by bianchi2_sky_rotate().

type(s2_sky) function, public bianchi2_sky_mod::bianchi2_sky_get_sky ( type(bianchi2_sky), intent(in)  b)

Get sky variable from the passed bianchi2 object.

Note
Initialises a new sky as a copy of the bianchi2 sky.
The returned sky is subsequently independed of the sky stored herein and should be freed by the calling routine at some point.
Parameters
[in]bBianchi2 object containing sky to get.
Return values
skyObject sky variable returned.
Authors
Jason McEwen

Definition at line 807 of file bianchi2_sky_mod.f90.

type(bianchi2_sky) function, public bianchi2_sky_mod::bianchi2_sky_init ( real(s2_dp), intent(in)  omega_matter_in,
real(s2_dp), intent(in)  omega_lambda_in,
real(s2_dp), intent(in)  h,
real(s2_dp), intent(in)  zE_in,
real(s2_dp), intent(in)  wH,
logical, intent(in)  rhand,
integer, intent(in)  nside 
)

Initialise bianchi2 object by performing a bianchi2 simulation that incorporates a cosmological constant.

Parameters
[in]omega_matter_inInput omega_matter parameter (see bianchi2 data type for explanation).
[in]omega_lambda_inInput omega_lambda parameter (see bianchi2 data type for explanation).
[in]hInput h parameter (see bianchi2 data type for explanation).
[in]zE_inInput zE parameter (see bianchi2 data type for explanation).
[in]wHInput wH parameter (see bianchi2 data type for explanation).
[in]rhandLogical to specify handedness of map.
[in]nsideNside of Healpix map to generate.
Return values
bInitialised bianchi2 object with simulated map calculated.
Authors
Jason McEwen
Anthony Lasenby

Definition at line 142 of file bianchi2_sky_mod.f90.

References bianchi2_error_mod::bianchi2_error(), get_results(), and get_tau().

Referenced by bianchi2_sim().

type(bianchi2_sky) function, public bianchi2_sky_mod::bianchi2_sky_init_alm ( real(s2_dp), intent(in)  omega_matter_in,
real(s2_dp), intent(in)  omega_lambda_in,
real(s2_dp), intent(in)  h,
real(s2_dp), intent(in)  zE_in,
real(s2_dp), intent(in)  wH,
logical, intent(in)  rhand,
integer, intent(in)  nside,
integer, intent(in)  lmax,
integer, intent(in)  Ntheta,
real(s2_sp), intent(in), optional  alpha,
real(s2_sp), intent(in), optional  beta,
real(s2_sp), intent(in), optional  gamma,
type(bianchi2_lut), intent(in), optional  lut 
)

Initialise parameters passed as arguments.

Set handedness sign. Set global data. Checked this and ring is indeed indexed from 1. Initialise bianchi2 object by performing a bianchi2 simulation that incorporates a cosmological constant, where the simulation is computed in harmonic space.

Parameters
[in]omega_matter_inInput omega_matter parameter (see bianchi2 data type for explanation).
[in]omega_lambda_in,:Input omega_lambda parameter (see bianchi2 data type for explanation).
[in]hInput h parameter (see bianchi2 data type for explanation).
[in]zE_inInput zE parameter (see bianchi2 data type for explanation).
[in]wHInput wH parameter (see bianchi2 data type for explanation).
[in]rhandLogical to specify handedness of map.
[in]nsideNside of Healpix map to generate.
[in]lmaxMaximum harmonic l to consider.
[in]NthetaNumber of terms in use in the integrations IA and IB.
[in]alphaAlpha Euler angle of the rotation.
[in]betaBeta Euler angle of the rotation.
[in]gammaGamma Euler angle of the rotation.
[in]lutOptional LUT containing precomputed associated Legendre functions.
Return values
bInitialised bianchi2 object with simulated map calculated.
Authors
Thibaut Josset

Definition at line 366 of file bianchi2_sky_mod.f90.

References bianchi2_error_mod::bianchi2_error(), bianchi2_sky_comp_ix(), get_results(), and get_tau().

Referenced by bianchi2_sim().

subroutine, public bianchi2_sky_mod::bianchi2_sky_param_write ( type(bianchi2_sky), intent(in)  b)

Write parameters of the Bianchi2 simulation to standard output.

Variables:

Parameters
[in,out]bBianchi2 object containing parameter attributes to write.
Authors
Jason McEwen

Definition at line 675 of file bianchi2_sky_mod.f90.

Referenced by bianchi2_sim().

subroutine, public bianchi2_sky_mod::bianchi2_sky_rotate ( type(bianchi2_sky), intent(inout)  b,
real(s2_sp), intent(in), optional  alpha,
real(s2_sp), intent(in), optional  beta,
real(s2_sp), intent(in), optional  gamma,
integer, intent(in)  lmax,
integer, intent(in)  nside,
logical, intent(in)  rotation_alm 
)

Rotate the simulated sky of the bianchi2 object.

Parameters
[in,out]bBianchi2 object containing sky to be rotated.
[in]alphaAlpha Euler angle of the rotation.
[in]betaBeta Euler angle of the rotation.
[in]gammaGamma Euler angle of the rotation.
[in]lmaxMaximum harmonic l to consider.
[in]nsideHealpix nside to compute map at.
[in]rotation_almLogical to specify the space used for the rotation (if true perform rotation in harmonic space).
Authors
Jason McEwen
Thibaut Josset

Definition at line 999 of file bianchi2_sky_mod.f90.

References bianchi2_error_mod::bianchi2_error(), bianchi2_sky_compute_alm(), bianchi2_sky_compute_map(), and bianchi2_sky_get_alm().

Referenced by bianchi2_sim().

subroutine, public bianchi2_sky_mod::bianchi2_sky_write ( type(bianchi2_sky), intent(inout)  b,
character(len=*), intent(in)  filename,
integer, intent(in)  file_type,
character(len=*), intent(in), optional  comment 
)

Write the bianchi2 simulated sky to a file.

Parameters
[in,out]bBianchi2 object to save sky of.
[in]filenameName of output file.
[in]file_typeType of output file, either fits map or sky file (see s2_sky_mod for more details). Integer flag that may be either S2_SKY_FILE_TYPE_MAP or S2_SKY_FILE_TYPE_SKY.
[in][comment]Optional comment to append to file header.
Authors
Jason McEwen

Definition at line 912 of file bianchi2_sky_mod.f90.

References bianchi2_error_mod::bianchi2_error().

Referenced by bianchi2_sim().

subroutine, public bianchi2_sky_mod::bianchi2_sky_write_cl ( real(s2_sp), dimension(0:lmax), intent(inout)  Cl,
integer, intent(in)  lmax,
logical, intent(in)  rescale_Cl,
character(len=*), intent(in)  filename 
)

Write the bianchi2 simulated power spectrum to a file.

Parameters
[in,out]ClPower spectrum to write.
[in]lmaxMaximum harmonic l to consider.
[in]rescale_ClLogical to specify the unit of the power spectrum
[in]filenameFilename Name of output file.
Authors
Thibaut Josset

Definition at line 957 of file bianchi2_sky_mod.f90.

Referenced by bianchi2_sim().

real(s2_dp) function bianchi2_sky_mod::f1r ( real(s2_dp), intent(in)  a)
Parameters
[in]a
Authors
Anthony Lasenby

Definition at line 1354 of file bianchi2_sky_mod.f90.

Referenced by get_tau().

subroutine bianchi2_sky_mod::fcn ( real(s2_dp), intent(in)  t,
real(s2_dp), dimension(nvars), intent(in)  vars,
real(s2_dp), dimension(nvars), intent(out ff 
)
Parameters
[in]t
[in]vars
Return values
ff
Authors
Anthony Lasenby

Definition at line 1211 of file bianchi2_sky_mod.f90.

Referenced by get_results(), and out().

subroutine bianchi2_sky_mod::get_results ( real(s2_dp), intent(in)  tstop_use,
real(s2_dp), intent(out R_final,
real(s2_dp), intent(out RH_final,
real(s2_dp), intent(out cos_bit_final,
real(s2_dp), intent(out sin_bit_final 
)

This returns the values found at the end of the integral.

Parameters
[in]tstop_use
Return values
R_final
RH_final
cos_bit_final
sin_bit_final
Authors
Jason McEwen
Anthony Lasenby

Definition at line 1115 of file bianchi2_sky_mod.f90.

References bianchi2_error_mod::bianchi2_error(), fcn(), and out().

Referenced by bianchi2_sky_init(), and bianchi2_sky_init_alm().

subroutine bianchi2_sky_mod::get_tau ( real(s2_dp), intent(out tau_needed)
Return values
tau_needed
Authors
Anthony Lasenby

Definition at line 1305 of file bianchi2_sky_mod.f90.

References f1r().

Referenced by bianchi2_sky_init(), and bianchi2_sky_init_alm().

subroutine bianchi2_sky_mod::out ( real(s2_dp), intent(inout)  t,
real(s2_dp), dimension(b2gd_nvars), intent(in)  vals 
)
Parameters
[in,out]b
[in]vals
Authors
Anthony Lasenby

Definition at line 1267 of file bianchi2_sky_mod.f90.

References fcn().

Referenced by get_results().

Member Data Documentation

real(s2_dp), parameter bianchi2_sky_mod::bianchi2_cmb_t = 2.725d3
private

CMB T to convert Delta_T / T map to just Delta_T map.

Produce Delta_T / T maps.

Produce maps in units of mK.

Definition at line 80 of file bianchi2_sky_mod.f90.


The documentation for this module was generated from the following file: