Package uk.ac.starlink.ttools.func
Class Distances
- java.lang.Object
-
- uk.ac.starlink.ttools.func.Distances
-
public class Distances extends java.lang.ObjectFunctions for converting between different measures of cosmological distance.The following parameters are used:
- z: redshift
- H0: Hubble constant in km/sec/Mpc (example value ~70)
- omegaM: Density ratio of the universe (example value 0.3)
- omegaLambda: Normalised cosmological constant (example value 0.7)
For a flat universe,
omegaM+omegaLambda=1The terms and formulae used here are taken from the paper by D.W.Hogg, Distance measures in cosmology, astro-ph/9905116 v4 (2000).
- Since:
- 26 Jan 2007
- Author:
- Mark Taylor
-
-
Field Summary
Fields Modifier and Type Field Description static doubleMETRE_PER_PARSECNumber of metres in a parsec.static doubleSEC_PER_YEARNumber of seconds in a year.static doubleSPEED_OF_LIGHTSpeed of light in m/s.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doubleangularDiameterDistance(double z, double H0, double omegaM, double omegaLambda)Angular diameter distance.static doublecomovingDistanceL(double z, double H0, double omegaM, double omegaLambda)Line-of-sight comoving distance.static doublecomovingDistanceT(double z, double H0, double omegaM, double omegaLambda)Transverse comoving distance.static doublecomovingVolume(double z, double H0, double omegaM, double omegaLambda)Comoving volume.static doublelookbackTime(double z, double H0, double omegaM, double omegaLambda)Lookback time.static doubleluminosityDistance(double z, double H0, double omegaM, double omegaLambda)Luminosity distance.static doubleMpcToM(double distMpc)Converts from MegaParsecs to metres.static doublemToMpc(double distM)Converts from metres to MegaParsecs.static doublezToAge(double z)Quick and dirty function for converting from redshift to time.static doublezToDist(double z)Quick and dirty function for converting from redshift to distance.
-
-
-
Field Detail
-
SPEED_OF_LIGHT
public static final double SPEED_OF_LIGHT
Speed of light in m/s.- See Also:
- Constant Field Values
-
METRE_PER_PARSEC
public static final double METRE_PER_PARSEC
Number of metres in a parsec.- See Also:
- Constant Field Values
-
SEC_PER_YEAR
public static final double SEC_PER_YEAR
Number of seconds in a year.- See Also:
- Constant Field Values
-
-
Method Detail
-
MpcToM
public static double MpcToM(double distMpc)
Converts from MegaParsecs to metres.- Parameters:
distMpc- distance in Mpc- Returns:
- distance in m
-
mToMpc
public static double mToMpc(double distM)
Converts from metres to MegaParsecs.- Parameters:
distM- distance in m- Returns:
- distance in Mpc
-
zToDist
public static double zToDist(double z)
Quick and dirty function for converting from redshift to distance.Warning: this makes some reasonable assumptions about the cosmology and returns the luminosity distance. It is only intended for approximate use. If you care about the details, use one of the more specific functions here.
- Parameters:
z- redshift- Returns:
- some distance measure in Mpc
-
zToAge
public static double zToAge(double z)
Quick and dirty function for converting from redshift to time.Warning: this makes some reasonable assumptions about the cosmology. It is only intended for approximate use. If you care about the details use one of the more specific functions here.
- Parameters:
z- redshift- Returns:
- 'age' of photons from redshift
zin Gyr
-
comovingDistanceL
public static double comovingDistanceL(double z, double H0, double omegaM, double omegaLambda)Line-of-sight comoving distance.- Parameters:
z- redshiftH0- Hubble constant in km/sec/MpcomegaM- density ratio of the universeomegaLambda- normalised cosmological constant- Returns:
- line-of-sight comoving distance in Mpc
-
comovingDistanceT
public static double comovingDistanceT(double z, double H0, double omegaM, double omegaLambda)Transverse comoving distance.- Parameters:
z- redshiftH0- Hubble constant in km/sec/MpcomegaM- density ratio of the universeomegaLambda- normalised cosmological constant- Returns:
- transverse comoving distance in Mpc
-
angularDiameterDistance
public static double angularDiameterDistance(double z, double H0, double omegaM, double omegaLambda)Angular diameter distance.- Parameters:
z- redshiftH0- Hubble constant in km/sec/MpcomegaM- density ratio of the universeomegaLambda- normalised cosmological constant- Returns:
- angular diameter distance in Mpc
-
luminosityDistance
public static double luminosityDistance(double z, double H0, double omegaM, double omegaLambda)Luminosity distance.- Parameters:
z- redshiftH0- Hubble constant in km/sec/MpcomegaM- density ratio of the universeomegaLambda- normalised cosmological constant- Returns:
- luminosity distance in Mpc
-
lookbackTime
public static double lookbackTime(double z, double H0, double omegaM, double omegaLambda)Lookback time. This returns the difference between the age of the universe at time of observation (now) and the age of the universe at the time when photons of redshiftzwere emitted.- Parameters:
z- redshiftH0- Hubble constant in km/sec/MpcomegaM- density ratio of the universeomegaLambda- normalised cosmological constant- Returns:
- lookback time in Gyr
-
comovingVolume
public static double comovingVolume(double z, double H0, double omegaM, double omegaLambda)Comoving volume. This returns the all-sky total comoving volume out to a given redshiftz.- Parameters:
z- redshiftH0- Hubble constant in km/sec/MpcomegaM- density ratio of the universeomegaLambda- normalised cosmological constant- Returns:
- comoving volume in Gpc3
-
-