diff options
Diffstat (limited to 'ds9')
-rw-r--r-- | ds9/library/lex.fcl | 7 | ||||
-rw-r--r-- | ds9/library/parser.tac | 52 |
2 files changed, 59 insertions, 0 deletions
diff --git a/ds9/library/lex.fcl b/ds9/library/lex.fcl index ce12760..ae59c09 100644 --- a/ds9/library/lex.fcl +++ b/ds9/library/lex.fcl @@ -30,6 +30,8 @@ E [Ee][+-]?{D}+ -log {return $::LOGCMD_} -nan {return $::NANCMD_} -orient {return $::ORIENTCMD_} +-pan {return $::PANCMD_} +-pixeltable {return $::PIXELTABLECMD_} -private {return $::PRIVATECMD_} -pow {return $::POWCMD_} -quit {return $::QUITCMD_} @@ -38,6 +40,7 @@ E [Ee][+-]?{D}+ -sleep {return $::SLEEPCMD_} -squared {return $::SQUAREDCMD_} -sqrt {return $::SQRTCMD_} +-zoom {return $::ZOOMCMD_} -zscale {return $::ZSCALECMD_} aip {return $::AIP_} @@ -62,10 +65,12 @@ elevation {return $::ELEVATION_} el {return $::ELEVATION_} exp {return $::EXP_} false {return $::FALSE_} +fit {return $::FIT_} frame {return $::FRAME_} global {return $::GLOBAL_} highlite {return $::HIGHLITE_} histequ {return $::HISTEQU_} +in {return $::IN_} linear {return $::LINEAR_} limits {return $::LIMITS_} line {return $::LINE_} @@ -84,6 +89,7 @@ none {return $::NONE_} off {return $::OFF_} on {return $::ON_} open {return $::OPEN_} +out {return $::OUT_} pow {return $::POW_} sample {return $::SAMPLE_} save {return $::SAVE_} @@ -96,6 +102,7 @@ size {return $::SIZE_} squared {return $::SQUARED_} sqrt {return $::SQRT_} survey {return $::SURVEY_} +to {return $::TO_} true {return $::TRUE_} update {return $::UPDATE_} user {return $::USER_} diff --git a/ds9/library/parser.tac b/ds9/library/parser.tac index 60ed62b..b59d5c8 100644 --- a/ds9/library/parser.tac +++ b/ds9/library/parser.tac @@ -25,6 +25,8 @@ set file(load) 0 %token LOGCMD_ %token NANCMD_ %token ORIENTCMD_ +%token PANCMD_ +%token PIXELTABLECMD_ %token PRIVATECMD_ %token POWCMD_ %token QUITCMD_ @@ -33,6 +35,7 @@ set file(load) 0 %token SLEEPCMD_ %token SQUAREDCMD_ %token SQRTCMD_ +%token ZOOMCMD_ %token ZSCALECMD_ %token AIP_ @@ -54,10 +57,12 @@ set file(load) 0 %token ELEVATION_ %token EXP_ %token FALSE_ +%token FIT_ %token FRAME_ %token GLOBAL_ %token HIGHLITE_ %token HISTEQU_ +%token IN_ %token LIMITS_ %token LINE_ %token LINEAR_ @@ -76,6 +81,7 @@ set file(load) 0 %token OFF_ %token ON_ %token OPEN_ +%token OUT_ %token POW_ %token SAMPLE_ %token SAVE_ @@ -88,6 +94,7 @@ set file(load) 0 %token SQUARED_ %token SQRT_ %token SURVEY_ +%token TO_ %token TRUE_ %token UPDATE_ %token USER_ @@ -116,6 +123,8 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | LOGCMD_ {global scale; set scale(type) log; ChangeScale} | NANCMD_ STRING_ {global pds9; set pds9(nan) $2; PrefsNanColor} | ORIENTCMD_ orient + | PANCMD_ pan + | PIXELTABLECMD_ pixelTable | PRIVATECMD_ { # backword compatibility } @@ -127,6 +136,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | SQRTCMD_ {global scale; set scale(type) sqrt; ChangeScale} | SCALECMD_ scale | STRING_ {CommandLineFileName $1} + | ZOOMCMD_ {ProcessRealizeDS9} zoom | ZSCALECMD_ zscale ; @@ -134,6 +144,18 @@ numeric : REAL_ {set _ $1} | INT_ {set _ $1} ; +yes : YES_ {set _ 1} + | TRUE_ {set _ 1} + | ON_ {set _ 1} + | '1' {set _ 1} + ; + +no : NO_ {set _ 0} + | FALSE_ {set _ 0} + | OFF_ {set _ 0} +# | '0' {set _ 0} + ; + yesno : YES_ {set _ 1} | TRUE_ {set _ 1} | ON_ {set _ 1} @@ -260,6 +282,22 @@ orientation : NONE_ {set _ none} | XY_ {set _ xy} ; +pan : {} + | OPEN_ {PanZoomDialog} + | CLOSE_ {PanZoomDestroyDialog} + | TO_ panTo + ; + +panTo : {} + ; + +pixelTable : {PixelTableDialog} + | yes {PixelTableDialog} + | OPEN_ {PixelTableDialog} + | no {PixelTableDestroyDialog} + | CLOSE_ {PixelTableDestroyDialog} + ; + scale : scaleScales {global scale; set scale(type) $1; ChangeScale} | LOG_ scaleLog | DATASEC_ yesno @@ -319,6 +357,20 @@ sleep : {after 1000} | numeric {after [expr int($1*1000)]} ; +zoom : numeric {Zoom $1 $1} + | numeric numeric {Zoom $1 $2} + | OPEN_ {PanZoomDialog} + | CLOSE_ {PanZoomDestroyDialog} + | IN_ {Zoom 2 2} + | OUT_ {Zoom .5 .5} + | TO_ zoomTo + ; + +zoomTo: FIT_ {ZoomToFit} + | numeric {global zoom; set current(zoom) " $1 $1 "; ChangeZoom} + | numeric numeric {global zoom; set current(zoom) " $1 $2 "; ChangeZoom} + ; + zscale : {global zscale; set scale(mode) zscale; ChangeScaleMode} | CONTRAST_ numeric {global zscale; set zscale(contrast) $2; ChangeZScale} | SAMPLE_ INT_ {global zscale; set zscale(sample) $2; ChangeZScale} |