Commit 2da9bd2c authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Wait for telescope data, fix renamed stuff in executable

parent fd3d0237
......@@ -8,13 +8,13 @@ from camrasdevices import LocalOscillator
def main():
parser = argparse.ArgumentParser(description = "Adjust the frequency of the local oscillator to Doppler track a frequency at the pointing of the telescope")
parser.add_argument("-f", "--frequency", help="Frequency to track, default is HI frequency at {}".format(track_hi.freq_hi), default=track_hi.freq_hi, type=float)
parser.add_argument("-f", "--frequency", help="Frequency to track, default is HI frequency at {}".format(track_doppler.freq_hi), default=track_doppler.freq_hi, type=float)
args = parser.parse_args()
dt = telescope()
lo = LocalOscillator()
track_doppler.track_frequency(dt, lo, tracking_frequency=args.frequency)
track_doppler.track_doppler(dt, lo, tracking_frequency=args.frequency)
if __name__ == '__main__':
main()
......@@ -11,8 +11,6 @@ import subprocess
from telescope import telescope
from camrasdevices import Receiver, LocalOscillator
import time
freq_hi = 1420.405751 * u.MHz
def doppler_harm(sky_coordinate, time, tracking_frequency, location, variant):
......@@ -64,8 +62,9 @@ def track_doppler(dt, lo,
while not exit_event.is_set():
sky_coordinate = dt.radec
freq_doppler = doppler_function(sky_coordinate, Time.now(), tracking_frequency, dt_loc)
dfreq = 1*u.GHz + tracking_frequency - freq_doppler
lo.frequency = dfreq
if sky_coordinate:
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=timeout)
lo.frequency = 1*u.GHz
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