diff options
-rw-r--r-- | ds9/library/lex.fcl | 26 | ||||
-rw-r--r-- | ds9/library/parser.tac | 128 |
2 files changed, 152 insertions, 2 deletions
diff --git a/ds9/library/lex.fcl b/ds9/library/lex.fcl index 564b60c..b75d3eb 100644 --- a/ds9/library/lex.fcl +++ b/ds9/library/lex.fcl @@ -21,6 +21,7 @@ E [Ee][+-]?{D}+ -3d {return $::3DCMD_} -align {return $::ALIGNCMD_} -asinh {return $::ASINHCMD_} +-bin {return $::BINCMD_} -bg {return $::BGCMD_} -background {return $::BGCMD_} -blink {return $::BLINKCMD_} @@ -30,6 +31,7 @@ E [Ee][+-]?{D}+ -console {return $::CONSOLECMD_} -cursor {return $::CURSORCMD_} -exit {return $::QUITCMD_} +-fits {return $::FITSCMD_} -frame {return $::FRAMECMD_} -green {return $::GREENCMD_} -help {return $::HELPCMD_} @@ -39,6 +41,7 @@ E [Ee][+-]?{D}+ -linear {return $::LINEARCMD_} -log {return $::LOGCMD_} -lower {return $::LOWERCMD_} +-minmax {return $::MINMAXCMD_} -nan {return $::NANCMD_} -orient {return $::ORIENTCMD_} -pan {return $::PANCMD_} @@ -59,45 +62,57 @@ E [Ee][+-]?{D}+ -theme {return $::THREMECMD_} -threads {return $::THREADSCMD_} -tile {return $::TILECMD_} +-zmax {return $::ZMAXCMD_} -zoom {return $::ZOOMCMD_} -zscale {return $::ZSCALECMD_} 3d {return $::3D_} +about {return $::ABOUT_} aip {return $::AIP_} all {return $::ALL_} amplifier {return $::AMPLIFIER_} arcmin {return $::ARCMIN_} arcsec {return $::ARCSEC_} asinh {return $::ASINH_} +average {return $::AVERAGE_} azimuth {return $::AZIMUTH_} az {return $::AZIMUTH_} +auto {return $::AUTO_} automatic {return $::AUTOMATIC_} back {return $::BACK_} background {return $::BACKGROUND_} bg {return $::BACKGROUND_} bgcolor {return $::BGCOLOR_} border {return $::BORDER_} +buffersize {return $::BUFFERSIZE_} center {return $::CENTER_} clear {return $::CLEAR_} close {return $::CLOSE_} color {return $::COLOR_} +cols {return $::COLS_} column {return $::COLUMN_} +colsz {return $::COLSZ_} compass {return $::COMPASS_} contrast {return $::CONTRAST_} coord {return $::COORD_} crosshair {return $::CROSSHAIR_} current {return $::CURRENT_} +datamin {return $::DATAMIN_} datasec {return $::DATASEC_} delete {return $::DELETE_} +depth {return $::DEPTH_} detector {return $::DETECTOR_} degrees {return $::DEGREES_} direction {return $::DIRECTION_} elevation {return $::ELEVATION_} el {return $::ELEVATION_} exp {return $::EXP_} +factor {return $::FACTOR_} false {return $::FALSE_} +filter {return $::FILTER_} first {return $::FIRST_} fit {return $::FIT_} +function {return $::FUNCTION_} foward {return $::FOWARD_} frame {return $::FRAME_} frameno {return $::FRAMENO_} @@ -110,7 +125,9 @@ histequ {return $::HISTEQU_} image {return $::IMAGE_} in {return $::IN_} interval {return $::INTERVAL_} +iraf {return $::IRAF_} irafalign {return $::IRAFALIGN_} +irafmin {return $::IRAFMIN_} last {return $::LAST_} layout {return $::LAYOUT_} limits {return $::LIMITS_} @@ -121,11 +138,15 @@ lock {return $::LOCK_} log {return $::LOG_} manual {return $::MANUAL_} match {return $::MATCH_} +mecube {return $::MECUBE_} method {return $::METHOD_} minmax {return $::MINMAX_} mip {return $::MIP_} mode {return $::MODE_} +mosaic {return $::MOSAIC_} +mosaicimage {return $::MOSAICIMAGE_} move {return $::MOVE_} +multiframe {return $::MULTIFRAME_} name {return $::NAME_} nancolor {return $::NANCOLOR_} next {return $::NEXT_} @@ -142,11 +163,14 @@ physical {return $::PHYSICAL_} refresh {return $::REFRESH_} reset {return $::RESET_} rgb {return $::RGB_} +rgbcube {return $::RGBCUBE_} +rgbimage {return $::RGBIMAGE_} row {return $::ROW_} sample {return $::SAMPLE_} save {return $::SAVE_} scale {return $::SCALE_} scalelimits {return $::SCALELIMITS_} +scan {return $::SCAN_} scope {return $::SCOPE_} sexagesimal {return $::SEXAGESIMAL_} show {return $::SHOW_} @@ -154,6 +178,7 @@ sinh {return $::SINH_} size {return $::SIZE_} squared {return $::SQUARED_} sqrt {return $::SQRT_} +sum {return $::SUM_} survey {return $::SURVEY_} threads {return $::THREADS_} to {return $::TO_} @@ -189,6 +214,7 @@ wcsw {return $::WCSW_} wcsx {return $::WCSX_} wcsy {return $::WCSY_} wcsz {return $::WCSZ_} +wfpc2 {return $::WFP2_} x {return $::X_} xy {return $::XY_} y {return $::Y_} diff --git a/ds9/library/parser.tac b/ds9/library/parser.tac index 8169cd3..cd8264b 100644 --- a/ds9/library/parser.tac +++ b/ds9/library/parser.tac @@ -18,6 +18,7 @@ set file(load) 0 %token 3DCMD_ %token ALIGNCMD_ %token ASINHCMD_ +%token BINCMD_ %token BGCMD_ %token BLOCKCMD_ %token BLUECMD_ @@ -26,6 +27,7 @@ set file(load) 0 %token CONSOLECMD_ %token CURSORCMD_ %token GREENCMD_ +%token FITSCMD_ %token FRAMECMD_ %token HELPCMD_ %token HISTEQUCMD_ @@ -34,6 +36,7 @@ set file(load) 0 %token LINEARCMD_ %token LOGCMD_ %token LOWERCMD_ +%token MINMAXCMD_ %token NANCMD_ %token ORIENTCMD_ %token PANCMD_ @@ -54,45 +57,57 @@ set file(load) 0 %token THEMECMD_ %token THREADSCMD_ %token TILECMD_ +%token ZMAXCMD_ %token ZOOMCMD_ %token ZSCALECMD_ %token 3D_ +%token ABOUT_ %token AIP_ %token ALL_ %token AMPLIFIER_ %token ARCMIN_ %token ARCSEC_ %token ASINH_ -%token AZIMUTH_ +%token AUTO_ %token AUTOMATIC_ +%token AVERAGE_ +%token AZIMUTH_ %token BACK_ %token BACKGROUND_ %token BGCOLOR_ %token BORDER_ +%token BUFFERSIZE_ %token CENTER_ %token CLEAR_ %token CLOSE_ %token COLOR_ +%token COLS_ %token COLUMN_ +%token COLSZ_ %token COMPASS_ %token CONTRAST_ %token COORD_ %token CROSSHAIR_ %token CURRENT_ +%token DATAMIN_ %token DATASEC_ %token DEGREES_ +%token DEPTH_ %token DETECTOR_ %token DELETE_ %token DIRECTION_ %token ELEVATION_ %token EXP_ +%token FACTOR_ %token FALSE_ +%token FILTER_ %token FIRST_ %token FIT_ %token FORWARD_ %token FRAME_ %token FRAMENO_ +%token FUNCTION_ %token GAP_ %token GLOBAL_ %token GRID_ @@ -102,7 +117,9 @@ set file(load) 0 %token IMAGE_ %token IN_ %token INTERVAL_ +%token IRAF_ %token IRAFALIGN_ +%token IRAFMIN_ %token LAST_ %token LAYOUT_ %token LIMITS_ @@ -113,11 +130,15 @@ set file(load) 0 %token LOG_ %token MANUAL_ %token MATCH_ +%token MECUBE_ %token METHOD_ %token MINMAX_ %token MIP_ %token MODE_ +%token MOSAIC_ +%token MOSAICIMAGE_ %token MOVE_ +%token MULTIFRAME_ %token NAME_ %token NANCOLOR_ %token NEW_ @@ -134,11 +155,14 @@ set file(load) 0 %token REFRESH_ %token RESET_ %token RGB_ +%token RGBCUBE_ +%token RGBIMAGE_ %token ROW_ %token SAMPLE_ %token SAVE_ %token SCALE_ %token SCALELIMITS_ +%token SCAN_ %token SCOPE_ %token SEXAGESIMAL_ %token SHOW_ @@ -146,6 +170,7 @@ set file(load) 0 %token SIZE_ %token SQUARED_ %token SQRT_ +%token SUM_ %token SURVEY_ %token THREADS_ %token TO_ @@ -180,6 +205,7 @@ set file(load) 0 %token WCSX_ %token WCSY_ %token WCSZ_ +%token WFPC2_ %token X_ %token XY_ %token Y_ @@ -197,6 +223,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | 3DCMD_ {3DDialog} 3d | ALIGNCMD_ align | ASINHCMD_ {global scale; set scale(type) asinh; ChangeScale} + | BINCMD_ bin | BGCMD_ STRING_ {global pds9; set pds9(bg) $2; PrefsBgColor} | BLINKCMD_ blink | BLOCKCMD_ {ProcessRealizeDS9} block @@ -204,6 +231,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | CDCMD_ cd | CONSOLECMD_ {global ds9; OpenConsole; InitError $ds9(msg,src)} | CURSORCMD_ INT_ INT_ {CursorCmd $2 $3} + | FITSCMD_ fits | FRAMECMD_ frame | GREENCMD_ {global current; set current(rgb) green; RGBChannel} | HELPCMD_ {HelpCommand} @@ -214,6 +242,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | LINEARCMD_ {global scale; set scale(type) linear; ChangeScale} | LOGCMD_ {global scale; set scale(type) log; ChangeScale} | LOWERCMD_ {global ds9; lower $ds9(top)} + | MINMAXCMD_ minmax | NANCMD_ STRING_ {global pds9; set pds9(nan) $2; PrefsNanColor} | ORIENTCMD_ orient | PANCMD_ pan @@ -236,6 +265,7 @@ command : 2MASSCMD_ {2MASSDialog} 2mass | THEMECMD_ | THREADSCMD_ INT_ {global ds9; set ds9(threads) $2; ChangeThreads} | TILECMD_ tile + | ZMAXCMD_ {global scale; set scale(mode) zmax; ChangeScaleMode} | ZOOMCMD_ {ProcessRealizeDS9} zoom | ZSCALECMD_ zscale | STRING_ {CommandLineFileName $1} @@ -316,6 +346,40 @@ wcssys : WCS_ {set _ wcs} | WCSZ_ {set _ wcsz} ; +mosaicImageType : mosaicType {set _ $1} + | WFPC2_ {set _ wfpc2} + ; + +mosaicType : IRAF_ {set _ iraf} + | WCS_ {set _ wcs} + | WCSA_ {set _ wcsa} + | WCSB_ {set _ wcsb} + | WCSC_ {set _ wcsc} + | WCSD_ {set _ wcsd} + | WCSE_ {set _ wcse} + | WCSF_ {set _ wcsf} + | WCSG_ {set _ wcsg} + | WCSH_ {set _ wcsh} + | WCSI_ {set _ wcsi} + | WCSJ_ {set _ wcsj} + | WCSK_ {set _ wcsk} + | WCSL_ {set _ wcsl} + | WCSM_ {set _ wcsm} + | WCSN_ {set _ wcsn} + | WCSO_ {set _ wcso} + | WCSP_ {set _ wcsp} + | WCSQ_ {set _ wcsq} + | WCSR_ {set _ wcsr} + | WCSS_ {set _ wcss} + | WCST_ {set _ wcst} + | WCSU_ {set _ wcsu} + | WCSV_ {set _ wcsv} + | WCSW_ {set _ wcsw} + | WCSX_ {set _ wcsx} + | WCSY_ {set _ wcsy} + | WCSZ_ {set _ wcsz} + ; + 2mass : {IMGSVRApply dtwomass 1} | STRING_ {global dtwomass; set dtwomass(name) $1; IMGSVRApply dtwomass 1} | NAME_ STRING_ {global dtwomass; set dtwomass(name) $2; IMGSVRApply dtwomass 1} @@ -414,6 +478,43 @@ blink : {global current; set current(display) blink; DisplayMode} | INTERVAL_ numeric {global blink; set blink(interval) [expr int($2*1000)]; DisplayMode} ; +bin : CLOSE_ {BinDestroyDialog} + | OPEN_ {BinDialog} + | MATCH_ {MatchBinCurrent} + | LOCK_ binLock + | ABOUT_ binAbout + | BUFFERSIZE_ INT_ {global bin; set bin(buffersize) $1; ChangeBinBufferSize} + | COLS_ STRING_ STRING_ {BinCols $2 $3} + | COLSZ_ STRING_ STRING_ STRING_ {BinCols $2 $3 $4} + | FACTOR_ binFactor + | DEPTH_ INT_ {global bin; set bin(depth) $1; ChangeBinDepth} + | FILTER_ STRING_ {BinFilter $2} + | FUNCTION_ binFunction {global bin; set bin(function) $1; ChangeBinFunction} + | IN_ {Bin .5 .5} + | OUT_ {Bin 2 2} + | TO_ binTo + ; + +binLock : {global bin; set bin(lock) 1; LockBinCurrent} + | yesno {global bin; set bin(lock) $1; LockBinCurrent} + ; + +binAbout : numeric numeric {BinAbout $1 $2} + | CENTER_ {BinAboutCenter} + ; + +binFactor : numeric {global bin; set bin(factor) " $1 $1 "; ChangeBinFactor} + | numeric numeric {global bin; set bin(factor) " $1 $2 "; ChangeBinFactor} + ; + +binFunction: AVERAGE_ {set _ average} + | SUM_ {set _ sum} + ; + +binTo: binFactor + | FIT_ {BinToFit} + ; + block : INT_ {Block $1 $1} | INT_ INT_ {Block $1 $2} | OPEN_ {BlockDialog} @@ -439,6 +540,15 @@ cd : STRING_ {cd $2} | '/' {cd /} ; +fits : {global file; set file(type) fits} + | MOSAIC_ mosaicType {global file; set file(type) mosaic; set file(mosaic) $2} + | MOSAICIMAGE_ mosaicImageType {global file; set file(type) mosaicimage; set file(mosaic) $2} + | MECUBE_ {global file; set file(type) mecube} + | MULTIFRAME_ {global file; set file(type) multiframe} + | RGBCUBE_ {global file; set file(type) rgbcube} + | RGBIMAGE_ {global file; set file(type) rgbimage} + ; + frame : | MATCH_ coordsys {MatchFrameCurrent $2} | LOCK_ frameLock @@ -512,6 +622,20 @@ iconify : {global ds9; wm iconify $ds9(top)} | no {global ds9; wm deiconify $ds9(top)} ; +minmax : {global scale; set scale(mode) minmax; ChangeScaleMode} + # backward compatibility + | AUTO_ {global minmax; set minmax(mode) scan; ChangeMinMax} + | SCAN_ {global minmax; set minmax(mode) scan; ChangeMinMax} + | SAMPLE_ {global minmax; set minmax(mode) sample; ChangeMinMax} + | DATAMIN_ {global minmax; set minmax(mode) datamin; ChangeMinMax} + | IRAFMIN_ {global minmax; set minmax(mode) irafmin; ChangeMinMax} + | MODE_ minmaxMode {global minmax; set minmax(mode) $2; ChangeMinMax} + | INTERVAL_ INT_ {global minmax; set minmax(sample) $2; ChangeMinMax} + ; + +minmaxMode : + ; + orient : orientation {global current; set current(orient) $1; ChangeOrient} | OPEN_ {PanZoomDialog} | CLOSE_ {PanZoomDestroyDialog} @@ -651,7 +775,7 @@ zoomTo: FIT_ {ZoomToFit} | numeric numeric {global zoom; set current(zoom) " $1 $2 "; ChangeZoom} ; -zscale : {global zscale; set scale(mode) zscale; ChangeScaleMode} +zscale : {global scale; set scale(mode) zscale; ChangeScaleMode} | CONTRAST_ numeric {global zscale; set zscale(contrast) $2; ChangeZScale} | SAMPLE_ INT_ {global zscale; set zscale(sample) $2; ChangeZScale} | LINE_ INT_ {global zscale; set zscale(line) $2; ChangeZScale} |