From 9a6bbe0e6d6e826ae0b96d54795b2e77ec02a426 Mon Sep 17 00:00:00 2001 From: William Joye Date: Mon, 1 Jul 2019 14:57:31 -0400 Subject: SKYBOT: fixed an issue with keyword EXPTIME/EXP_TIME if present --- ds9/doc/release/r8.1.html | 1 + ds9/library/catskybot.tcl | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ds9/doc/release/r8.1.html b/ds9/doc/release/r8.1.html index 95e7bff..fd257ef 100644 --- a/ds9/doc/release/r8.1.html +++ b/ds9/doc/release/r8.1.html @@ -84,6 +84,7 @@
  • 06.05.2019 GUI: colobar cmds load/save errors now report via Error proc.
  • 06.19.2019 RGB: fixed an issue introduced in 8.1b1 in which a bad fits file loaded into RGB frame would not generate an error message.
  • 06.19.2019 PREFS: screen for old pbuttons vars which may have been passed along from previous prefs files before processing the buttons.
  • +
  • 07.01.2019 SKYBOT: fixed an issue with keyword EXPTIME/EXP_TIME if present.
  • xx.xx.2019 RELEASE version 8.1b2
  • diff --git a/ds9/library/catskybot.tcl b/ds9/library/catskybot.tcl index 51bc408..b1d895b 100644 --- a/ds9/library/catskybot.tcl +++ b/ds9/library/catskybot.tcl @@ -78,6 +78,7 @@ proc CATSkyBotVOT {varname} { ARError $varname [msgcat::mc {Unable to determine date of observation}] return } + puts $epoch # do we have a time? else check UT, UTC-OBS, UTIME, TIME-OBS set ut {} @@ -105,6 +106,7 @@ proc CATSkyBotVOT {varname} { set dt [split $epoch {T}] set dd [lindex $dt 0] set tt [lindex $dt 1] + puts "$dt|$dd|$tt" if {$tt != {}} { # do we have EXPTIME or EXP_TIME? set exp [string trim [$current(frame) get fits header keyword EXPTIME]] @@ -115,11 +117,18 @@ proc CATSkyBotVOT {varname} { if {$exp != {} && [string is double $exp]} { # ok, rebuild epoch set ttt [split $tt {:}] - set total [expr [lindex $ttt 0]*60.*60. + [lindex $ttt 1]*60. + [lindex $ttt 2] + [expr $exp/2.]] - set hh [format "%02d" [expr int($total/60./60.)]] - set total [expr $total - $hh*60.*60.] - set mm [format "%02d" [expr int($total/60.)]] - set ss [format "%02.1f" [expr $total - $mm*60.]] + set total [expr [lindex $ttt 0]*24.*60. + [lindex $ttt 1]*60. + [lindex $ttt 2] + [expr $exp/2.]] + + set ht [expr int($total/24./60.)] + set hh [format "%02d" $ht] + set total [expr $total - $ht*24.*60.] + + set mt [expr int($total/60.)] + set mm [format "%02d" $mt] + + set st [expr $total - $mt*60.] + set ss [format "%02.1f" $st] + set epoch "${dd}T${hh}:${mm}:${ss}" } } -- cgit v0.12