Skip to content
Snippets Groups Projects
Commit 9040a9a1 authored by Matthijs van der Wild's avatar Matthijs van der Wild
Browse files

Bugfix prep delay

parent ea57e453
Branches
No related tags found
1 merge request!46Bugfix prep delay
...@@ -30,13 +30,11 @@ def plugin_main(**kwargs): ...@@ -30,13 +30,11 @@ def plugin_main(**kwargs):
if mode == 'delay_calibration': if mode == 'delay_calibration':
RA_val = [RA_val[0]] RA_val = [RA_val[0]]
DEC_val = [DEC_val[0]] DEC_val = [DEC_val[0]]
Source_id = Source_id[:1] Source_id = Source_id[0]
if str(Source_id[0])[0:1] == 'I': if isinstance(Source_id, str):
pass
elif str(Source_id[0])[0:1] == 'S':
pass pass
else: else:
Source_id = ['S' + str(x) for x in Source_id[0]] Source_id = ['S' + str(Source_id)]
# make a string of coordinates for the DP3 command # make a string of coordinates for the DP3 command
ss = [ '[' + str(x) + 'deg,' + str(y) + 'deg]' for x, y in zip(RA_val, DEC_val) ] ss = [ '[' + str(x) + 'deg,' + str(y) + 'deg]' for x, y in zip(RA_val, DEC_val) ]
...@@ -49,6 +47,4 @@ def plugin_main(**kwargs): ...@@ -49,6 +47,4 @@ def plugin_main(**kwargs):
+ " \"delay_calibration\", \"split_directions\"" + " \"delay_calibration\", \"split_directions\""
+ f" but was {mode}.") + f" but was {mode}.")
result = {'name' : ",".join(Source_id), return {'name' : ",".join(Source_id), 'coords' : ss}
'coords' : ss}
return result
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment