uvex_transients.utils.cosmology.physical_to_angular#
- uvex_transients.utils.cosmology.physical_to_angular(size: Quantity, redshift: float | NDArray[float64] | None = None, cosmology: Cosmology | None = None) Quantity[source]#
Convert a physical transverse size to an angular size.
- Parameters:
size (~astropy.units.Quantity) – Physical transverse size.
redshift (
float) – Redshift of the object.cosmology (~astropy.cosmology.FLRW, optional) – Cosmology used to compute the angular diameter distance. If
None, the configured default cosmology is used.
- Returns:
Angular size corresponding to the physical extent.
- Return type:
~astropy.units.Quantity
Notes
The angular size is given by
\[\theta = \frac{s}{D_A}\]where \(D_A\) is the angular diameter distance.
Examples
>>> import astropy.units as u >>> physical_to_angular(10 * u.kpc, redshift=0.5) <Quantity 1.58957339 arcsec>