Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
marc
dtObsGUI
Commits
c5491a31
Commit
c5491a31
authored
Oct 29, 2017
by
marc
Browse files
upodated ini file and removed check Telescope class
parent
e0f729ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
DTObs.py
View file @
c5491a31
...
...
@@ -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
)
...
...
dtobsgui.ini
View file @
c5491a31
...
...
@@ -2,4 +2,4 @@
LogLevel:
INFO
[TestConfig]
myDT:
False
\ No newline at end of file
myDT:
True
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment