Skip to main content
`Ctrl`+`K`

# doppler_relativistic

astropy.units.doppler_relativistic(rest)

  Return the equivalency pairs for the relativistic convention for velocity.

  The full relativistic convention for the relation between velocity and frequency is:

  \(V = c \frac{f_0^2 - f^2}{f_0^2 + f^2} ; f(V) = f_0 \frac{\left(1 - (V/c)^2\right)^{1/2}}{(1+V/c)}\)

  Parameters:
    rest `Quantity`

      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
      >>> relativistic_CO_equiv = u.doppler_relativistic(CO_restfreq)
      >>> measured_freq = 115.2832*u.GHz
      >>> relativistic_velocity = measured_freq.to(u.km/u.s, equivalencies=relativistic_CO_equiv)
      >>> relativistic_velocity
      <Quantity -31.207467619351537 km / s>
      >>> measured_velocity = 1250 * u.km/u.s
      >>> relativistic_frequency = measured_velocity.to(u.GHz, equivalencies=relativistic_CO_equiv)
      >>> relativistic_frequency
      <Quantity 114.79156866993588 GHz>
      >>> relativistic_wavelength = measured_velocity.to(u.mm, equivalencies=relativistic_CO_equiv)
      >>> relativistic_wavelength
      <Quantity 2.6116243681798923 mm>