cosmap: Cosmological Mapping Functions

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

Description

Functions for mapping from one arbitrary cosmological parameter to another. This includes the provision of a generic interpolation function and another exact value lookup.

Usage

1
2
3
4
5
6
cosmapval(val=50, cosparam="CoVol", H0=100, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR, OmegaR=0,
w0=-1, wprime=0, Sigma8=0.8, fSigma8=FALSE, zrange=c(-0.99,100), res=100, iter=8,
out='cos', degen='lo', ref)
cosmapfunc(cosparamx="CoVol", cosparamy="z", H0=100, OmegaM=0.3, OmegaL=1-OmegaM-OmegaR,
OmegaR=0, w0=-1, wprime=0, Sigma8=0.8, fSigma8=FALSE, zrange=c(0,20), step='z', res=100,
degen='lo', ref)

Arguments

val

The value/s to be mapped from parameter cosparamx to parameter cosparamy (this can be a vector or a single number).

cosparam

Cosmological parameter, must be one of: z, a, CoDist, LumDist, CoDistTran, DistMod, CoVol, UniAgeAtz, TravelTime (see cosdist help for further description of these) H, CoVel, OmegaM, OmegaL, OmegaK, Factor, Rate, RhoCrit (see cosgrow help for further description of these). Note that AngDist and AngSize are not an option for cosparam due to degenerate redshift solutions causing problems with the approxfun mapping.

cosparamx

Cosmological parameter, must be one of: z, a, CoDist, LumDist, CoDistTran, DistMod, CoVol, UniAgeAtz, TravelTime (see cosdist help for further description of these) H, CoVel, OmegaM, OmegaL, OmegaK, Factor, Rate, RhoCrit (see cosgrow help for further description of these). Note that AngDist and AngSize are not an option for cosparamx due to degenerate redshift solutions causing problems with the approxfun mapping.

cosparamy

Cosmological parameter, must be one of: z, a, CoDist, LumDist, AngDist, CoDistTran, DistMod, AngSize CoVol, UniAgeAtz, TravelTime (see cosdist help for further description of these) H, CoVel, OmegaM, OmegaL, OmegaK, Factor, Rate, RhoCrit (see cosgrow help for further description of these).

H0

Hubble constant as defined at z=0 (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 = 0.7).

OmegaR

Omega Radiation (default is 0, but OmegaM/3400 is typical).

w0

The value of dark energy equation of state at z=0. See cosgrow for more details.

wprime

The evolution term that governs how the dark energy equation of state evolves with redshift. See cosgrow for more details.

Sigma8

The value of Sigma8 to use if fsigma8=TRUE (by default this is a reasonable 0.8 for simplicity).

fSigma8

Logical to express whether the growth rate of structure calculated by cosgrow, cosgrowRate or cosgrowRateApprox is given as f*Sigma8 (TRUE) or simply f (FALSE). This is useful for redshift space distortion comparisons (RSD), since RSD strictly measures f*Sigma8.

zrange

Lower and upper z limits that the approxfun mapping is generated over (increase range if default is not sufficient, and decrease if it is wasteful, i.e. the possible redshift window is known to be quite narrow).

step

The type of stepping used. Allowed values are 'z' (uniform stepping in z), 'logz' (uniform stepping in log10(1+z) and expansion factor 'a' (uniform stepping in a=1/(1+z)). Default is z. For mappings using time (UniAgeNow, UniAgeAtz, TravelTime) or comoving quantities (CoDist, CoDistTran, CoVol) or distance modulus (DistMod) 'a' or 'logz' map the numeric range more uniformly. This is because a and log10(1+z) are approximately linear in light travel time (positive and negative correlation respectively), and typically they have better behaviour than stepping uniformly in z directly.

res

The resolution of steps. Larger numbers will be more accurate, but will be slower to compute.

iter

The number of iterations to make when calculating the exact location of a given cosmological parameter when using cosmapval.

out

Either out='cos', in which case the output is a data.frame containing the output of cosdist and cosgrow for the specified input vaue, or out='z', in which case the output is a vector of the corresponding redshift (z) values.

degen

In cases where solutions are degenerate (multiple y solutions for a single x), this specifies whether to calculate the lower y solution (degen='lo'), or the higher y solutions (degen='hi').

ref

The name of a reference cosmology to use, one of 137 / 737 / Planck / Planck13 / Planck15 / Planck18 / WMAP / WMAP9 / WMAP7 / WMAP5 / WMAP3 / WMAP1 / Millennium / GiggleZ. Planck = Planck18 and WMAP = WMAP9. The usage is case insensitive, so wmap9 is an allowed input. See cosref for details. This overrides any other settings for H0/ OmegaM and OmegaL. If ref=137 or ref=737 no specific Sigma8 is assumed, instead Sigma8 is set to whatever the input value is set to (by default this is 0.8).

Details

The default zrange and res should be sufficient for most reasonable cosmologies if the approximate redshift location of the region to be mapped is entirely unknown.

Predictions into the future are possible if val is set to negative (distance and volume parameters) or below their present day value (age and growth parameters). However, many potential values are outside of the asymptotic limits, e.g. using the default 737 cosmology H is tending to 83.666, i.e. it will fail if you request H=83 but work if your resuest H=84.

The default res and iter for cosmapval is appropriate for most mappings with -0.99 < z < 100 using a fiducial 737 cosmology. If this proves insufficient (this should be obvious from error column) then increase both of these. Overall accuracy goes as res^iter.

Value

If out='cos', cosmapval contains the concatenation of the cosdist (with age=TRUE and error=TRUE) and cosgrow functions for parameter 'cosparam' at value 'val'. The 'z' and 'a' columns are only included once (from the output of cosdist). See cosdist and cosgrow for information on the cosdist and cosgrow outputs. If out='z', then cosmapval merely returns the corresponding redshifts.

The cosmapval output (when out='cos') includes an additional final column named 'MapError' which gives the approximate relative error of the values returned compared to the desired lookup location. Smaller is obviously better, but at the cost of computational time.

cosmapfunc uses base R approxfun to map cosparamx onto cosparamy between zrange[1] and zrange[2] in uniform steps of expansion factor (a=1/(1+z)). cosmofunc returns the output function created by approxfun.

Author(s)

Aaron Robotham

References

Based on the equations in:

Hogg D.W., 1999, arXiv, 9905116

Wright E.L., 2006, PASP, 118, 1711

See Also

cosdist, cosvol, cosgrow

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
tempfunc=cosmapfunc('CoVol', 'UniAgeAtz')
tempfunc(50)

cosmapval(50:60, 'CoVol')

#A future prediction:

cosmapval(59, 'H', H0=70)

## End(Not run)

Example output

Loading required package: RANN
Loading required package: NISTunits
Loading required package: pracma
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
[1] 4.085912
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
For infinite domains Gauss integration is applied!
           z         a   CoDist  LumDist  AngDist CoDistTran  DistMod AngScale
1  0.9840471 0.5040203 2285.391 4534.323 1151.883   2285.391 43.28256 5.584488
2  0.9928767 0.5017872 2300.526 4584.665 1154.375   2300.526 43.30654 5.596566
3  1.0016364 0.4995912 2315.465 4634.719 1156.786   2315.465 43.33012 5.608257
4  1.0103283 0.4974312 2330.214 4684.495 1159.121   2330.214 43.35331 5.619577
5  1.0189548 0.4953058 2344.778 4734.001 1161.382   2344.778 43.37614 5.630539
6  1.0275180 0.4932139 2359.163 4783.246 1163.572   2359.163 43.39861 5.641157
7  1.0360198 0.4911544 2373.376 4832.240 1165.694   2373.376 43.42074 5.651443
8  1.0444621 0.4891262 2387.420 4880.989 1167.749   2387.420 43.44254 5.661409
9  1.0528469 0.4871284 2401.300 4929.502 1169.742   2401.300 43.46402 5.671067
10 1.0611757 0.4851600 2415.022 4977.785 1171.672   2415.022 43.48518 5.680427
11 1.0694504 0.4832201 2428.590 5025.847 1173.544   2428.590 43.50605 5.689499
   CoVol HubTime UniAgeNow UniAgeAtz TravelTime RelError        H    CoVel
1     50 9.77814  9.427098  4.070925   5.356173    1e-08 174.4427 228539.1
2     51 9.77814  9.427098  4.046099   5.381000    1e-08 175.3410 230052.6
3     52 9.77814  9.427098  4.021702   5.405396    1e-08 176.2355 231546.5
4     53 9.77814  9.427098  3.997722   5.429376    1e-08 177.1264 233021.4
5     54 9.77814  9.427098  3.974143   5.452955    1e-08 178.0137 234477.8
6     55 9.77814  9.427098  3.950952   5.476146    1e-08 178.8976 235916.3
7     56 9.77814  9.427098  3.928137   5.498961    1e-08 179.7782 237337.6
8     57 9.77814  9.427098  3.905685   5.521413    1e-08 180.6557 238742.0
9     58 9.77814  9.427098  3.883586   5.543512    1e-08 181.5302 240130.0
10    59 9.77814  9.427098  3.861828   5.565270    1e-08 182.4017 241502.2
11    60 9.77814  9.427098  3.840401   5.586697    1e-08 183.2704 242859.0
      OmegaM    OmegaL OmegaR OmegaK    Decelq     MapError
1  0.7699658 0.2300342      0      0 0.1549488 8.526513e-16
2  0.7723168 0.2276832      0      0 0.1584752 4.179663e-16
3  0.7746222 0.2253778      0      0 0.1619333 2.732857e-16
4  0.7768835 0.2231165      0      0 0.1653252 0.000000e+00
5  0.7791022 0.2208978      0      0 0.1686533 2.631640e-16
6  0.7812797 0.2187203      0      0 0.1719195 2.583792e-16
7  0.7834172 0.2165828      0      0 0.1751258 1.268826e-16
8  0.7855161 0.2144839      0      0 0.1782742 0.000000e+00
9  0.7875775 0.2124225      0      0 0.1813663 0.000000e+00
10 0.7896026 0.2103974      0      0 0.1844039 0.000000e+00
11 0.7915925 0.2084075      0      0 0.1873887 2.368476e-16
For infinite domains Gauss integration is applied!
           z        a    CoDist   LumDist   AngDist CoDistTran DistMod
1 -0.6738498 3.066072 -3218.755 -1049.798 -9868.936  -3218.755      NA
   AngScale     CoVol  HubTime UniAgeNow UniAgeAtz TravelTime RelError  H
1 -47.84595 -139.6859 13.96877  13.46728  31.17775  -17.71047        0 59
      CoVel     OmegaM   OmegaL OmegaR OmegaK     Decelq MapError
1 -225312.9 0.01465096 0.985349      0      0 -0.9780236        0

celestial documentation built on May 2, 2019, 3:05 p.m.