Commit c5491a31 authored by marc's avatar marc

upodated ini file and removed check Telescope class

parent e0f729ec
......@@ -88,9 +88,7 @@ class DTObservationProgram(Ui_mainWindow):
def __init__(self, mainWindow):
logger.info('Initialization of DTObsGUI')
self.TelescopeEnabled = config.get('TestConfig','myDT')
if self.TelescopeEnabled == True:
self.myDT = telescope(setmode='J2000', consoleHost='consoledemo.dmz.camras.nl')
self.myDT = telescope(setmode='J2000', consoleHost='consoledemo.dmz.camras.nl')
self.myMeas = Measurements()
self.myMetaData = MetaData()
......@@ -197,19 +195,18 @@ class DTObservationProgram(Ui_mainWindow):
def goToSetpoints(self, setpoints, oneSetpointCompleteSignal=None, progressSignal=None):
""" Send a list of setpoints to the telescope """
for setpoint_nr, setpoint in enumerate(setpoints):
if self.TelescopeEnabled == True:
self.myDT.setRaDec(setpoint)
oneSetpointCompleteSignal.emit(setpoint_nr, 'Slewing')
time.sleep(3)
self.myDT.setRaDec(setpoint)
oneSetpointCompleteSignal.emit(setpoint_nr, 'Slewing')
time.sleep(3)
dist = np.sqrt(self.myDT.dist_el**2+self.myDT.dist_az**2)
firstDist = dist
while not dist < 0.01*u.deg:
percentSlew = max(100 - dist/firstDist*100, 0)
progressSignal.emit(setpoint_nr, percentSlew, "{:.3f}°".format(dist.value))
#print("{:.3f}".format(dist))
#print("{:2.0f}".format(percentSlew.value))
self.myDT.getDistance(waitForUpdate=True)
dist = np.sqrt(self.myDT.dist_el**2+self.myDT.dist_az**2)
firstDist = dist
while not dist < 0.01*u.deg:
percentSlew = max(100 - dist/firstDist*100, 0)
progressSignal.emit(setpoint_nr, percentSlew, "{:.3f}°".format(dist.value))
#print("{:.3f}".format(dist))
#print("{:2.0f}".format(percentSlew.value))
self.myDT.getDistance(waitForUpdate=True)
dist = np.sqrt(self.myDT.dist_el**2+self.myDT.dist_az**2)
oneSetpointCompleteSignal.emit(setpoint_nr, 'Measuring')
self.doMeasurement(setpoint_nr, progressSignal=progressSignal)
......
......@@ -2,4 +2,4 @@
LogLevel: INFO
[TestConfig]
myDT: False
\ No newline at end of file
myDT: True
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