Commit c5491a31 authored by marc's avatar marc
Browse files

upodated ini file and removed check Telescope class

parent e0f729ec
...@@ -88,9 +88,7 @@ class DTObservationProgram(Ui_mainWindow): ...@@ -88,9 +88,7 @@ class DTObservationProgram(Ui_mainWindow):
def __init__(self, mainWindow): def __init__(self, mainWindow):
logger.info('Initialization of DTObsGUI') logger.info('Initialization of DTObsGUI')
self.TelescopeEnabled = config.get('TestConfig','myDT') self.myDT = telescope(setmode='J2000', consoleHost='consoledemo.dmz.camras.nl')
if self.TelescopeEnabled == True:
self.myDT = telescope(setmode='J2000', consoleHost='consoledemo.dmz.camras.nl')
self.myMeas = Measurements() self.myMeas = Measurements()
self.myMetaData = MetaData() self.myMetaData = MetaData()
...@@ -197,19 +195,18 @@ class DTObservationProgram(Ui_mainWindow): ...@@ -197,19 +195,18 @@ class DTObservationProgram(Ui_mainWindow):
def goToSetpoints(self, setpoints, oneSetpointCompleteSignal=None, progressSignal=None): def goToSetpoints(self, setpoints, oneSetpointCompleteSignal=None, progressSignal=None):
""" Send a list of setpoints to the telescope """ """ Send a list of setpoints to the telescope """
for setpoint_nr, setpoint in enumerate(setpoints): for setpoint_nr, setpoint in enumerate(setpoints):
if self.TelescopeEnabled == True: self.myDT.setRaDec(setpoint)
self.myDT.setRaDec(setpoint) oneSetpointCompleteSignal.emit(setpoint_nr, 'Slewing')
oneSetpointCompleteSignal.emit(setpoint_nr, 'Slewing') time.sleep(3)
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) 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') oneSetpointCompleteSignal.emit(setpoint_nr, 'Measuring')
self.doMeasurement(setpoint_nr, progressSignal=progressSignal) self.doMeasurement(setpoint_nr, progressSignal=progressSignal)
......
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
LogLevel: INFO LogLevel: INFO
[TestConfig] [TestConfig]
myDT: False myDT: True
\ No newline at end of file
Supports Markdown
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