- qspec.inverse_doppler ( f_atom , f_lab , alpha , mode = 'raise-raise' , return_mask = False )[source]
The velocity $$\begin{aligned}v &= \frac{c}{s}\left[\cos(\alpha) \pm (f_\mathrm{atom}/f_\mathrm{lab})\sqrt{s - 1}\right]\\[2ex] s &= (f_\mathrm{atom}/f_\mathrm{lab})^2 + \cos(\alpha)^2\end{aligned}.$$ For angles $-\pi/2 < \alpha < \pi/2$, there can be two solutions. Depending on the combination of
f_atom
,f_lab
andalpha
, the situation may be physically impossible. Specifymode
to choose the desired behavior.- Parameters:
-
- f_atomarray_like
The frequency of light $f_\mathrm{atom}$ in the atom's rest frame (arb. units).
- f_labarray_like
The frequency of light $f_\mathrm{lab}$ in the laboratory frame ([
f_atom
]).- alphaarray_like
The angle $\alpha$ between the velocity- and the light-vector in the laboratory frame (rad).
- modestr
The mode how to handle
nan
values and ambiguous velocities. Available options are:-
'raise-raise'
: Raise an error if there arenan
values or if the velocity is ambiguous. -
'raise-small'
: Raise an error if there arenan
values and return the smaller velocity. -
'raise-large'
: Raise an error if there arenan
values and return the larger velocity. -
'isnan-raise'
: Ignorenan
values and raise an error if the velocity is ambiguous. -
'isnan-small'
: Ignorenan
values and return the smaller velocity. -
'isnan-large'
: Ignorenan
values and return the larger velocity.
-
- return_maskbool
Whether the mask where the velocity is ambiguous is returned as a second argument.
- Returns:
-
- out(ndarray, Optional[ndarray])
the velocity $v$ required to shift
f_lab
tof_atom
. Optionally returns the mask where the velocity is ambiguous (m/s).
- Raises:
-
- ValueError
mode
must be'raise-raise'
,'raise-small'
,'raise-large'
,'isnan-raise'
,'isnan-small'
, or'isnan-large'
. For additionally raised errors, see the description of themode
parameter.