From ea21c86550232710f37f15ecf5040fcb5db2ebe4 Mon Sep 17 00:00:00 2001
From: Ruud Overeem <overeem@astron.nl>
Date: Wed, 1 Nov 2017 13:46:43 +0000
Subject: [PATCH] TAsk #11475: Adding rotation value to comment of iHBADeltas
 file

---
 MAC/Deployment/data/Coordinates/make_conf_files.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/MAC/Deployment/data/Coordinates/make_conf_files.py b/MAC/Deployment/data/Coordinates/make_conf_files.py
index 9190102cf68..b045af35019 100755
--- a/MAC/Deployment/data/Coordinates/make_conf_files.py
+++ b/MAC/Deployment/data/Coordinates/make_conf_files.py
@@ -38,11 +38,13 @@ def print_help():
 def writeHBADeltas(station,deltas):
     cursor.execute("select * from get_field_rotation(%s, %s)", (station, 'HBA'))
     record = cursor.fetchone()
-    if record != None:
-        rotation = degrees(float(record[2]))
-    else:
-	print "Could not find field rotation for station",station
-        exit(1)
+    if record == None:
+       cursor.execute("select * from get_field_rotation(%s, %s)", (station, 'HBA0'))
+       record = cursor.fetchone()
+       if record == None:
+  	 print "Could not find field rotation for station",station
+         exit(1)
+    rotation=degrees(record[2])
     filename = '../StaticMetaData/iHBADeltas/%s-iHBADeltas.conf' %(str(station).upper())
     f = open(filename,'w')
     f.write('#\n')
-- 
GitLab