doppler_optical#

astropy.units.equivalencies.doppler_optical(rest)[源代码]#

返回速度光学约定的等效对。

速度和频率之间关系的光学约定为:

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

参数:
restQuantity数量

由标准光谱当量(波长、能量、频率、波数)支持的任何数量。

工具书类

NRAO site defining the conventions

实例

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