astromodule.distance.arcsec2mpc#

arcsec2mpc(distance: float | ~astropy.units.quantity.Quantity | ~typing.Sequence[float | ~astropy.units.quantity.Quantity], z: float | ~typing.Sequence[float], cosmology: ~astropy.cosmology._src.flrw.lambdacdm.FlatLambdaCDM = FlatLambdaCDM(name='Planck18', H0=<Quantity 67.66 km / (Mpc s)>, Om0=0.30966, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0.  , 0.  , 0.06] eV>, Ob0=0.04897))[source]#

Converts arcsecs to Mpc at a given redshift using the specified cosmology This function can be used to convert a single distance or multiple distances with a single call.

Parameters:
distance: float or Quantity

The distance in arcsec to be converted. This argument accepts a float variable or an array-like object (python list, numpy array, pandas series) of floats. If a float or sequence of floats is passed, this function interprets it as a arcsec unit. If a quantity is passed, this funcion convert the given unit (e.g. arcmin or deg) to arcsec. Therefore, if a Quantity object is passed, there is no need to convert it.

z: float or Sequence[float]

The redshift. This argument can be a single redshift, so this function considers that all distances are in the same redshift, or a sequence of redshift of same number of elements of the sequence passed in distance argument, so this function considers that the i-th distance is at i-th redshift.

cosmology: FlatLambdaCDM, optional.

An astropy cosmology. This function uses Planck 2018 cosmology as default with parameters from Planck Collaboration (2020) Table 2 (TT, TE, EE + lowE + lensing + BAO) [1]. That is also possible to use a custom cosmology, passing a FlatLambdaCDM instance or any cosmology realizations from astropy package [2].

Returns:
Quantity

The converted distance in Mpc

References