summaryrefslogtreecommitdiffstats
path: root/ds9/parsers
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-08-17 16:46:34 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2018-08-17 16:46:34 (GMT)
commit61331fa2c608e44eae36a8edbaef63752e635303 (patch)
tree9908ec5510fc89225be60b572def5279b88f9622 /ds9/parsers
parente45aee40eb4f7837acae8808dd2343dad32f9fe0 (diff)
downloadblt-61331fa2c608e44eae36a8edbaef63752e635303.zip
blt-61331fa2c608e44eae36a8edbaef63752e635303.tar.gz
blt-61331fa2c608e44eae36a8edbaef63752e635303.tar.bz2
simplify slice code
Diffstat (limited to 'ds9/parsers')
-rw-r--r--ds9/parsers/cubelex.fcl1
-rw-r--r--ds9/parsers/cubeparser.tac13
2 files changed, 9 insertions, 5 deletions
diff --git a/ds9/parsers/cubelex.fcl b/ds9/parsers/cubelex.fcl
index cff9436..b0bbcd7 100644
--- a/ds9/parsers/cubelex.fcl
+++ b/ds9/parsers/cubelex.fcl
@@ -32,6 +32,7 @@ stop {return $STOP_}
321 {return $321_}
#include wcssys.fin
+#include skyframe.fin
#include yesno.fin
#include numeric.fin
#include string.fin
diff --git a/ds9/parsers/cubeparser.tac b/ds9/parsers/cubeparser.tac
index 8818e37..784ab32 100644
--- a/ds9/parsers/cubeparser.tac
+++ b/ds9/parsers/cubeparser.tac
@@ -3,6 +3,7 @@
#include def.tin
#include wcssys.tin
+#include skyframe.tin
#include yesno.tin
#include numeric.tin
#include string.tin
@@ -36,6 +37,7 @@
%%
#include wcssys.trl
+#include skyframe.trl
#include yesno.trl
#include numeric.trl
@@ -54,13 +56,14 @@ cube : OPEN_
| FIRST_ {CubeFirst}
| LAST_ {CubeLast}
| INTERVAL_ numeric {ProcessCmdSet cube interval [expr int($2*1000)]}
- | AXIS_ INT_ {ProcessCmdSet cube axis [expr $2-1]}
| AXES_ order
| ORDER_ order
- | INT_ {CubeCmdCoord $1 image 2}
- | INT_ IMAGE_ {CubeCmdCoord $1 image 2}
- | numeric wcssys {CubeCmdCoord $1 $2 2}
- | numeric wcssys INT_ {CubeCmdCoord $1 $2 [expr $3-1]}
+ | INT_ {CubeCmd $1}
+ | INT_ IMAGE_ {CubeCmd $1}
+ | numeric wcssys {CubeCmdCoord $1 $2 fk5}
+ | numeric wcssys skyframe {CubeCmdCoord $1 $2 $3}
+# backward compatible
+ | AXIS_ INT_ {}
;
order : LOCK_ yesno {ProcessCmdSet cube lock,axes $2 LockAxesCurrent}