cosmofct: Fast cosmology conversion functions

Description Usage Arguments Value Author(s) Examples

View source: R/cosmofct.R

Description

Generates all 20 conversion functions between redshift (z), luminosity distance (dl), comoving distance (dc) and angular diameter distance (da), and lookback time (t = light travel time from specified redshift); based on the *celestial* package.

Usage

1
cosmofct(zmin = 0, zmax = 1, dz = 0.02, ...)

Arguments

zmin

minimum redshift for which the conversion functions are used

zmax

maximum redshift for which the conversion functions are used

dz

redshift interval on which the conversion functions are interpolated (default of 0.02 is normally largely sufficient)

...

cosmological parameters accepted by cosdist of the *celestial* package. Defaults are H0=100, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0, w0=-1, wprime=0.

Value

Returns a list of 20 vectorized functions; e.g. dc2z to convert from comoving distance to redshift. Also lists the age of the universe at z=0. All distances are in units of Mpc and times are in units of Gyr.

Author(s)

Danail Obreschkow (based on *celestial* package by Aaron Robotham)

Examples

1
2
3
4
5
6
7
8
9
## uses a flat LCDM cosmology with h=0.68, OmegaM=0.32 and OmegaL=0.68
cosmo = cosmofct(0,1,H0=68,OmegaM=0.32)
curve(cosmo$z2dl(x),0,1,xlab='z',ylab='distance',col='red')
curve(cosmo$z2dc(x),0,1,col='black',add=TRUE)
curve(cosmo$z2da(x),0,1,col='blue',add=TRUE)
d = seq(500,5000,500)
points(cosmo$dl2z(d),d,pch=16,col='red')
points(cosmo$dc2z(d),d,pch=16,col='black')
points(cosmo$da2z(d),d,pch=16,col='blue')

physx documentation built on Feb. 3, 2022, 5:08 p.m.

Related to cosmofct in physx...