summaryrefslogtreecommitdiffstats
path: root/ds9/library
diff options
context:
space:
mode:
Diffstat (limited to 'ds9/library')
-rw-r--r--ds9/library/catdialog.tcl2
-rw-r--r--ds9/library/command.tcl6
-rw-r--r--ds9/library/contour.tcl1
-rw-r--r--ds9/library/ds9.tcl4
-rw-r--r--ds9/library/help.tcl2
-rw-r--r--ds9/library/manalysis.tcl2
-rw-r--r--ds9/library/marker.tcl12
-rw-r--r--ds9/library/markeranalysisplot3d.tcl5
-rw-r--r--ds9/library/mask.tcl92
-rw-r--r--ds9/library/mbin.tcl4
-rw-r--r--ds9/library/menu.tcl9
-rw-r--r--ds9/library/mosaicimagewfpc2.tcl28
-rw-r--r--ds9/library/mregion.tcl139
-rw-r--r--ds9/library/mscale.tcl3
-rw-r--r--ds9/library/mwcs.tcl2
-rw-r--r--ds9/library/mzoom.tcl2
-rw-r--r--ds9/library/nsvr.tcl2
-rw-r--r--ds9/library/open.tcl2
-rw-r--r--ds9/library/saveimage.tcl8
-rw-r--r--ds9/library/stdfbox.tcl13
20 files changed, 281 insertions, 57 deletions
diff --git a/ds9/library/catdialog.tcl b/ds9/library/catdialog.tcl
index 09acc5f..bc4562e 100644
--- a/ds9/library/catdialog.tcl
+++ b/ds9/library/catdialog.tcl
@@ -525,7 +525,7 @@ proc CATDialogUpdate {varname} {
$var(mb).file entryconfig [msgcat::mc {Plot}] -state disabled
$var(mb).file entryconfig "[msgcat::mc {Display Header}]..." \
-state disabled
- $var(mb).file entryconfig [msgcat::mc {Copy to Regions}] -stat disabled
+ $var(mb).file entryconfig [msgcat::mc {Copy to Regions}] -state disabled
$var(mb).file entryconfig "[msgcat::mc {Print}]..." -state disabled
$var(top).buttons.filter configure -state disabled
diff --git a/ds9/library/command.tcl b/ds9/library/command.tcl
index 525c032..6fd1e53 100644
--- a/ds9/library/command.tcl
+++ b/ds9/library/command.tcl
@@ -555,7 +555,7 @@ proc CommandLineLoadBase {item argvname iname} {
MultiLoad $file(layer)
switch -- $file(mosaic) {
iraf {LoadMosaicImageIRAFFile $item $file(layer)}
- wfpc2 {LoadMosaicImageWFPC2File $item}
+ wfpc2 {LoadMosaicImageWFPC2File $item $file(layer)}
default {LoadMosaicImageWCSFile $item $file(layer) $file(mosaic)}
}
}
@@ -647,7 +647,7 @@ proc CommandLineLoadRGB {item argvname iname} {
mosaicimage {
switch -- $file(mosaic) {
iraf {LoadMosaicImageIRAFFile $item {}}
- wfpc2 {LoadMosaicImageWFPC2File $item}
+ wfpc2 {LoadMosaicImageWFPC2File $item {}}
default {LoadMosaicImageWCSFile $item {} $file(mosaic)}
}
}
@@ -734,7 +734,7 @@ proc CommandLineLoad3D {item argvname iname} {
MultiLoad
switch -- $file(mosaic) {
iraf {LoadMosaicImageIRAFFile $item {}}
- wfpc2 {LoadMosaicImageWFPC2File $item}
+ wfpc2 {LoadMosaicImageWFPC2File $item {}}
default {LoadMosaicImageWCSFile $item {} $file(mosaic)}
}
}
diff --git a/ds9/library/contour.tcl b/ds9/library/contour.tcl
index 44e32b9..e737695 100644
--- a/ds9/library/contour.tcl
+++ b/ds9/library/contour.tcl
@@ -832,7 +832,6 @@ proc ContourLoadNewDialog {fn} {
proc Contour2Polygons {} {
global current
- global contour
if {$current(frame) != {}} {
$current(frame) contour create polygon
diff --git a/ds9/library/ds9.tcl b/ds9/library/ds9.tcl
index 24f0881..6e12d40 100644
--- a/ds9/library/ds9.tcl
+++ b/ds9/library/ds9.tcl
@@ -13,7 +13,7 @@ proc DS9Def {} {
}
# for beta version, MUST have space
- set ds9(version) {8.0}
+ set ds9(version) {8.1 b1}
set ds9(top) .
set ds9(mb) .mb
@@ -205,7 +205,7 @@ switch $ds9(wm) {
source $ds9(root)/tcl8/8.5/msgcat-1.5.2.tm
}
if {![namespace exists http]} {
- source $ds9(root)/tcl8/8.6/http-2.8.12.tm
+ source $ds9(root)/tcl8/8.6/http-2.9.0.tm
source $ds9(root)/library/htp.tcl
}
diff --git a/ds9/library/help.tcl b/ds9/library/help.tcl
index fb9967a..3310e45 100644
--- a/ds9/library/help.tcl
+++ b/ds9/library/help.tcl
@@ -12,7 +12,7 @@ proc HelpDef {} {
set help(command) "$ds9(root)/doc/ref/command.html"
set help(userman) "$ds9(root)/doc/user/index.html"
set help(faq) "$ds9(root)/doc/faq.html"
- set help(release) "$ds9(root)/doc/release/r8.0.html"
+ set help(release) "$ds9(root)/doc/release/r8.1.html"
set help(helpdesk) "$ds9(root)/doc/helpdesk.html"
set help(story) "$ds9(root)/doc/story.html"
set help(ack) "$ds9(root)/doc/acknowledgment.html"
diff --git a/ds9/library/manalysis.tcl b/ds9/library/manalysis.tcl
index df282c0..cc49586 100644
--- a/ds9/library/manalysis.tcl
+++ b/ds9/library/manalysis.tcl
@@ -335,8 +335,10 @@ proc UpdateAnalysisMenu {} {
if {$ds9(active,num) > 0} {
$ds9(mb) entryconfig [msgcat::mc {Analysis}] -state normal
+ ConfigureButtons analysis normal
} else {
$ds9(mb) entryconfig [msgcat::mc {Analysis}] -state disabled
+ ConfigureButtons analysis disabled
}
if {$current(frame) != {}} {
diff --git a/ds9/library/marker.tcl b/ds9/library/marker.tcl
index a618fd3..38dfb0d 100644
--- a/ds9/library/marker.tcl
+++ b/ds9/library/marker.tcl
@@ -1014,6 +1014,18 @@ proc MarkerDeleteAll {} {
UpdateEditMenu
}
+proc MarkerDeleteLoad {} {
+ global pds9
+
+ if {$pds9(confirm)} {
+ if {[tk_messageBox -type okcancel -icon question -message [msgcat::mc {Delete All Regions?}]] != {ok}} {
+ return
+ }
+ }
+ MarkerDeleteAll
+ MarkerLoad
+}
+
proc MarkerColor {} {
global current
global marker
diff --git a/ds9/library/markeranalysisplot3d.tcl b/ds9/library/markeranalysisplot3d.tcl
index e26dd0b..2b93cbc 100644
--- a/ds9/library/markeranalysisplot3d.tcl
+++ b/ds9/library/markeranalysisplot3d.tcl
@@ -144,6 +144,11 @@ proc MarkerAnalysisPlot3dCB {frame id} {
set vvar(method) average
}
+ # sanity check
+ if {![$frame has wcs 3d $vvar(system)]} {
+ set vvar(system) image
+ }
+
set xdata ${vvarname}x
set ydata ${vvarname}y
global $xdata $ydata
diff --git a/ds9/library/mask.tcl b/ds9/library/mask.tcl
index 58036b4..3015a99 100644
--- a/ds9/library/mask.tcl
+++ b/ds9/library/mask.tcl
@@ -12,8 +12,11 @@ proc MaskDef {} {
set imask(top) .msk
set imask(mb) .mskmb
+ set mask(system) physical
set mask(color) red
- set mask(mark) 1
+ set mask(mark) nonzero
+ set mask(low) 0
+ set mask(high) 0
set mask(transparency) 0
array set pmask [array get mask]
@@ -25,6 +28,17 @@ proc MaskMark {} {
if {$current(frame) != {}} {
$current(frame) mask mark $mask(mark)
+ # for backward compatibility
+ set mask(mark) [$current(frame) get mask mark]
+ }
+}
+
+proc MaskRange {} {
+ global mask
+ global current
+
+ if {$current(frame) != {}} {
+ $current(frame) mask range $mask(low) $mask(high)
}
}
@@ -46,6 +60,15 @@ proc MaskTransparency {} {
}
}
+proc MaskSystem {} {
+ global mask
+ global current
+
+ if {$current(frame) != {}} {
+ $current(frame) mask system $mask(system)
+ }
+}
+
proc MaskClear {} {
global current
@@ -90,25 +113,21 @@ proc MaskDialog {} {
$mb.file add command -label [msgcat::mc {Close}] -command MaskDestroyDialog
menu $mb.file.open
- $mb.file.open add command \
- -label "[msgcat::mc {Mosaic WCS}]..." \
+ $mb.file.open add command -label "[msgcat::mc {Mosaic WCS}]..." \
-command [list OpenDialog mosaicimagewcs mask]
- $mb.file.open add command \
- -label "[msgcat::mc {Mosaic WCS Segment}]..." \
+ $mb.file.open add command -label "[msgcat::mc {Mosaic WCS Segment}]..." \
-command [list OpenDialog mosaicwcs mask]
- $mb.file.open add command \
- -label "[msgcat::mc {Mosaic IRAF}]..." \
+ $mb.file.open add command -label "[msgcat::mc {Mosaic IRAF}]..." \
-command [list OpenDialog mosaicimageiraf mask]
- $mb.file.open add command \
- -label "[msgcat::mc {Mosaic IRAF Segment}]..." \
+ $mb.file.open add command -label "[msgcat::mc {Mosaic IRAF Segment}]..." \
-command [list OpenDialog mosaiciraf mask]
+ $mb.file.open add command -label "[msgcat::mc {Mosaic WFPC2}]..." \
+ -command [list OpenDialog mosaicimagewfpc2 mask]
menu $mb.file.import
- $mb.file.import add command \
- -label "[msgcat::mc {Array}]..." \
+ $mb.file.import add command -label "[msgcat::mc {Array}]..." \
-command [list ImportDialog array mask]
- $mb.file.import add command \
- -label "[msgcat::mc {NRRD}]..." \
+ $mb.file.import add command -label {NRRD} \
-command [list ImportDialog nrrd mask]
EditMenu $mb imask
@@ -166,6 +185,10 @@ proc UpdateMaskMenu {} {
set mask(color) [$current(frame) get mask color]
set mask(mark) [$current(frame) get mask mark]
+ set range [$current(frame) get mask range]
+ set mask(low) [lindex $range 0]
+ set mask(high) [lindex $range 1]
+ set mask(system) [$current(frame) get mask system]
set mask(transparency) [$current(frame) get mask transparency]
switch -- [$current(frame) get type] {
@@ -190,6 +213,8 @@ proc MaskLoad {} {
if {$rr} {
$current(frame) mask color $mask(color)
$current(frame) mask mark $mask(mark)
+ $current(frame) mask range $mask(low) $mask(high)
+ $current(frame) mask system $mask(system)
}
}
return $rr
@@ -204,23 +229,43 @@ proc MaskParamsDialog {} {
set ed(ok) 0
set ed(color) $mask(color)
set ed(mark) $mask(mark)
+ set ed(low) $mask(low)
+ set ed(high) $mask(high)
DialogCreate $w [msgcat::mc {Mask Parameters}] ed(ok)
# Param
set f [ttk::frame $w.param]
+ ttk::label $f.coordtitle -text [msgcat::mc {Coordinate System}]
+ CoordMenuButton $f.coordbutton mask system 1 {} {} {}
+
ttk::label $f.colortitle -text [msgcat::mc {Color}]
ColorMenuButton $f.colorbutton ed color {}
- ttk::label $f.marktitle -text [msgcat::mc {Block}]
- ttk::radiobutton $f.markz -text [msgcat::mc {Zero}] \
- -variable ed(mark) -value 0
- ttk::radiobutton $f.marknz -text [msgcat::mc {Non-zero}] \
- -variable ed(mark) -value 1
- ttk::label $f.marktitle2 -text [msgcat::mc {Value}]
- grid $f.colortitle $f.colorbutton - -padx 2 -pady 2 -sticky w
- grid $f.marktitle $f.markz $f.marknz $f.marktitle2 -padx 2 -pady 2 -sticky w
+ ttk::label $f.marktitle -text [msgcat::mc {Block Pixel}]
+ set mb $f.markbutton.menu
+ ttk::menubutton $f.markbutton -textvariable ed(mark) -menu $mb
+ menu $mb
+ $mb add radiobutton -label [msgcat::mc {Zero}] \
+ -variable ed(mark) -value zero
+ $mb add radiobutton -label [msgcat::mc {Non-Zero}] \
+ -variable ed(mark) -value nonzero
+ $mb add radiobutton -label [msgcat::mc {NAN}] \
+ -variable ed(mark) -value nan
+ $mb add radiobutton -label [msgcat::mc {Non-NAN}] \
+ -variable ed(mark) -value nonnan
+ $mb add radiobutton -label [msgcat::mc {Range}] \
+ -variable ed(mark) -value range
+
+ ttk::label $f.rangetitle -text [msgcat::mc {Range}]
+ ttk::entry $f.low -textvariable ed(low) -width 13
+ ttk::entry $f.high -textvariable ed(high) -width 13
+
+ grid $f.coordtitle $f.coordbutton -padx 2 -pady 2 -sticky w
+ grid $f.colortitle $f.colorbutton -padx 2 -pady 2 -sticky w
+ grid $f.marktitle $f.markbutton -padx 2 -pady 2 -sticky w
+ grid $f.rangetitle $f.low $f.high -padx 2 -pady 2 -sticky w
# Buttons
set f [ttk::frame $w.buttons]
@@ -243,6 +288,8 @@ proc MaskParamsDialog {} {
if {$ed(ok)} {
set mask(color) [string tolower $ed(color)]
set mask(mark) $ed(mark)
+ set mask(low) $ed(low)
+ set mask(high) $ed(high)
}
set rr $ed(ok)
@@ -253,6 +300,7 @@ proc MaskParamsDialog {} {
proc MaskBackup {ch which} {
puts $ch "$which mask color [$which get mask color]"
puts $ch "$which mask mark [$which get mask mark]"
+ puts $ch "$which mask range [$which get mask range]"
puts $ch "$which mask transparency [$which get mask transparency]"
}
@@ -264,6 +312,8 @@ proc ProcessMaskCmd {varname iname} {
global parse
set parse(result) {}
+ MaskDialog
+
mask::YY_FLUSH_BUFFER
mask::yy_scan_string [lrange $var $i end]
mask::yyparse
diff --git a/ds9/library/mbin.tcl b/ds9/library/mbin.tcl
index 9ada431..a0c8afd 100644
--- a/ds9/library/mbin.tcl
+++ b/ds9/library/mbin.tcl
@@ -323,11 +323,14 @@ proc UpdateBinMenu {} {
if {[$current(frame) has fits]} {
if {[$current(frame) has fits bin]} {
$ds9(mb) entryconfig [msgcat::mc {Bin}] -state normal
+ ConfigureButtons bin normal
} else {
$ds9(mb) entryconfig [msgcat::mc {Bin}] -state disabled
+ ConfigureButtons bin disabled
}
} else {
$ds9(mb) entryconfig [msgcat::mc {Bin}] -state normal
+ ConfigureButtons bin normal
}
set bin(function) [$current(frame) get bin function]
@@ -336,6 +339,7 @@ proc UpdateBinMenu {} {
set bin(buffersize) [$current(frame) get bin buffer size]
} else {
$ds9(mb) entryconfig [msgcat::mc {Bin}] -state disabled
+ ConfigureButtons bin disabled
}
}
diff --git a/ds9/library/menu.tcl b/ds9/library/menu.tcl
index b51626f..122ee06 100644
--- a/ds9/library/menu.tcl
+++ b/ds9/library/menu.tcl
@@ -658,3 +658,12 @@ proc PrefsDialogMenu {} {
PrefsDialogHelpMenu $w.menu
}
+proc ConfigureButtons {menu state} {
+ global ds9
+ global pbuttons
+
+ foreach aa [array names pbuttons "$menu,*"] {
+ set bb [lindex [split $aa {,}] 1]
+ $ds9(buttons).$menu.$bb configure -state $state
+ }
+}
diff --git a/ds9/library/mosaicimagewfpc2.tcl b/ds9/library/mosaicimagewfpc2.tcl
index fcedc97..f98c596 100644
--- a/ds9/library/mosaicimagewfpc2.tcl
+++ b/ds9/library/mosaicimagewfpc2.tcl
@@ -4,22 +4,20 @@
package provide DS9 1.0
-proc LoadMosaicImageWFPC2File {fn} {
+proc LoadMosaicImageWFPC2File {fn layer} {
global loadParam
set loadParam(file,type) fits
set loadParam(file,mode) {mosaic image wfpc2}
set loadParam(load,type) mmapincr
set loadParam(file,name) $fn
-
- # mask not supported
- set loadParam(load,layer) {}
+ set loadParam(load,layer) $layer
ConvertFitsFile
ProcessLoad
}
-proc LoadMosaicImageWFPC2Alloc {path fn} {
+proc LoadMosaicImageWFPC2Alloc {path fn layer} {
global loadParam
set loadParam(file,type) fits
@@ -27,14 +25,12 @@ proc LoadMosaicImageWFPC2Alloc {path fn} {
set loadParam(load,type) allocgz
set loadParam(file,name) $fn
set loadParam(file,fn) $path
-
- # mask not supported
- set loadParam(load,layer) {}
+ set loadParam(load,layer) $layer
ProcessLoad
}
-proc LoadMosaicImageWFPC2Socket {sock fn} {
+proc LoadMosaicImageWFPC2Socket {sock fn layer} {
global loadParam
set loadParam(file,type) fits
@@ -42,9 +38,7 @@ proc LoadMosaicImageWFPC2Socket {sock fn} {
set loadParam(load,type) socketgz
set loadParam(file,name) $fn
set loadParam(socket,id) $sock
-
- # mask not supported
- set loadParam(load,layer) {}
+ set loadParam(load,layer) $layer
return [ProcessLoad 0]
}
@@ -63,21 +57,21 @@ proc ProcessMosaicImageWFPC2Cmd {varname iname sock fn} {
incr i [expr $mosaicimagewfpc2::yycnt-1]
}
-proc MosaicImageWFPC2CmdLoad {param} {
+proc MosaicImageWFPC2CmdLoad {param layer} {
global parse
if {$parse(sock) != {}} {
# xpa
- if {![LoadMosaicImageWFPC2Socket $parse(sock) $param]} {
+ if {![LoadMosaicImageWFPC2Socket $parse(sock) $param $layer]} {
InitError xpa
- LoadMosaicImageWFPC2File $param
+ LoadMosaicImageWFPC2File $param $layer
}
} else {
# comm
if {$parse(fn) != {}} {
- LoadMosaicImageWFPC2Alloc $parse(fn) $param
+ LoadMosaicImageWFPC2Alloc $parse(fn) $param $layer
} else {
- LoadMosaicImageWFPC2File $param
+ LoadMosaicImageWFPC2File $param $layer
}
}
FinishLoad
diff --git a/ds9/library/mregion.tcl b/ds9/library/mregion.tcl
index 1035d02..08a1539 100644
--- a/ds9/library/mregion.tcl
+++ b/ds9/library/mregion.tcl
@@ -39,6 +39,11 @@ proc RegionMainMenu {} {
$ds9(mb).region add command -label [msgcat::mc {Move to Back}] \
-command MarkerBack
$ds9(mb).region add separator
+ $ds9(mb).region add command -label [msgcat::mc {New Group}] \
+ -command GroupCreate
+ $ds9(mb).region add command -label "[msgcat::mc {Groups}]..." \
+ -command GroupDialog
+ $ds9(mb).region add separator
$ds9(mb).region add command -label [msgcat::mc {Select All}] \
-command MarkerSelectAll -accelerator "${ds9(ctrl)}A"
$ds9(mb).region add command -label [msgcat::mc {Select None}] \
@@ -51,15 +56,14 @@ proc RegionMainMenu {} {
$ds9(mb).region add command -label [msgcat::mc {Delete All Regions}] \
-command MarkerDeleteAllMenu
$ds9(mb).region add separator
- $ds9(mb).region add command -label [msgcat::mc {New Group}] \
- -command GroupCreate
- $ds9(mb).region add command -label "[msgcat::mc {Groups}]..." \
- -command GroupDialog
- $ds9(mb).region add separator
$ds9(mb).region add command -label "[msgcat::mc {List Regions}]..." \
-command MarkerList
$ds9(mb).region add command -label "[msgcat::mc {Load Regions}]..." \
-command MarkerLoad
+ $ds9(mb).region add command \
+ -label "[msgcat::mc {Delete and Load Regions}]..." \
+ -command MarkerDeleteLoad
+ $ds9(mb).region add separator
$ds9(mb).region add command -label "[msgcat::mc {Save Regions}]..." \
-command MarkerSave
$ds9(mb).region add separator
@@ -712,7 +716,9 @@ proc ButtonsRegionDef {} {
region,group 0
region,list 1
region,load 1
+ region,deleteload 0
region,save 1
+ region,mask 0
region,show 0
region,showtext 0
region,autocentroid 0
@@ -820,9 +826,15 @@ proc CreateButtonsRegion {} {
[string tolower [msgcat::mc {List}]] MarkerList
ButtonButton $ds9(buttons).region.load \
[string tolower [msgcat::mc {Load}]] MarkerLoad
+ ButtonButton $ds9(buttons).region.deleteload \
+ [string tolower [msgcat::mc {Delete Load}]] MarkerDeleteLoad
+
ButtonButton $ds9(buttons).region.save \
[string tolower [msgcat::mc {Save}]] MarkerSave
+ ButtonButton $ds9(buttons).region.mask \
+ [string tolower [msgcat::mc {Mask}]] MarkerMask
+
CheckButton $ds9(buttons).region.show \
[string tolower [msgcat::mc {Show}]] \
marker(show) MarkerShow
@@ -869,7 +881,9 @@ proc CreateButtonsRegion {} {
$ds9(buttons).region.group pbuttons(region,group)
$ds9(buttons).region.list pbuttons(region,list)
$ds9(buttons).region.load pbuttons(region,load)
+ $ds9(buttons).region.deleteload pbuttons(region,deleteload)
$ds9(buttons).region.save pbuttons(region,save)
+ $ds9(buttons).region.mask pbuttons(region,mask)
$ds9(buttons).region.show pbuttons(region,show)
$ds9(buttons).region.showtext pbuttons(region,showtext)
$ds9(buttons).region.autocentroid pbuttons(region,autocentroid)
@@ -932,6 +946,10 @@ proc PrefsDialogButtonbarRegion {f} {
$m add checkbutton -label "[msgcat::mc {Load Regions}]..." \
-variable pbuttons(region,load) \
-command {UpdateButtons buttons(region)}
+ $m add checkbutton -label "[msgcat::mc {Delete and Load Regions}]..." \
+ -variable pbuttons(region,deleteload) \
+ -command {UpdateButtons buttons(region)}
+ $m add separator
$m add checkbutton -label "[msgcat::mc {Save Regions}]..." \
-variable pbuttons(region,save) \
-command {UpdateButtons buttons(region)}
@@ -1035,8 +1053,12 @@ proc UpdateRegionMenu {} {
global pmarker
global ds9
+ set mm $ds9(mb).region
+ set bb $ds9(buttons).region
+
if {$current(frame) != {}} {
$ds9(mb) entryconfig [msgcat::mc {Region}] -state normal
+ ConfigureButtons region normal
set marker(show) [$current(frame) get marker show]
set marker(show,text) [$current(frame) get marker show text]
@@ -1097,7 +1119,114 @@ proc UpdateRegionMenu {} {
}
}
}
+
+ if {[$current(frame) has fits]} {
+ $mm entryconfig "[msgcat::mc {Get Information}]..." -state normal
+
+ $mm entryconfig [msgcat::mc {Composite Region}] -state normal
+ $mm entryconfig [msgcat::mc {Instrument FOV}] -state normal
+ $mm entryconfig [msgcat::mc {Template}] -state normal
+
+ $mm entryconfig [msgcat::mc {Centroid}] -state normal
+ $mm entryconfig [msgcat::mc {Move to Front}] -state normal
+ $mm entryconfig [msgcat::mc {Move to Back}] -state normal
+
+ $mm entryconfig [msgcat::mc {New Group}] -state normal
+ $mm entryconfig "[msgcat::mc {Groups}]..." -state normal
+
+ $mm entryconfig [msgcat::mc {Select All}] -state normal
+ $mm entryconfig [msgcat::mc {Select None}] -state normal
+ $mm entryconfig [msgcat::mc {Invert Selection}] -state normal
+
+ $mm entryconfig [msgcat::mc {Delete Selected Regions}] -state normal
+ $mm entryconfig [msgcat::mc {Delete All Regions}] -state normal
+
+ $mm entryconfig "[msgcat::mc {List Regions}]..." -state normal
+ $mm entryconfig "[msgcat::mc {Load Regions}]..." -state normal
+ $mm entryconfig "[msgcat::mc {Delete and Load Regions}]..." -state normal
+ $mm entryconfig "[msgcat::mc {Save Regions}]..." -state normal
+
+ $bb.info configure -state normal
+
+ $bb.create configure -state normal
+ $bb.dissolve configure -state normal
+
+ $bb.loadtemplate configure -state normal
+ $bb.savetemplate configure -state normal
+
+ $bb.centroid configure -state normal
+ $bb.front configure -state normal
+ $bb.back configure -state normal
+
+ $bb.newgroup configure -state normal
+ $bb.group configure -state normal
+
+ $bb.all configure -state normal
+ $bb.none configure -state normal
+ $bb.invert configure -state normal
+
+ $bb.delete configure -state normal
+ $bb.deleteall configure -state normal
+
+ $bb.list configure -state normal
+ $bb.load configure -state normal
+ $bb.deleteload configure -state normal
+ $bb.save configure -state normal
+ } else {
+ $mm entryconfig "[msgcat::mc {Get Information}]..." -state disabled
+
+ $mm entryconfig [msgcat::mc {Composite Region}] -state disabled
+ $mm entryconfig [msgcat::mc {Instrument FOV}] -state disabled
+ $mm entryconfig [msgcat::mc {Template}] -state disabled
+
+ $mm entryconfig [msgcat::mc {Centroid}] -state disabled
+ $mm entryconfig [msgcat::mc {Move to Front}] -state disabled
+ $mm entryconfig [msgcat::mc {Move to Back}] -state disabled
+
+ $mm entryconfig [msgcat::mc {New Group}] -state disabled
+ $mm entryconfig "[msgcat::mc {Groups}]..." -state disabled
+
+ $mm entryconfig [msgcat::mc {Select All}] -state disabled
+ $mm entryconfig [msgcat::mc {Select None}] -state disabled
+ $mm entryconfig [msgcat::mc {Invert Selection}] -state disabled
+
+ $mm entryconfig [msgcat::mc {Delete Selected Regions}] -state disabled
+ $mm entryconfig [msgcat::mc {Delete All Regions}] -state disabled
+
+ $mm entryconfig "[msgcat::mc {List Regions}]..." -state disabled
+ $mm entryconfig "[msgcat::mc {Load Regions}]..." -state disabled
+ $mm entryconfig "[msgcat::mc {Delete and Load Regions}]..." -state disabled
+ $mm entryconfig "[msgcat::mc {Save Regions}]..." -state disabled
+
+ $bb.info configure -state disabled
+
+ $bb.create configure -state disabled
+ $bb.dissolve configure -state disabled
+
+ $bb.loadtemplate configure -state disabled
+ $bb.savetemplate configure -state disabled
+
+ $bb.centroid configure -state disabled
+ $bb.front configure -state disabled
+ $bb.back configure -state disabled
+
+ $bb.newgroup configure -state disabled
+ $bb.group configure -state disabled
+
+ $bb.all configure -state disabled
+ $bb.none configure -state disabled
+ $bb.invert configure -state disabled
+
+ $bb.delete configure -state disabled
+ $bb.deleteall configure -state disabled
+
+ $bb.list configure -state disabled
+ $bb.load configure -state disabled
+ $bb.deleteload configure -state disabled
+ $bb.save configure -state disabled
+ }
} else {
$ds9(mb) entryconfig [msgcat::mc {Region}] -state disabled
+ ConfigureButtons region disabled
}
}
diff --git a/ds9/library/mscale.tcl b/ds9/library/mscale.tcl
index 564d027..ce5b50f 100644
--- a/ds9/library/mscale.tcl
+++ b/ds9/library/mscale.tcl
@@ -395,6 +395,7 @@ proc UpdateScaleMenu {} {
if {$current(frame) != {}} {
if {![$current(frame) has iis]} {
$ds9(mb) entryconfig [msgcat::mc {Scale}] -state normal
+ ConfigureButtons scale normal
set scale(type) [$current(frame) get colorscale]
set scale(log) [$current(frame) get colorscale log]
@@ -433,9 +434,11 @@ proc UpdateScaleMenu {} {
} else {
$ds9(mb) entryconfig [msgcat::mc {Scale}] -state disabled
+ ConfigureButtons scale disabled
}
} else {
$ds9(mb) entryconfig [msgcat::mc {Scale}] -state disabled
+ ConfigureButtons scale disabled
}
}
diff --git a/ds9/library/mwcs.tcl b/ds9/library/mwcs.tcl
index b9c6755..e9b0c6c 100644
--- a/ds9/library/mwcs.tcl
+++ b/ds9/library/mwcs.tcl
@@ -29,6 +29,7 @@ proc UpdateWCSMenu {} {
if {$current(frame) != {}} {
$ds9(mb) entryconfig [msgcat::mc {WCS}] -state normal
+ ConfigureButtons wcs normal
set ww [$current(frame) get wcs]
set wcs(system) [lindex $ww 0]
@@ -44,6 +45,7 @@ proc UpdateWCSMenu {} {
LayoutWCSInfoBox $current(frame)
} else {
$ds9(mb) entryconfig [msgcat::mc {WCS}] -state disabled
+ ConfigureButtons wcs disabled
}
}
diff --git a/ds9/library/mzoom.tcl b/ds9/library/mzoom.tcl
index 1c7829b..a1235c8 100644
--- a/ds9/library/mzoom.tcl
+++ b/ds9/library/mzoom.tcl
@@ -384,8 +384,10 @@ proc UpdateZoomMenu {} {
if {$ds9(active,num) > 0} {
$ds9(mb) entryconfig [msgcat::mc {Zoom}] -state normal
+ ConfigureButtons zoom normal
} else {
$ds9(mb) entryconfig [msgcat::mc {Zoom}] -state disabled
+ ConfigureButtons zoom disabled
}
if {$current(frame) == {}} {
diff --git a/ds9/library/nsvr.tcl b/ds9/library/nsvr.tcl
index b4430c2..e7192ce 100644
--- a/ds9/library/nsvr.tcl
+++ b/ds9/library/nsvr.tcl
@@ -31,7 +31,7 @@ proc NSVRServer {varname} {
vizier {append ${varname}(url) {/V}}
}
- set var(query) [http::formatQuery $var(name)]
+ set var(query) [http::mapReply $var(name)]
NSVRGetURL $varname $var(url)
}
diff --git a/ds9/library/open.tcl b/ds9/library/open.tcl
index d7d789b..0a45453 100644
--- a/ds9/library/open.tcl
+++ b/ds9/library/open.tcl
@@ -13,7 +13,7 @@ proc Open {fn format layer mode sys} {
fits {LoadFitsFile $fn $layer $mode}
mosaicimagewcs {LoadMosaicImageWCSFile $fn $layer $sys}
mosaicimageiraf {LoadMosaicImageIRAFFile $fn $layer}
- mosaicimagewfpc2 {LoadMosaicImageWFPC2File $fn}
+ mosaicimagewfpc2 {LoadMosaicImageWFPC2File $fn $layer}
mosaicwcs {LoadMosaicWCSFile $fn $layer $sys}
mosaiciraf {LoadMosaicIRAFFile $fn $layer}
mecube {LoadMECubeFile $fn}
diff --git a/ds9/library/saveimage.tcl b/ds9/library/saveimage.tcl
index cf6b240..ba421a2 100644
--- a/ds9/library/saveimage.tcl
+++ b/ds9/library/saveimage.tcl
@@ -31,8 +31,8 @@ proc SaveImageDef {} {
default {set saveimage(error) $aa}
}
}
- aqua -
- win32 {set saveimage(error) $cc}
+ aqua {set saveimage(error) $cc}
+ win32 {set saveimage(error) $aa}
}
}
@@ -117,11 +117,11 @@ proc SaveImagePhoto {fn format} {
switch $ds9(wm) {
x11 {}
- aqua -
- win32 {
+ aqua {
Error $saveimage(error)
return
}
+ win32 {}
}
set rr [catch {image create photo -format window -data $ds9(canvas)} ph]
diff --git a/ds9/library/stdfbox.tcl b/ds9/library/stdfbox.tcl
index a7998d8..ba40183 100644
--- a/ds9/library/stdfbox.tcl
+++ b/ds9/library/stdfbox.tcl
@@ -50,6 +50,19 @@ proc InitDialogBox {} {
[list {FITS} {*.fits.z}] \
]
+ global maskfbox
+ set maskfbox(file) {mask.fits}
+ set maskfbox(dir) {}
+ set maskfbox(types) [list \
+ [list {FITS} {*.fits}] \
+ [list {FITS} {*.fit}] \
+ [list {FITS} {*.fts}] \
+ [list {FITS} {*.fits.gz}] \
+ [list {FITS} {*.fits.bz2}] \
+ [list {FITS} {*.fits.Z}] \
+ [list {FITS} {*.fits.z}] \
+ ]
+
global epsfbox
set epsfbox(file) {ds9.eps}
set epsfbox(dir) {}