summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-04-03 21:28:26 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-04-03 21:28:26 (GMT)
commit572ae75fdcf447a6813b636c18b50ed138638b57 (patch)
tree4f653f39976fe37091470dc8edf6dbed478c160d /ds9
parentc075e24ac7eb8466b44bcd23f8a7a36f81b545ab (diff)
downloadblt-572ae75fdcf447a6813b636c18b50ed138638b57.zip
blt-572ae75fdcf447a6813b636c18b50ed138638b57.tar.gz
blt-572ae75fdcf447a6813b636c18b50ed138638b57.tar.bz2
improvements for skybot support
Diffstat (limited to 'ds9')
-rw-r--r--ds9/library/catdialog.tcl30
-rw-r--r--ds9/library/catskybot.tcl6
2 files changed, 27 insertions, 9 deletions
diff --git a/ds9/library/catdialog.tcl b/ds9/library/catdialog.tcl
index 8e0096d..dc67e9c 100644
--- a/ds9/library/catdialog.tcl
+++ b/ds9/library/catdialog.tcl
@@ -57,7 +57,12 @@ proc CATDialog {varname format catalog title action} {
set var(frame) $current(frame)
set var(server) $pcat(server)
+
+ # Skybot
set var(loc) $pcat(loc)
+ set var(asteroids) 1
+ set var(planets) 1
+ set var(comets) 1
set var(system) $wcs(system)
set var(sky) $wcs(sky)
@@ -285,13 +290,17 @@ proc CATDialog {varname format catalog title action} {
ttk::label $f.ref -text [string range $varname 3 end] \
-relief groove -width 13 -anchor w
- ttk::label $f.loctitle -text [msgcat::mc {IAU Location Code}]
- ttk::entry $f.loc -textvariable ${varname}(loc) -width 7
-
grid $f.ttitle $f.title -padx 2 -pady 2 -sticky w
grid $f.tcat $f.cat -padx 2 -pady 2 -sticky w
grid $f.tref $f.ref -padx 2 -pady 2 -sticky w
- grid $f.loctitle $f.loc -padx 2 -pady 2 -sticky w
+ switch $var(format) {
+ skybot {
+ ttk::label $f.loctitle -text [msgcat::mc {IAU Location Code}]
+ ttk::entry $f.loc -textvariable ${varname}(loc) -width 7
+ grid $f.loctitle $f.loc -padx 2 -pady 2 -sticky w
+ }
+ default {}
+ }
# Object
set f [ttk::labelframe $w.obj -text [msgcat::mc {Object}] -padding 2]
@@ -323,6 +332,19 @@ proc CATDialog {varname format catalog title action} {
-padx 2 -pady 2 -sticky w
grid $f.wtitle $f.w $f.htitle $f.h $f.rformat -padx 2 -pady 2 -sticky w
+ switch $var(format) {
+ skybot {
+ ttk::checkbutton $f.asteroids -text [msgcat::mc {Asteroids}] \
+ -variable ${varname}(asteroids)
+ ttk::checkbutton $f.planets -text [msgcat::mc {Planets}] \
+ -variable ${varname}(planets)
+ ttk::checkbutton $f.comets -text [msgcat::mc {Comets}] \
+ -variable ${varname}(comets)
+ grid x $f.asteroids $f.planets $f.comets -padx 2 -pady 2 -sticky w
+ }
+ default {}
+ }
+
# Param
set f [ttk::labelframe $w.param -text [msgcat::mc {Table}] -padding 2]
diff --git a/ds9/library/catskybot.tcl b/ds9/library/catskybot.tcl
index e2f7b7e..5e8bdbf 100644
--- a/ds9/library/catskybot.tcl
+++ b/ds9/library/catskybot.tcl
@@ -104,9 +104,6 @@ proc CATSkyBotVOT {varname} {
if {$ut != {}} {
append epoch "T$ut"
- } else {
- ARError $varname [msgcat::mc {Unable to determine time of observation}]
- return
}
}
@@ -134,9 +131,8 @@ proc CATSkyBotVOT {varname} {
}
# query
- set var(query) [http::formatQuery EPOCH $epoch RA $xx DEC $yy SR $rr VERB $type -mime votable -loc $var(loc) -filter=0 -objFilter=111]
+ set var(query) [http::formatQuery EPOCH $epoch RA $xx DEC $yy SR $rr VERB $type -mime votable -loc $var(loc) -filter 0 -objFilter $var(asteroids)$var(planets)$var(comets)]
set var(url) "http://vo.imcce.fr/webservices/skybot/skybotconesearch_query.php"
-
CATLoad $varname
}