Commit 19a0f444 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Change sign in doppler computation

Based on mail conversation with Michael Stoehr and Cees Bassa. For
positive v_lsr, observable frequency should be lower than transmitted
frequency. See

This change makes that this doppler correction gives different outputs
than "Harm's scripts".
parent 0023a999
Pipeline #23 canceled with stages
......@@ -42,7 +42,7 @@ def doppler_frequency(psrc, t, rest_frequency, loc, verbose=False):
psrc (SkyCoord): sky location for correction
t (float): time for correction
rest_frequency (Union[Quantity, float]): observed frequency in LSR
rest_frequency (Union[Quantity, float]): rest frequency (frequency which was transmitted)
loc (EarthLocation): observer location
......@@ -50,8 +50,7 @@ def doppler_frequency(psrc, t, rest_frequency, loc, verbose=False):
v1 = vlsr(t, loc, psrc, verbose=verbose)
beta = v1 / astropy.constants.c
return np.sqrt((1 + beta) / (1 - beta)) * rest_frequency
return (1 - v1 / astropy.constants.c) * rest_frequency
def test_vlsr():
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment