Commit 5f47f9f1 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Make doppler executable specifyable

parent 8d125a60
...@@ -12,7 +12,8 @@ import time ...@@ -12,7 +12,8 @@ import time
freq_HI = 1420.405751 freq_HI = 1420.405751
def track_frequency(lo=LocalOscillator(), dt=telescope(), def track_frequency(lo=LocalOscillator(), dt=telescope(),
tracking_frequency=freq_HI): tracking_frequency=freq_HI,
doppler_executable="/home/harm/bin/doppler_mb"):
"""Sets the Local Oscillator to a frequency to correct for Doppler shift""" """Sets the Local Oscillator to a frequency to correct for Doppler shift"""
dt_lat = np.deg2rad(52.812019) dt_lat = np.deg2rad(52.812019)
dt_lon = np.deg2rad(6.396169) dt_lon = np.deg2rad(6.396169)
...@@ -25,7 +26,7 @@ def track_frequency(lo=LocalOscillator(), dt=telescope(), ...@@ -25,7 +26,7 @@ def track_frequency(lo=LocalOscillator(), dt=telescope(),
argstring = "{ra} {dec} 2000 {time} {dt_lat} {dt_lon} {dt_alt}".format( argstring = "{ra} {dec} 2000 {time} {dt_lat} {dt_lon} {dt_alt}".format(
ra=ra, dec=dec, time=t, dt_lat=dt_lat, dt_lon=dt_lon, dt_alt=dt_alt) ra=ra, dec=dec, time=t, dt_lat=dt_lat, dt_lon=dt_lon, dt_alt=dt_alt)
doppler_cmd = "/home/harm/bin/doppler_mb " + argstring + " " + str(tracking_frequency) doppler_cmd = doppler_executable + " " + argstring + " " + str(tracking_frequency)
freq_doppler = float(subprocess.Popen(doppler_cmd, stdout=subprocess.PIPE, shell=True).stdout.read()) freq_doppler = float(subprocess.Popen(doppler_cmd, stdout=subprocess.PIPE, shell=True).stdout.read())
dfreq = 1000.0 + tracking_frequency - freq_doppler dfreq = 1000.0 + tracking_frequency - freq_doppler
lo.frequency = dfreq * 1e6 lo.frequency = dfreq * 1e6
......
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