summaryrefslogtreecommitdiffstats
path: root/ds9/library/load.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-04-25 17:14:56 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-04-25 17:14:56 (GMT)
commit36f467ca5206c5d1e70fd1ced808d776ebd87d5d (patch)
tree564e0f774c6f50b6c54749df57b3c14e4c2edd93 /ds9/library/load.tcl
parentf46f5e4aac83baa513c957a989ba539363632cd8 (diff)
downloadblt-36f467ca5206c5d1e70fd1ced808d776ebd87d5d.zip
blt-36f467ca5206c5d1e70fd1ced808d776ebd87d5d.tar.gz
blt-36f467ca5206c5d1e70fd1ced808d776ebd87d5d.tar.bz2
MASK: fixed an issue with mask and backups
Diffstat (limited to 'ds9/library/load.tcl')
-rw-r--r--ds9/library/load.tcl40
1 files changed, 27 insertions, 13 deletions
diff --git a/ds9/library/load.tcl b/ds9/library/load.tcl
index ef9a085..f3095da 100644
--- a/ds9/library/load.tcl
+++ b/ds9/library/load.tcl
@@ -181,18 +181,16 @@ proc ProcessLoad {{err 1}} {
}
# save loadParam
- if {$loadParam(load,layer) == {}} {
- switch -- [$current(frame) get type] {
- base -
- 3d {ProcessLoadSaveParams $current(frame)}
- rgb {
- switch -- $loadParam(file,mode) {
- {rgb image} -
- {rgb cube} {ProcessLoadSaveParams $current(frame)}
- default {
- ProcessLoadSaveParams \
- "$current(frame)[$current(frame) get rgb channel]"
- }
+ switch -- [$current(frame) get type] {
+ base -
+ 3d {ProcessLoadSaveParams $current(frame)}
+ rgb {
+ switch -- $loadParam(file,mode) {
+ {rgb image} -
+ {rgb cube} {ProcessLoadSaveParams $current(frame)}
+ default {
+ ProcessLoadSaveParams \
+ "$current(frame)[$current(frame) get rgb channel]"
}
}
}
@@ -206,11 +204,18 @@ proc ProcessLoadSaveParams {varname} {
global loadParam
global current
+ switch $loadParam(load,layer) {
+ mask {
+ global $varname
+ if {[info exists $varname]} {
+ set varname "$varname.m[$current(frame) get mask count]"
+ }
+ }
+ }
switch $loadParam(file,mode) {
slice -
{mosaic wcs} -
{mosaic iraf} {
- # special case
global $varname
if {[info exists $varname]} {
set varname "$varname.[$current(frame) get fits count]"
@@ -224,6 +229,15 @@ proc ProcessLoadSaveParams {varname} {
}
array set $varname [array get loadParam]
+ switch $loadParam(load,layer) {
+ mask {
+ global mask
+ set ${varname}(mask,color) $mask(color)
+ set ${varname}(mask,mark) $mask(mark)
+ set ${varname}(mask,low) $mask(low)
+ set ${varname}(mask,high) $mask(high)
+ }
+ }
# always save absolute path
upvar #0 $varname var