doppler_radio#

astropy.units.equivalencies.doppler_radio(rest)[source]#

Return the equivalency pairs for the radio convention for velocity.

The radio convention for the relation between velocity and frequency is:

\(V = c \frac{f_0 - f}{f_0} ; f(V) = f_0 ( 1 - V/c )\)

Parameters:
restQuantity

Any quantity supported by the standard spectral equivalencies (wavelength, energy, frequency, wave number).

References

NRAO site defining the conventions

Examples

>>> import astropy.units as u
>>> CO_restfreq = 115.27120*u.GHz  # rest frequency of 12 CO 1-0 in GHz
>>> radio_CO_equiv = u.doppler_radio(CO_restfreq)
>>> measured_freq = 115.2832*u.GHz
>>> radio_velocity = measured_freq.to(u.km/u.s, equivalencies=radio_CO_equiv)
>>> radio_velocity  
<Quantity -31.209092088877583 km / s>