cosdist: Cosmological distance calculator

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

This function allows comoving, angular size and luminosity distances to be calculated for a given redshift, it can also return look back time. It makes use of curvature properly using the relation OmegaM+OmegaL+OmegaK=1, but by default it assumes a flat Universe where only OmegaM needs to be specified.

Usage

1
cosdist(z = 0, H0 = 100, OmegaM = 0.3, OmegaL = 1 - OmegaM, age = FALSE)

Arguments

z

Redshift (can be a vector)

H0

Hubble constant (default is H0=100 (km/s)/Mpc)

OmegaM

Omega matter (default is 0.3)

OmegaL

Omega Lambda (default is for a flat Universe with OmegaL=1-OmegaM)

age

Flag to tell program to return age or not- this slows calculation, so is by default turned off

Details

Function is based on D. W. Hogg et all 1999 (arXiv 9905116)

Value

Function returns a data.frame (even if only 1 redshift if requested) with the following columns:

z Requested redshift
CoDist Line-of-sight (i.e. radial) comoving distance in units of Mpc
LumDist Luminosity distance in units of Mpc
AngDist Angular size distance in units of Mpc
CoDistTran Transverse comoving distance in units of Mpc
DistMod The distance modulus used where AbsMag = ApMag - DistMod, and DistMod = 5log10(LumDist)+25
AngArcSec Physical projected size of an arcsec at z in units of kpc/arcsec
CoVolGpc3 Comoving volume of Universe within z in units of Gpc^3

If age=TRUE is set then three extra pieces of age information are calculated for each z as extra columns:

HubTime Approximate Hubble age of the Universe in units of years
UniAgeNow Age of the Universe now in units of years
UniAgeAtz Age of the Universe at the specified redshift (z) in units of years
TravelTime Light travel time from the specified redshift (AKA look back time) in units of years

Author(s)

Aaron Robotham

References

Based on the equations in Hogg D.W., 1999, arXiv, 9905116 and Wright E.L., 2006, PASP, 118, 1711

See Also

snapwrite,snapread,genhalo,addhead,virialfuncs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
print(cosdist(0.3,70))

redshifts=seq(0,3,by=0.01)

plot(redshifts,cosdist(redshifts,70)[,'CoDist'],type='l',col='darkgreen',xlab='Redshift / z',ylab='Distance / Mpc')
lines(redshifts,cosdist(redshifts,70)[,'LumDist'],col='red')
lines(redshifts,cosdist(redshifts,70)[,'AngDist'],col='blue')
legend('topleft',legend=c('Comoving Distance','Luminosity Distance','Angular Size Distance'),col=c('darkgreen','red','blue'),lty=1)

plot(redshifts,cosdist(redshifts,70,age=TRUE)[,'TravelTime'],type='l',xlab='Redshift / z',ylab='Light travel time / Yrs')

asgr/simpack documentation built on May 12, 2019, 4:40 a.m.