Commit 4ae7b89a authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema

Fix reading alt/az and ra/dec

parent d06bd6e3
......@@ -17,7 +17,6 @@ import argparse
telescope_found = False
try:
from telescope import telescope
dt = telescope(consoleHost='console')
telescope_found = True
except:
print("Could not connect to console, no RA/DEC recorded")
......@@ -62,8 +61,10 @@ def create_filterbank(infile=None, outfile=None, date=None, source=None):
src_raj = 0.
src_dej = 0.
if telescope_found:
az_start = (180*u.deg + dt.getAzEl()[0]).to(u.rad).value
za_start = (90*u.deg - dt.getAzEl()[1]).to(u.rad).value
dt = telescope(consoleHost='console')
az_start = (180*u.deg + dt.getAzEl(waitForUpdate=True)[0]).to(u.deg).value
print(az_start)
za_start = (90*u.deg - dt.getAzEl()[1]).to(u.deg).value
src_raj = dt.getRaDec().ra.to_string(unit=u.hour, sep='')
src_dej = dt.getRaDec().dec.to_string(unit=u.degree, sep='')
......
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