summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-07-11 18:34:44 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-07-11 18:34:44 (GMT)
commitfcb2c05dcd1c22589935e139b2ab36cc01b6a660 (patch)
treec9102702317b0e3caafc0115dc46b673470e066a /ds9
parentc38dbf02a591ad738ea45ba6ab6827466389276a (diff)
downloadblt-fcb2c05dcd1c22589935e139b2ab36cc01b6a660.zip
blt-fcb2c05dcd1c22589935e139b2ab36cc01b6a660.tar.gz
blt-fcb2c05dcd1c22589935e139b2ab36cc01b6a660.tar.bz2
clean up marker analysis code
Diffstat (limited to 'ds9')
-rw-r--r--ds9/library/markeranalysisplot2d.tcl17
1 files changed, 4 insertions, 13 deletions
diff --git a/ds9/library/markeranalysisplot2d.tcl b/ds9/library/markeranalysisplot2d.tcl
index fa8fc5d..e773eb5 100644
--- a/ds9/library/markeranalysisplot2d.tcl
+++ b/ds9/library/markeranalysisplot2d.tcl
@@ -110,6 +110,7 @@ proc MarkerAnalysisPlot2dSystem {varname} {
# hardcoded marker.C
proc MarkerAnalysisPlot2dCB {frame id} {
global imarker
+ global wcs
set varname ${imarker(prefix,dialog)}${id}${frame}
global $varname
@@ -124,33 +125,23 @@ proc MarkerAnalysisPlot2dCB {frame id} {
if {[info exists var(system)]} {
set vvar(system) $var(system)
- set sys $var(system)
} elseif {[info exists vvar(system)]} {
- set sys $vvar(system)
} else {
- global wcs
set vvar(system) $wcs(system)
- set sys $wcs(system)
}
if {[info exists var(sky)]} {
set vvar(sky) $var(sky)
- set sky $var(sky)
} elseif {[info exists vvar(sky)]} {
- set sky $vvar(sky)
} else {
- global wcs
- set sky $wcs(sky)
+ set vvar(sky) $wcs(sky)
}
if {[info exists var(method)]} {
set vvar(method) $var(method)
- set method $var(method)
} elseif {[info exists vvar(method)]} {
- set method $vvar(method)
} else {
set vvar(method) average
- set method average
}
set xdata ${vvarname}x
@@ -163,7 +154,7 @@ proc MarkerAnalysisPlot2dCB {frame id} {
if {!$ping} {
set tt [string totitle [$frame get marker $id type]]
- PlotLineDialog $vvarname $tt {} $sys Counts
+ PlotLineDialog $vvarname $tt {} $vvar(system) Counts
MarkerAnalysisPlot2dXAxisTitle $vvarname
MarkerAnalysisPlot2dYAxisTitle $vvarname
@@ -182,7 +173,7 @@ proc MarkerAnalysisPlot2dCB {frame id} {
}
$frame get marker $id analysis plot2d $xdata $ydata $xcdata $ycdata \
- $sys $sky $method
+ $vvar(system) $vvar(sky) $vvar(method)
if {!$ping} {
PlotExternal $vvarname