diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-04-05 21:28:13 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-04-05 21:28:13 (GMT) |
commit | 11376f9238353b2c2fc2df9d1c42a622ed93278b (patch) | |
tree | 08e5373032c38639527d9a56c9bc3ff33e6525f3 /ds9/library/cube.tcl | |
parent | 5b568c0640d28680274b432fb1d068990506186c (diff) | |
download | blt-11376f9238353b2c2fc2df9d1c42a622ed93278b.zip blt-11376f9238353b2c2fc2df9d1c42a622ed93278b.tar.gz blt-11376f9238353b2c2fc2df9d1c42a622ed93278b.tar.bz2 |
add ds9 cube parser
Diffstat (limited to 'ds9/library/cube.tcl')
-rw-r--r-- | ds9/library/cube.tcl | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/ds9/library/cube.tcl b/ds9/library/cube.tcl index dec7868..e43bc4b 100644 --- a/ds9/library/cube.tcl +++ b/ds9/library/cube.tcl @@ -705,6 +705,16 @@ proc ProcessCubeCmd {varname iname} { upvar $varname var upvar $iname i + CubeDialog + + global debug + if {$debug(tcl,parser)} { + cube::YY_FLUSH_BUFFER + cube::yy_scan_string [lrange $var $i end] + cube::yyparse + incr i [expr $cube::yycnt-1] + } else { + global cube global dcube @@ -712,8 +722,6 @@ proc ProcessCubeCmd {varname iname} { global current global rgb - CubeDialog - switch -- [string tolower [lindex $var $i]] { match { incr i @@ -840,6 +848,29 @@ proc ProcessCubeCmd {varname iname} { } } } +} + +proc CubeCmdCoord {ss sys axis} { + global dcube + global cube + + set dcube(wcs,$axis) $ss + set cube(system) $sys + set cube(axis) $axis + if {$cube(axis) < 2} { + set cube(axis) 2 + } + CubeApply $cube(axis) +} + +proc CubeCmdSet {which value {cmd {}}} { + global cube + + set cube($which) $value + if {$cmd != {}} { + eval $cmd + } +} proc ProcessSendCubeCmd {proc id param} { global cube |