Commit 0e987af7 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Make timeout configurable

parent 153cf1a4
......@@ -41,7 +41,8 @@ def doppler_harm_mb(sky_coordinate, time, tracking_frequency, location):
def track_doppler(lo=None, dt=None,
tracking_frequency=freq_hi,
doppler_function=doppler_harm_bl,
exit_event=None):
exit_event=None,
timeout=0.5):
"""Sets the Local Oscillator to a frequency to correct for Doppler shift
Args:
......@@ -51,6 +52,7 @@ def track_doppler(lo=None, dt=None,
Defaults to None, in this case one will be created
doppler_function (function): a function that computes the doppler frequency.
This function gets a SkyCoord and a time (float), and should return a frequency Quantity
timeout (float): timeout between updates of the Local Oscillator
"""
if not lo:
......@@ -70,4 +72,4 @@ def track_doppler(lo=None, dt=None,
freq_doppler = doppler_function(sky_coordinate, Time.now(), tracking_frequency, dt_loc)
dfreq = 1*u.GHz + tracking_frequency - freq_doppler
lo.frequency = dfreq
exit_event.wait(timeout=0.5)
exit_event.wait(timeout=timeout)
Markdown is supported
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