Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
HPIB
Commits
0e987af7
Commit
0e987af7
authored
Apr 24, 2018
by
Tammo Jan Dijkema
Browse files
Make timeout configurable
parent
153cf1a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
track_doppler.py
View file @
0e987af7
...
...
@@ -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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment