Commit 0023a999 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Fix command line interface trackDoppler

parent 64a06d70
......@@ -55,9 +55,9 @@ author = 'Harm Munk, Tammo Jan Dijkema, Auke Klazema'
# built documents.
#
# The short X.Y version.
version = '1.0.0'
version = '1.0.1'
# The full version, including alpha/beta/rc tags.
release = '1.0.0'
release = '1.0.1'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -3,14 +3,14 @@
from setuptools import setup, find_packages
meta = dict(name='hpib',
version='1.0.0',
version='1.0.1',
author='Harm Munk, Auke Klazema, Tammo Jan Dijkema',
author_email='harm.munk@camras.nl',
description='Controlling HPIB-software in the CAMRAS Dwingeloo Radio Telescope',
platforms='Linux, Mac OSX',
py_modules=['hpib', 'camrasdevices', 'track_doppler', 'vlsr'],
entry_points= {
'console_scripts': ['trackDoppler=trackDoppler:main'],
'console_scripts': ['trackDoppler=track_doppler:main'],
},
install_requires=['pyserial']#, 'astropy>=2.0']
)
......
#!/usr/bin/env python
import astropy.units as u
import argparse
import track_doppler
from telescope import telescope
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_doppler.freq_hi), default=track_doppler.freq_hi, type=float)
parser.add_argument("-u", "--updaterate", help="Update rate in seconds, default is 0.5", type=float, default=0.5)
args = parser.parse_args()
dt = telescope()
lo = LocalOscillator()
track_doppler.track_doppler(dt, lo, tracking_frequency=args.frequency, timeout=args.updaterate)
if __name__ == '__main__':
main()
#!/usr/bin/env python
"""Doppler tracking functions by setting the local oscillator frequency over HPIB
"""
from typing import Any, Union
import argparse
from telescope import telescope
import astropy.units as u
from astropy.coordinates import EarthLocation
from astropy.time import Time
......@@ -91,3 +95,18 @@ def track_doppler(dt, lo,
exit_event.wait(timeout=timeout)
lo.frequency = 1 * u.GHz
exit_event.clear()
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(freq_hi), default=freq_hi, type=float)
parser.add_argument("-u", "--updaterate", help="Update rate in seconds, default is 0.5", type=float, default=0.5)
args = parser.parse_args()
dt = telescope()
lo = LocalOscillator()
track_doppler(dt, lo, tracking_frequency=args.frequency, timeout=args.updaterate)
if __name__ == '__main__':
main()
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