Commit df524331 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Instantiate LO not in definition

parent 0dbafde8
......@@ -7,9 +7,9 @@ import track_hi
def main():
parser = argparse.ArgumentParser(description = "Adjust the frequency of the local oscillator to track the HI frequency at the pointing of the telescope")
parser.add_argument("-d", "--doppler-executable", help="Executable for computing the Doppler correction", default="/home/harm/bin/doppler_mb")
parser.add_argument("-f", "--frequency", help="Frequency to track, default is HI frequency at {}".format(track_hi.freq_HI), default=freq_HI, type=float)
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)
args = parser.parse_arguments()
args = parser.parse_args()
track_hi.track_frequency(tracking_frequency=args.frequency, doppler_executable=args.doppler_executable)
......@@ -11,7 +11,7 @@ import time
freq_hi = 1420.405751
def track_frequency(lo=LocalOscillator(), dt=telescope(),
def track_frequency(lo=None, dt=None,
"""Sets the Local Oscillator to a frequency to correct for Doppler shift"""
......@@ -19,6 +19,11 @@ def track_frequency(lo=LocalOscillator(), dt=telescope(),
dt_lon = np.deg2rad(6.396169)
dt_alt = 25.0
if not lo:
lo = LocalOscillator();
if not dt:
dt = telescope();
for pointing in dt.getJ2000():
ra = pointing['radec']
dec = pointing['radec']
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