From 572ae75fdcf447a6813b636c18b50ed138638b57 Mon Sep 17 00:00:00 2001 From: William Joye Date: Mon, 3 Apr 2017 17:28:26 -0400 Subject: improvements for skybot support --- ds9/library/catdialog.tcl | 30 ++++++++++++++++++++++++++---- ds9/library/catskybot.tcl | 6 +----- 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 } -- cgit v0.12