diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-07-14 19:46:37 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-07-14 19:46:37 (GMT) |
commit | 990c6dd836e5fab6a25bc607214bebf3932e11fb (patch) | |
tree | 5081a5773942818f385b44491dfe710171f6601a /ds9/library | |
parent | 75e04b1e0ed4d00e76f7d00ccdc8de6e6c6c6eda (diff) | |
download | blt-990c6dd836e5fab6a25bc607214bebf3932e11fb.zip blt-990c6dd836e5fab6a25bc607214bebf3932e11fb.tar.gz blt-990c6dd836e5fab6a25bc607214bebf3932e11fb.tar.bz2 |
update parser
Diffstat (limited to 'ds9/library')
-rw-r--r-- | ds9/library/lex.fcl | 11 | ||||
-rw-r--r-- | ds9/library/parser.tac | 52 | ||||
-rw-r--r-- | ds9/library/util.tcl | 4 | ||||
-rw-r--r-- | ds9/library/wcs.tcl | 9 |
4 files changed, 61 insertions, 15 deletions
diff --git a/ds9/library/lex.fcl b/ds9/library/lex.fcl index 0eb5606..abfe4e0 100644 --- a/ds9/library/lex.fcl +++ b/ds9/library/lex.fcl @@ -70,6 +70,7 @@ E [Ee][+-]?{D}+ -theme {return $::THREMECMD_} -threads {return $::THREADSCMD_} -tile {return $::TILECMD_} +-wcs {return $::WCSCMD_} -width {return $::WIDTHCMD_} -zmax {return $::ZMAXCMD_} -zoom {return $::ZOOMCMD_} @@ -86,8 +87,10 @@ E [Ee][+-]?{D}+ 3d {return $::3D_} about {return $::ABOUT_} aip {return $::AIP_} +align {return $::ALIGN_} all {return $::ALL_} amplifier {return $::AMPLIFIER_} +append {return $::APPEND_} arcmin {return $::ARCMIN_} arcsec {return $::ARCSEC_} asinh {return $::ASINH_} @@ -145,12 +148,13 @@ file {return $::FILE_} filter {return $::FILTER_} first {return $::FIRST_} fit {return $::FIT_} -function {return $::FUNCTION_} +format {return $::FORMAT_} forward {return $::FORWARD_} frame {return $::FRAME_} frameno {return $::FRAMENO_} +function {return $::FUNCTION_} gap {return $::GAP_} -galatic {return $::GALATIC_} +galactic {return $::GALACTIC_} global {return $::GLOBAL_} green {return $::GREEN_} grid {return $::GRID_} @@ -206,6 +210,7 @@ physical {return $::PHYSICAL_} region {return $::REGION_} refresh {return $::REFRESH_} red {return $::RED_} +replace {return $::REPLACE_} reset {return $::RESET_} rgb {return $::RGB_} rgbcube {return $::RGBCUBE_} @@ -222,6 +227,8 @@ sexagesimal {return $::SEXAGESIMAL_} show {return $::SHOW_} sinh {return $::SINH_} size {return $::SIZE_} +sky {return $::SKY_} +skyformat {return $::SKYFORMAT_} slice {return $::SLICE_} smooth {return $::SMOOTH_} squared {return $::SQUARED_} diff --git a/ds9/library/parser.tac b/ds9/library/parser.tac index 6e42802..89843de 100644 --- a/ds9/library/parser.tac +++ b/ds9/library/parser.tac @@ -73,6 +73,7 @@ set file(load) 0 %token THEMECMD_ %token THREADSCMD_ %token TILECMD_ +%token WCSCMD_ %token WIDTHCMD_ %token ZMAXCMD_ %token ZOOMCMD_ @@ -88,8 +89,10 @@ set file(load) 0 %token 3D_ %token ABOUT_ %token AIP_ +%token ALIGN_ %token ALL_ %token AMPLIFIER_ +%token APPEND_ %token ARCMIN_ %token ARCSEC_ %token ASINH_ @@ -144,11 +147,12 @@ set file(load) 0 %token FIT_ %token FK4_ %token FK5_ +%token FORMAT_ %token FORWARD_ %token FRAME_ %token FRAMENO_ %token FUNCTION_ -%token GALATIC_ +%token GALACTIC_ %token GAP_ %token GLOBAL_ %token GREEN_ @@ -205,6 +209,7 @@ set file(load) 0 %token RED_ %token REFRESH_ %token REGION_ +%token REPLACE_ %token RESET_ %token RGB_ %token RGBCUBE_ @@ -221,6 +226,8 @@ set file(load) 0 %token SHOW_ %token SINH_ %token SIZE_ +%token SKY_ +%token SKYFORMAT_ %token SLICE_ %token SMOOTH_ %token SQUARED_ @@ -293,7 +300,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | CMAPCMD_ {ProcessRealizeDS9} cmap | CONSOLECMD_ {global ds9; OpenConsole; InitError $ds9(msg,src)} | CROPCMD_ {ProcessRealizeDS9} crop - | CROSSHAIRCMD_ crosshair + | CROSSHAIRCMD_ {ProcessRealizeDS9} crosshair | CUBECMD_ {CubeDialog} cube | CURSORCMD_ int int {CursorCmd $2 $3} | FITSCMD_ fits @@ -312,8 +319,8 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | MINMAXCMD_ minmax | MODECMD_ mode | NANCMD_ STRING_ {global pds9; set pds9(nan) $2; PrefsNanColor} - | ORIENTCMD_ orient - | PANCMD_ pan + | ORIENTCMD_ {ProcessRealizeDS9} orient + | PANCMD_ {ProcessRealizeDS9} pan | PIXELTABLECMD_ pixelTable | PREFSCMD_ prefs # backward compatibility @@ -326,7 +333,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | SINGLECMD_ {global current; ProcessRealizeDS9; set current(display) single; DisplayMode} | SINHCMD_ {global scale; set scale(type) sinh; ChangeScale} | SLEEPCMD_ {UpdateDS9; RealizeDS9} sleep - | SOURCECMD_ STRING_ {SourceFileCmd $2} + | SOURCECMD_ STRING_ {SourceCmd $2} | SQUAREDCMD_ {global scale; set scale(type) squared; ChangeScale} | SQRTCMD_ {global scale; set scale(type) sqrt; ChangeScale} | SCALECMD_ scale @@ -334,6 +341,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | THEMECMD_ | THREADSCMD_ int {global ds9; set ds9(threads) $2; ChangeThreads} | TILECMD_ tile + | WCSCMD_ wcs | WIDTHCMD_ int {global canvas; RealizeDS9; set canvas(width) $2; UpdateView} | ZMAXCMD_ {global scale; set scale(mode) zmax; ChangeScaleMode} | ZOOMCMD_ {ProcessRealizeDS9} zoom @@ -390,20 +398,24 @@ skysize : numeric numeric {global yy; set yy(w) $1; set yy(h) $2; set yy(rformat | numeric numeric skydist {global yy; set yy(w) $1; set yy(h) $2; set yy(rformat) $3} ; -skydist : DEGREES_ {set _ degrees} - | ARCMIN_ {set _ arcmin} - | ARCSEC_ {set _ arcsec} - ; - skyframe : FK4_ {set _ fk4} | B1950_ {set _ fk4} | FK5_ {set _ fk5} | J2000_ {set _ fk5} | ICRS_ {set _ icrs} - | GALATIC_ {set _ galactic} + | GALACTIC_ {set _ galactic} | ECLIPTIC_ {set _ ecliptic} ; +skyformat : DEGREES_ {set _ degrees} + | SEXAGESIMAL_ {set _ sexagesimal} + ; + +skydist : DEGREES_ {set _ degrees} + | ARCMIN_ {set _ arcmin} + | ARCSEC_ {set _ arcsec} + ; + coordsys : IMAGE_ {set _ image} | PHYSICAL_ {set _ physical} | AMPLIFIER_ {set _ amplifier} @@ -1027,6 +1039,24 @@ tileGridDir : X_ {set _ x} | Y_ {set _ y} ; +wcs : OPEN_ {WCSDialog} + | CLOSE_ {WCSDestroyDialog} + | SYSTEM_ wcssys {global wcs; set wcs(system) $2; UpdateWCS} + | SKY_ skyframe {global wcs; set wcs(sky) $2; UpdateWCS} + | FORMAT_ skyformat {global wcs; set wcs(skyformat) $2; UpdateWCS} + | SKYFORMAT_ skyformat {global wcs; set wcs(skyformat) $2; UpdateWCS} + | ALIGN_ yesno {global current; set current(align) $2; AlignWCSFrame} + | RESET_ {WCSResetCmd 1} + | RESET_ int {WCSResetCmd $2} + | REPLACE_ STRING_ + | REPLACE_ int STRING_ + | APPEND_ STRING_ + | APPEND_ int STRING_ + | wcssys {global wcs; set wcs(system) $1; UpdateWCS} + | skyframe {global wcs; set wcs(sky) $1; UpdateWCS} + | skyformat {global wcs; set wcs(skyformat) $1; UpdateWCS} + ; + zoom : numeric {Zoom $1 $1} | numeric numeric {Zoom $1 $2} | OPEN_ {PanZoomDialog} diff --git a/ds9/library/util.tcl b/ds9/library/util.tcl index c14a43b..167a95a 100644 --- a/ds9/library/util.tcl +++ b/ds9/library/util.tcl @@ -1511,10 +1511,10 @@ proc ProcessSleepCmd {varname iname} { proc ProcessSourceCmd {varname iname} { upvar $varname var upvar $iname i - SourceFileCmd [lindex $var $i] + SourceCmd [lindex $var $i] } -proc SourceFileCmd {fn} { +proc SourceCmd {fn} { # we need to be realized # you never know what someone will try to do ProcessRealizeDS9 diff --git a/ds9/library/wcs.tcl b/ds9/library/wcs.tcl index b790917..fb3b7dc 100644 --- a/ds9/library/wcs.tcl +++ b/ds9/library/wcs.tcl @@ -1249,6 +1249,15 @@ proc ProcessWCSCmd {varname iname sock fn} { } } +proc WCSResetCmd {ext} { + global current + global rgb + + RGBEvalLock rgb(lock,wcs) $current(frame) \ + [list $current(frame) wcs reset $ext] + UpdateWCS +} + proc ProcessSendWCSCmd {proc id param} { global current global wcs |