Index
XGPaint.AbstractForegroundModel
XGPaint.CIB_Planck2013
XGPaint.CO_CROWNED
XGPaint.LRG_Yuan23
XGPaint.Radio_Sehgal2009
XGPaint.P_e_los
XGPaint.P_e_los_rsz
XGPaint.P_th_los
XGPaint.P_th_los_rsz
XGPaint.bl2beam
XGPaint.build_c_lnm2r_interpolator
XGPaint.build_interpolator
XGPaint.build_interpolator_rsz
XGPaint.build_jiang_interpolator
XGPaint.build_r2z_interpolator
XGPaint.build_shang_interpolator
XGPaint.build_z2r_interpolator
XGPaint.build_zhengcen_interpolator
XGPaint.build_zhengsat_interpolator
XGPaint.chunk
XGPaint.cleanup_negatives!
XGPaint.ellpad
XGPaint.fquench_UM
XGPaint.generate_sources
XGPaint.generate_sources
XGPaint.generate_sources
XGPaint.generate_subhalo_offsets
XGPaint.get_angles
XGPaint.get_basic_halo_properties
XGPaint.get_cosmology
XGPaint.get_interpolators
XGPaint.get_interpolators
XGPaint.hod_sehgal
XGPaint.l2f
XGPaint.load_example_halos
XGPaint.load_precomputed_battaglia
XGPaint.m2r
XGPaint.mz2c
XGPaint.paint!
XGPaint.paint!
XGPaint.paint!
XGPaint.queryDiscRing!
XGPaint.ra_dec_redshift_to_xyz
XGPaint.read_halo_catalog_hdf5
XGPaint.realspacegaussbeam
XGPaint.rsz_szpack_table_filename
XGPaint.sehgal_LF!
XGPaint.transform_profile_grid!
XGPaint.vectorhealpixmap
XGPaint.z_evo
XGPaint.AbstractForegroundModel
— TypeAll foreground models inherit from this type.
XGPaint.CIB_Planck2013
— TypeCIB_Planck2013{T}(; kwargs...)
Define CIB model parameters. Defaults are from Viero et al. 2013. All numbers not typed are converted to type T. This model has the following parameters and default values:
nside::Int64 = 4096
min_redshift = 0.0
max_redshift = 5.0
min_mass = 1e12
box_size = 40000
shang_zplat = 2.0
shang_Td = 20.7
shang_betan = 1.6
shang_eta = 2.4
shang_alpha = 0.2
shang_Mpeak = 10^12.3
shang_sigmaM = 0.3
shang_Msmin = 1e11
shang_Mmin = 1e10
shang_I0 = 92
jiang_gamma_1 = 0.13
jiang_alpha_1 = -0.83
jiang_gamma_2 = 1.33
jiang_alpha_2 = -0.02
jiang_beta_2 = 5.67
jiang_zeta = 1.19
XGPaint.CO_CROWNED
— TypeCO_CROWNED{T}(; kwargs...)
Define broadband CO model parameters. All numbers not typed are converted to type T. This model has the following parameters and default values:
nside::Int64 = 4096
hod::String = "shang"
XGPaint.LRG_Yuan23
— TypeLRG_Yuan23{T}(; kwargs...)
Define LRG model parameters. Defaults from Yuan et al. 2023 [arXiv:2306.06314]. All numbers not typed are converted to type T. This model has the following parameters and default values:
nside::Int64 = 4096
hod::String = "zheng"
min_redshift = 0.0
max_redshift = 5.0
min_mass = 1e12
box_size = 40000
shang_Msmin = 1e11
zheng_Mcut = 10^12.7
zheng_M1 = 10^13.6
zheng_sigma = 0.2
zheng_kappa = 0.08
zheng_alpha = 1.15
yuan_ic = 0.8
jiang_gamma_1 = 0.13
jiang_alpha_1 = -0.83
jiang_gamma_2 = 1.33
jiang_alpha_2 = -0.02
jiang_beta_2 = 5.67
jiang_zeta = 1.19
XGPaint.Radio_Sehgal2009
— TypeRadio_Sehgal2009{T}(model parameters...)
Define CIB model parameters. Defaults are from Viero et al. 2013.
model = CIBModel{Float32}(a_0=0.4)
XGPaint.P_e_los
— MethodLine-of-sight integrated electron pressure
XGPaint.P_e_los_rsz
— MethodLine-of-sight integrated electron pressure
XGPaint.P_th_los
— MethodLine-of-sight integrated thermal pressure
XGPaint.P_th_los_rsz
— MethodLine-of-sight integrated thermal pressure
XGPaint.bl2beam
— MethodCompute the real-space beam from a harmonic-space beam.
XGPaint.build_c_lnm2r_interpolator
— Methodbuild_c_lnm2r_interpolator(;cmin::T=1f-3, cmax::T=25.0f0,
mmin::T=-7.1f0, mmax::T=0.0f0, nbin=100) where T
Generate a LinearInterpolation object that turns concentration and ln(M_halo) into satellite radius.
XGPaint.build_interpolator
— MethodHelper function to build a tSZ interpolator
XGPaint.build_interpolator_rsz
— MethodHelper function to build a tSZ interpolator
XGPaint.build_jiang_interpolator
— MethodBuild a linear interpolation function which maps log(Mh) to Nsh.
XGPaint.build_r2z_interpolator
— Methodbuild_r2z_interpolator(min_z::T, max_z::T,
cosmo::Cosmology.AbstractCosmology; n_bins=2000) where T
Construct a fast r2z linear interpolator.
XGPaint.build_shang_interpolator
— MethodBuild a linear interpolation function which maps log(Mh) to Nsat.
XGPaint.build_z2r_interpolator
— MethodConstruct a z2r linear interpolator.
XGPaint.build_zhengcen_interpolator
— MethodBuild a linear interpolation function which maps log(Mh) to Ncen.
XGPaint.build_zhengsat_interpolator
— MethodBuild a linear interpolation function which maps log(Mh) to Nsat.
XGPaint.chunk
— MethodGenerates a list of tuples which describe starting and ending chunk indices. Useful for parallelizing an array operation.
XGPaint.cleanup_negatives!
— Methodprune a profile grid for negative values, extrapolate instead
XGPaint.ellpad
— MethodUtility function which prepends some zeros to an array. It makes a copy instead of modifying the input.
XGPaint.fquench_UM
— MethodQuiescent fraction recipe from UniverseMachine
XGPaint.generate_sources
— Methodgenerate_sources(model, cosmo, halo_pos_inp, halo_mass_inp; verbose=true)
Produce a source catalog from a model and halo catalog. This converts the halo arrays into the type specified by model
.
Arguments:
model::AbstractCIBModel{T}
: source model parameterscosmo::Cosmology.FlatLCDM{T}
: background cosmologyHealpix_res::Resolution
: Healpix map resolutionhalo_pos_inp::AbstractArray{TH,2}
: halo positions with dims (3, nhalos)halo_mass_inp::AbstractArray{TH,1}
: halo masses
Keywords
verbose::Bool=true
: print out progress details
XGPaint.generate_sources
— Methodgenerate_sources(model, cosmo, halo_pos_inp, halo_mass_inp; verbose=true)
Produce a source catalog from a model and halo catalog. This converts the halo arrays into the type specified by model
.
Arguments:
model::AbstractCIBModel{T}
: source model parameterscosmo::Cosmology.FlatLCDM{T}
: background cosmologyHealpix_res::Resolution
: Healpix map resolutionhalo_pos_inp::AbstractArray{TH,2}
: halo positions with dims (3, nhalos)halo_mass_inp::AbstractArray{TH,1}
: halo masses
Keywords
verbose::Bool=true
: print out progress details
XGPaint.generate_sources
— MethodProduce a source catalog from a model and halo catalog.
XGPaint.generate_subhalo_offsets
— MethodGenerate an array where the value at index i corresponds to the index of the first source of halo i. Takes an array where the value at index i corresponds to the number of subhalos that halo i has.
XGPaint.get_angles
— MethodCompute angles of halos
XGPaint.get_basic_halo_properties
— MethodFill in basic halo properties.
XGPaint.get_cosmology
— Methodget_cosmology(::Type{T}; h=0.69, Neff=3.04, OmegaK=0.0,
OmegaM=0.29, OmegaR=nothing, Tcmb=2.7255, w0=-1, wa=0)
Construct a background cosmology. This function duplicates the cosmology() function in Cosmology.jl, but with the numeric type specified.
Arguments:
::Type{T}
: numerical type to use for calculations
Keywords
h
- Dimensionless Hubble constantOmegaK
- Curvature density (Ω_k)OmegaM
- Matter density (Ω_m)OmegaR
- Radiation density (Ω_r)Tcmb
- CMB temperature in Kelvin; used to compute Ω_γNeff
- Effective number of massless neutrino species; used to compute Ω_νw0
- CPL dark energy equation of state;w = w0 + wa(1-a)
wa
- CPL dark energy equation of state;w = w0 + wa(1-a)
Example
julia> get_cosmology(Float32; h=0.7)
Cosmology.FlatLCDM{Float32}(0.7f0, 0.7099147f0, 0.29f0, 8.5307016f-5)
XGPaint.get_interpolators
— MethodConstruct the necessary interpolator set.
XGPaint.get_interpolators
— MethodConstruct the necessary interpolator set.
XGPaint.hod_sehgal
— MethodPopulate halos with radio sources according to the HOD in Sehgal et al. 2009.
The optional rng parameter provides an array of random number generators, one for each thread.
XGPaint.l2f
— MethodInverse square law with redshift dependence.
XGPaint.load_example_halos
— MethodReads a collection of example halos out of the WebSky halo catalogs, and returns RA (rad), DEC (rad), redshift, and halo mass (M200c).
XGPaint.load_precomputed_battaglia
— MethodReads in a standard Battaglia 2016 model from disk for tSZ.
XGPaint.m2r
— Methodm2r(m::T, cosmo::Cosmology.FlatLCDM{T}) where T
Convert virial mass to virial radius.
XGPaint.mz2c
— Methodmz2c(m::T, z::T, cosmo::Cosmology.FlatLCDM{T}) where T
Compute concentration factor from Duffy et al. 2008.
XGPaint.paint!
— MethodPaint a source catalog onto a map.
This function creates the arrays for you.
XGPaint.paint!
— Methodpaint!(result_map, nu_obs, model, sources, fluxes_cen, fluxes_sat)
Paint a source catalog onto a map, recording the fluxes in fluxes_cen
and fluxes_sat
.
Arguments:
result_map::HealpixMap{T_map, RingOrder}
: Healpix map to paintnu_obs
: frequency in Hzmodel::AbstractCIBModel{T}
: source model parameterssources
: NamedTuple containing source information from generate_sourcesfluxes_cen::AbstractArray
: buffer for writing fluxes of centralsfluxes_sat::AbstractArray
: buffer for writing fluxes of satellites
XGPaint.paint!
— Methodpaint!(result_map, model, sources, min_redshift, max_redshift)
'Paint' the LRG catalog onto a map.
Arguments:
result_map::HealpixMap{T_map, RingOrder}
: Healpix map to paintmodel::AbstractCIBModel{T}
: source model parameterssources
: NamedTuple containing source information from generate_sourcesfluxes_cen::AbstractArray
: buffer for writing fluxes of centralsfluxes_sat::AbstractArray
: buffer for writing fluxes of satellites
XGPaint.queryDiscRing!
— MethodqueryDiscRing!(result, ringinfo, resol::Resolution, theta, phi, radius; fact=0)
In-place calculation of a list of the indices of those pixels whose centers are closer than radius
to direction (theta, phi)
. The three angles radius
, theta
, and phi
must be expressed in radians.
If fact
is nonzero, it must be a positive integer; it requires to carry the computation at a resolution fact * nside
.
XGPaint.ra_dec_redshift_to_xyz
— MethodConvert RA (rad), DEC (rad), and redshift to xyz comoving radial dist.
XGPaint.read_halo_catalog_hdf5
— MethodUtility function to read an HDF5 table with x, y, z, M_h as the four rows. The hdf5 record is "halos".
XGPaint.realspacegaussbeam
— MethodComputes a real-space beam interpolator and a maximum
XGPaint.rsz_szpack_table_filename
— MethodReturns a stored artifact: a precomputed SZpack table
XGPaint.sehgal_LF!
— MethodFills the result array with draws from the luminosity function.
XGPaint.transform_profile_grid!
— MethodApply a beam to a profile grid
XGPaint.vectorhealpixmap
— Methodvecmap([T=Float64], nside::Int)
Generate a map of 3-tuples, showing the (x,y,z) values of the points on the unit 2-sphere for a Healpix map.
XGPaint.z_evo
— MethodCompute redshift evolution factor for LF.