Distance: A class helper function to describe the projected distance to...

View source: R/Distance.R

DistanceR Documentation

A class helper function to describe the projected distance to the observed object

Description

The purpose of this function is to generate an object that contains the projected distance to the observed galaxy in a variety of units. Supply a single input (i.e. distance in units of redshift "z", physical distance "Mpc", or angular distance "kpc_per_arcsec") and all others will be contained by the object.

Usage

Distance(
  z,
  Mpc,
  kpc_per_arcsec,
  H0 = 68.4,
  OmegaM = 0.301,
  OmegaL = 0.699,
  OmegaR = 8.985075e-05
)

Arguments

z

A numeric describing the distance measured to the observed object in units of redshift, z. Precision to +/- 1e-7.

Mpc

A numeric describing the distance measured to the observed object in units of physical distance in mega-parsec. Precision to +/- 1e-3.

kpc_per_arcsec

A numeric describing the distance measured to the observed object in units of angular distance in kilo-parsec per arcsecond. Precision to +/- 1e-5.

H0

Hubble constant. Default as Planck 2018 results where H0 = 68.4.

OmegaM

Omega matter, the relative component of energy in mass. Default as Planck 2018 results where OmegaM = 0.301.

OmegaL

Omega lambda, the relative component of energy in dark energy. Default as Planck 2018 results where OmegaL = 0.699.

OmegaR

Omega radiation, the relative component of the energy in radiation (including neutrinos). Default as Planck 2018 results where OmegaR = 8.985075e-5.

Value

Returns an object of class "Distance" that summarises the projected distance to the object and the associated units.

Examples

Distance(z = 0.3)


kateharborne/SimSpin documentation built on June 11, 2025, 7:16 p.m.