From dc1c107ac6d51fab16940a4c197438c46ca68f2e Mon Sep 17 00:00:00 2001 From: William Joye Date: Thu, 8 Mar 2018 17:25:47 -0500 Subject: simplify ds9 imgsvr parsers --- ds9/library/imgsvr.tcl | 76 ++++++++++++++++++++++++++++++++++++++++++ ds9/library/stsci.tcl | 6 ++-- ds9/parsers/dssesoparser.tac | 24 ++++++------- ds9/parsers/dsssaoparser.tac | 22 ++++++------ ds9/parsers/dssstsciparser.tac | 28 ++++++++-------- ds9/parsers/nvssparser.tac | 22 ++++++------ ds9/parsers/skyviewparser.tac | 26 +++++++-------- ds9/parsers/twomassparser.tac | 24 ++++++------- ds9/parsers/vlaparser.tac | 24 ++++++------- ds9/parsers/vlssparser.tac | 22 ++++++------ 10 files changed, 175 insertions(+), 99 deletions(-) diff --git a/ds9/library/imgsvr.tcl b/ds9/library/imgsvr.tcl index 1144069..2af43fd 100644 --- a/ds9/library/imgsvr.tcl +++ b/ds9/library/imgsvr.tcl @@ -582,3 +582,79 @@ proc IMGSVRProcessSendCmd {proc id param vvarname} { default {$proc $id "$vvar(name)\n"} } } + +proc IMGSVRCmdName {varname name} { + upvar #0 $varname var + global $varname + + set var(name) $name + if {$name != {}} { + IMGSVRApply $varname 1 + } +} + +proc IMGSVRCmdCoord {varname xx yy skyformat} { + upvar #0 $varname var + global $varname + + set var(x) $xx + set var(y) $yy + set var(skyformat) $skyformat + set var(skyformat,msg) $skyformat + IMGSVRApply $varname 1 +} + +proc IMGSVRCmdSize {varname ww hh rformat} { + upvar #0 $varname var + global $varname + + set var(width) $ww + set var(height) $hh + set var(rformat) $rformat + set var(rformat,msg) $rformat +} + +proc IMGSVRCmdPixels {varname ww hh} { + upvar #0 $varname var + global $varname + + set var(width,pixels) $ww + set var(height,pixels) $hh +} + +proc IMGSVRCmdSave {varname save} { + upvar #0 $varname var + global $varname + + set var(save) $save +} + +proc IMGSVRCmdMode {varname mode} { + upvar #0 $varname var + global $varname + + set var(mode) $mode +} + +proc IMGSVRCmdSurvey {varname survey} { + upvar #0 $varname var + global $varname + + set var(survey) $survey +} + +proc IMGSVRCmdUpdateFrame {varname} { + upvar #0 $varname var + global $varname + + IMGSVRUpdate $varname + IMGSVRApply $varname 1 +} + +proc IMGSVRCmdUpdateCrosshair {varname} { + upvar #0 $varname var + global $varname + + IMGSVRUpdate $varname + IMGSVRApply $varname 1 +} diff --git a/ds9/library/stsci.tcl b/ds9/library/stsci.tcl index 3019b0d..c2ab594 100644 --- a/ds9/library/stsci.tcl +++ b/ds9/library/stsci.tcl @@ -30,7 +30,7 @@ proc STSCIDialog {} { return } - set varname dstscii + set varname dstsci upvar #0 $varname var global $varname @@ -185,10 +185,10 @@ proc oProcessSTSCICmd {varname iname} { upvar $iname i STSCIDialog - IMGSVRProcessCmd $varname $iname dstscii + IMGSVRProcessCmd $varname $iname dstsci } proc ProcessSendSTSCICmd {proc id param} { STSCIDialog - IMGSVRProcessSendCmd $proc $id $param dstscii + IMGSVRProcessSendCmd $proc $id $param dstsci } diff --git a/ds9/parsers/dssesoparser.tac b/ds9/parsers/dssesoparser.tac index 1b6bccc..66a2f5a 100644 --- a/ds9/parsers/dssesoparser.tac +++ b/ds9/parsers/dssesoparser.tac @@ -25,22 +25,22 @@ command : dsseso dsseso : {IMGSVRApply deso 1} | OPEN_ {} | CLOSE_ {ARDestroy deso} - | STRING_ {global deso; set deso(name) $1; IMGSVRApply deso 1} - | numeric numeric coordOpt {global deso; set deso(x) $1; set deso(y) $2; set deso(skyformat) degrees; set deso(skyformat,msg) degrees; IMGSVRApply deso 1} - | SEXSTR_ SEXSTR_ coordOpt {global deso; set deso(x) $1; set deso(y) $2; set deso(skyformat) sexagesimal; set deso(skyformat,msg) sexagesimal; IMGSVRApply deso 1} - | SIZE_ numeric numeric sizeOpt {global deso; set deso(width) $2; set deso(height) $3; set deso(rformat) $4; set deso(rformat,msg) $4} - | SAVE_ yesno {global deso; set deso(save) $2} - | FRAME_ frame {global deso; set deso(mode) $2} + | STRING_ {IMGSVRCmdName deso $1} + | numeric numeric coordOpt {IMGSVRCmdCoord deso $1 $2 degrees} + | SEXSTR_ SEXSTR_ coordOpt {IMGSVRCmdCoord deso $1 $2 sexagesimal} + | SIZE_ numeric numeric sizeOpt {IMGSVRCmdSize deso $2 $3 $4} + | SAVE_ yesno {IMGSVRCmdSave deso $2} + | FRAME_ frame {IMGSVRCmdMode deso $2} + | SURVEY_ survey {IMGSVRCmdSurvey deso $2} | UPDATE_ update - | SURVEY_ survey {global deso; set deso(survey) $2} - | COORD_ numeric numeric deg {global deso; set deso(x) $2; set deso(y) $3; set deso(skyformat) $4; set deso(skyformat,msg) $4; IMGSVRApply deso 1} - | COORD_ SEXSTR_ SEXSTR_ sex {global deso; set deso(x) $2; set deso(y) $3; set deso(skyformat) $4; set deso(skyformat,msg) $4; IMGSVRApply deso 1} - | NAME_ STRING_ {global deso; set deso(name) $2; IMGSVRApply deso 1} + | COORD_ numeric numeric deg {IMGSVRCmdCoord deso $2 $3 $4} + | COORD_ SEXSTR_ SEXSTR_ sex {IMGSVRCmdCoord deso $2 $3 $4} + | NAME_ STRING_ {IMGSVRCmdName deso $2} ; -update : FRAME_ {IMGSVRUpdate deso; IMGSVRApply deso 1} - | CROSSHAIR_ {IMGSVRCrosshair deso; IMGSVRApply deso 1} +update : FRAME_ {IMGSVRCmdUpdateFrame deso} + | CROSSHAIR_ {IMGSVRCmdUpdateCrosshair deso} ; survey : DSS1_ {set _ DSS1} diff --git a/ds9/parsers/dsssaoparser.tac b/ds9/parsers/dsssaoparser.tac index d774630..d4f54b0 100644 --- a/ds9/parsers/dsssaoparser.tac +++ b/ds9/parsers/dsssaoparser.tac @@ -20,21 +20,21 @@ command : dsssao dsssao : {IMGSVRApply dsao 1} | OPEN_ {} | CLOSE_ {ARDestroy dsao} - | STRING_ {global dsao; set dsao(name) $1; IMGSVRApply dsao 1} - | numeric numeric coordOpt {global dsao; set dsao(x) $1; set dsao(y) $2; set dsao(skyformat) degrees; set dsao(skyformat,msg) degrees; IMGSVRApply dsao 1} - | SEXSTR_ SEXSTR_ coordOpt {global dsao; set dsao(x) $1; set dsao(y) $2; set dsao(skyformat) sexagesimal; set dsao(skyformat,msg) sexagesimal; IMGSVRApply dsao 1} - | SIZE_ numeric numeric sizeOpt {global dsao; set dsao(width) $2; set dsao(height) $3; set dsao(rformat) $4; set dsao(rformat,msg) $4} - | SAVE_ yesno {global dsao; set dsao(save) $2} - | FRAME_ frame {global dsao; set dsao(mode) $2} + | STRING_ {IMGSVRCmdName dsao $1} + | numeric numeric coordOpt {IMGSVRCmdCoord dsao $1 $2 degrees} + | SEXSTR_ SEXSTR_ coordOpt {IMGSVRCmdCoord dsao $1 $2 sexagesimal} + | SIZE_ numeric numeric sizeOpt {IMGSVRCmdSize dsao $2 $3 $4} + | SAVE_ yesno {IMGSVRCmdSave dsao $2} + | FRAME_ frame {IMGSVRCmdMode dsao $2} | UPDATE_ update - | COORD_ numeric numeric deg {global dsao; set dsao(x) $2; set dsao(y) $3; set dsao(skyformat) $4; set dsao(skyformat,msg) $4; IMGSVRApply dsao 1} - | COORD_ SEXSTR_ SEXSTR_ sex {global dsao; set dsao(x) $2; set dsao(y) $3; set dsao(skyformat) $4; set dsao(skyformat,msg) $4; IMGSVRApply dsao 1} - | NAME_ STRING_ {global dsao; set dsao(name) $2; IMGSVRApply dsao 1} + | COORD_ numeric numeric deg {IMGSVRCmdCoord dsao $2 $3 $4} + | COORD_ SEXSTR_ SEXSTR_ sex {IMGSVRCmdCoord dsao $2 $3 $4} + | NAME_ STRING_ {IMGSVRCmdName dsao $2} ; -update : FRAME_ {IMGSVRUpdate dsao; IMGSVRApply dsao 1} - | CROSSHAIR_ {IMGSVRCrosshair dsao; IMGSVRApply dsao 1} +update : FRAME_ {IMGSVRCmdUpdateFrame dsao} + | CROSSHAIR_ {IMGSVRCmdUpdateCrosshair dsao} ; %% diff --git a/ds9/parsers/dssstsciparser.tac b/ds9/parsers/dssstsciparser.tac index 649b2f3..96ae566 100644 --- a/ds9/parsers/dssstsciparser.tac +++ b/ds9/parsers/dssstsciparser.tac @@ -27,25 +27,25 @@ command : dssstsci | dssstsci {yyclearin; YYACCEPT} CMD_ ; -dssstsci : {IMGSVRApply dstscii 1} +dssstsci : {IMGSVRApply dstsci 1} | OPEN_ {} - | CLOSE_ {ARDestroy dstscii} - | STRING_ {global dstscii; set dstscii(name) $1; IMGSVRApply dstscii 1} - | numeric numeric coordOpt {global dstscii; set dstscii(x) $1; set dstscii(y) $2; set dstscii(skyformat) degrees; set dstscii(skyformat,msg) degrees; IMGSVRApply dstscii 1} - | SEXSTR_ SEXSTR_ coordOpt {global dstscii; set dstscii(x) $1; set dstscii(y) $2; set dstscii(skyformat) sexagesimal; set dstscii(skyformat,msg) sexagesimal; IMGSVRApply dstscii 1} - | SIZE_ numeric numeric sizeOpt {global dstscii; set dstscii(width) $2; set dstscii(height) $3; set dstscii(rformat) $4; set dstscii(rformat,msg) $4} - | SAVE_ yesno {global dstscii; set dstscii(save) $2} - | FRAME_ frame {global dstscii; set dstscii(mode) $2} + | CLOSE_ {ARDestroy dstsci} + | STRING_ {IMGSVRCmdName dstsci $1} + | numeric numeric coordOpt {IMGSVRCmdCoord dstsci $1 $2 degrees} + | SEXSTR_ SEXSTR_ coordOpt {IMGSVRCmdCoord dstsci $1 $2 sexagesimal} + | SIZE_ numeric numeric sizeOpt {IMGSVRCmdSize dstsci $2 $3 $4} + | SAVE_ yesno {IMGSVRCmdSave dstsci $2} + | FRAME_ frame {IMGSVRCmdMode dstsci $2} + | SURVEY_ survey {IMGSVRCmdSurvey dstsci $2} | UPDATE_ update - | SURVEY_ survey {global dstscii; set dstscii(survey) $2} - | COORD_ numeric numeric deg {global dstscii; set dstscii(x) $2; set dstscii(y) $3; set dstscii(skyformat) $4; set dstscii(skyformat,msg) $4; IMGSVRApply dstscii 1} - | COORD_ SEXSTR_ SEXSTR_ sex {global dstscii; set dstscii(x) $2; set dstscii(y) $3; set dstscii(skyformat) $4; set dstscii(skyformat,msg) $4; IMGSVRApply dstscii 1} - | NAME_ STRING_ {global dstscii; set dstscii(name) $2; IMGSVRApply dstscii 1} + | COORD_ numeric numeric deg {IMGSVRCmdCoord dstsci $2 $3 $4} + | COORD_ SEXSTR_ SEXSTR_ sex {IMGSVRCmdCoord dstsci $2 $3 $4} + | NAME_ STRING_ {IMGSVRCmdName dstsci $2} ; -update : FRAME_ {IMGSVRUpdate dstscii; IMGSVRApply dstscii 1} - | CROSSHAIR_ {IMGSVRCrosshair dstscii; IMGSVRApply dstscii 1} +update : FRAME_ {IMGSVRCmdUpdateFrame dstsci} + | CROSSHAIR_ {IMGSVRCmdUpdateCrosshair dstsci} ; survey : POSS2RED_ {set _ poss2ukstu_red} diff --git a/ds9/parsers/nvssparser.tac b/ds9/parsers/nvssparser.tac index 7efa349..af01121 100644 --- a/ds9/parsers/nvssparser.tac +++ b/ds9/parsers/nvssparser.tac @@ -20,21 +20,21 @@ command : nvss nvss : {IMGSVRApply dnvss 1} | OPEN_ {} | CLOSE_ {ARDestroy dnvss} - | STRING_ {global dnvss; set dnvss(name) $1; IMGSVRApply dnvss 1} - | numeric numeric coordOpt {global dnvss; set dnvss(x) $1; set dnvss(y) $2; set dnvss(skyformat) degrees; set dnvss(skyformat,msg) degrees; IMGSVRApply dnvss 1} - | SEXSTR_ SEXSTR_ coordOpt {global dnvss; set dnvss(x) $1; set dnvss(y) $2; set dnvss(skyformat) sexagesimal; set dnvss(skyformat,msg) sexagesimal; IMGSVRApply dnvss 1} - | SIZE_ numeric numeric sizeOpt {global dnvss; set dnvss(width) $2; set dnvss(height) $3; set dnvss(rformat) $4; set dnvss(rformat,msg) $4} - | SAVE_ yesno {global dnvss; set dnvss(save) $2} - | FRAME_ frame {global dnvss; set dnvss(mode) $2} + | STRING_ {IMGSVRCmdName dnvss $1} + | numeric numeric coordOpt {IMGSVRCmdCoord dnvss $1 $2 degrees} + | SEXSTR_ SEXSTR_ coordOpt {IMGSVRCmdCoord dnvss $1 $2 sexagesimal} + | SIZE_ numeric numeric sizeOpt {IMGSVRCmdSize dnvss $2 $3 $4} + | SAVE_ yesno {IMGSVRCmdSave dnvss $2} + | FRAME_ frame {IMGSVRCmdMode dnvss $2} | UPDATE_ update - | COORD_ numeric numeric deg {global dnvss; set dnvss(x) $2; set dnvss(y) $3; set dnvss(skyformat) $4; set dnvss(skyformat,msg) $4; IMGSVRApply dnvss 1} - | COORD_ SEXSTR_ SEXSTR_ sex {global dnvss; set dnvss(x) $2; set dnvss(y) $3; set dnvss(skyformat) $4; set dnvss(skyformat,msg) $4; IMGSVRApply dnvss 1} - | NAME_ STRING_ {global dnvss; set dnvss(name) $2; IMGSVRApply dnvss 1} + | COORD_ numeric numeric deg {IMGSVRCmdCoord dnvss $2 $3 $4} + | COORD_ SEXSTR_ SEXSTR_ sex {IMGSVRCmdCoord dnvss $2 $3 $4} + | NAME_ STRING_ {IMGSVRCmdName dnvss $2} ; -update : FRAME_ {IMGSVRUpdate dnvss; IMGSVRApply dnvss 1} - | CROSSHAIR_ {IMGSVRCrosshair dnvss; IMGSVRApply dnvss 1} +update : FRAME_ {IMGSVRCmdUpdateFrame dnvss} + | CROSSHAIR_ {IMGSVRCmdUpdateCrosshair dnvss} ; %% diff --git a/ds9/parsers/skyviewparser.tac b/ds9/parsers/skyviewparser.tac index 9384969..75fc09f 100644 --- a/ds9/parsers/skyviewparser.tac +++ b/ds9/parsers/skyviewparser.tac @@ -22,23 +22,23 @@ command : skyview skyview : {IMGSVRApply dskyview 1} | OPEN_ {} | CLOSE_ {ARDestroy dskyview} - | STRING_ {global dskyview; set dskyview(name) $1; IMGSVRApply dskyview 1} - | numeric numeric coordOpt {global dskyview; set dskyview(x) $1; set dskyview(y) $2; set dskyview(skyformat) degrees; set dskyview(skyformat,msg) degrees; IMGSVRApply dskyview 1} - | SEXSTR_ SEXSTR_ coordOpt {global dskyview; set dskyview(x) $1; set dskyview(y) $2; set dskyview(skyformat) sexagesimal; set dskyview(skyformat,msg) sexagesimal; IMGSVRApply dskyview 1} - | SIZE_ numeric numeric sizeOpt {global dskyview; set dskyview(width) $2; set dskyview(height) $3; set dskyview(rformat) $4; set dskyview(rformat,msg) $4} - | PIXELS_ numeric numeric {global dskyview; set dskyview(width,pixels) $2; set dskyview(height,pixels) $3} - | SAVE_ yesno {global dskyview; set dskyview(save) $2} - | FRAME_ frame {global dskyview; set dskyview(mode) $2} + | STRING_ {IMGSVRCmdName dskyview $1} + | numeric numeric coordOpt {IMGSVRCmdCoord dskyview $1 $2 degrees} + | SEXSTR_ SEXSTR_ coordOpt {IMGSVRCmdCoord dskyview $1 $2 sexagesimal} + | SIZE_ numeric numeric sizeOpt {IMGSVRCmdSize dskyview $2 $3 $4} + | PIXELS_ numeric numeric {IMGSVRCmdPixels dskyview $2 $3} + | SAVE_ yesno {IMGSVRCmdSave dskyview $2} + | FRAME_ frame {IMGSVRCmdMode dskyview $2} + | SURVEY_ STRING_ {IMGSVRCmdSurvey dskyview $2} | UPDATE_ update - | SURVEY_ STRING_ {global dskyview; set dskyview(survey) $2} - | COORD_ numeric numeric deg {global dskyview; set dskyview(x) $2; set dskyview(y) $3; set dskyview(skyformat) $4; set dskyview(skyformat,msg) $4; IMGSVRApply dskyview 1} - | COORD_ SEXSTR_ SEXSTR_ sex {global dskyview; set dskyview(x) $2; set dskyview(y) $3; set dskyview(skyformat) $4; set dskyview(skyformat,msg) $4; IMGSVRApply dskyview 1} - | NAME_ STRING_ {global dskyview; set dskyview(name) $2; IMGSVRApply dskyview 1} + | COORD_ numeric numeric deg {IMGSVRCmdCoord dskyview $2 $3 $4} + | COORD_ SEXSTR_ SEXSTR_ sex {IMGSVRCmdCoord dskyview $2 $3 $4} + | NAME_ STRING_ {IMGSVRCmdName dskyview $2} ; -update : FRAME_ {IMGSVRUpdate dskyview; IMGSVRApply dskyview 1} - | CROSSHAIR_ {IMGSVRCrosshair dskyview; IMGSVRApply dskyview 1} +update : FRAME_ {IMGSVRCmdUpdateFrame dskyview} + | CROSSHAIR_ {IMGSVRCmdUpdateCrosshair dskyview} ; %% diff --git a/ds9/parsers/twomassparser.tac b/ds9/parsers/twomassparser.tac index d206d1a..f7f02b5 100644 --- a/ds9/parsers/twomassparser.tac +++ b/ds9/parsers/twomassparser.tac @@ -20,22 +20,22 @@ command : 2mass 2mass : {IMGSVRApply dtwomass 1} | OPEN_ {} | CLOSE_ {ARDestroy dtwomass} - | STRING_ {global dtwomass; set dtwomass(name) $1; IMGSVRApply dtwomass 1} - | numeric numeric coordOpt {global dtwomass; set dtwomass(x) $1; set dtwomass(y) $2; set dtwomass(skyformat) degrees; set dtwomass(skyformat,msg) degrees; IMGSVRApply dtwomass 1} - | SEXSTR_ SEXSTR_ coordOpt {global dtwomass; set dtwomass(x) $1; set dtwomass(y) $2; set dtwomass(skyformat) sexagesimal; set dtwomass(skyformat,msg) sexagesimal; IMGSVRApply dtwomass 1} - | SIZE_ numeric numeric sizeOpt {global dtwomass; set dtwomass(width) $2; set dtwomass(height) $3; set dtwomass(rformat) $4; set dtwomass(rformat,msg) $4} - | SAVE_ yesno {global dtwomass; set dtwomass(save) $2} - | FRAME_ frame {global dtwomass; set dtwomass(mode) $2} + | STRING_ {IMGSVRCmdName dtwomass $1} + | numeric numeric coordOpt {IMGSVRCmdCoord dtwomass $1 $2 degrees} + | SEXSTR_ SEXSTR_ coordOpt {IMGSVRCmdCoord dtwomass $1 $2 sexagesimal} + | SIZE_ numeric numeric sizeOpt {IMGSVRCmdSize dtwomass $2 $3 $4} + | SAVE_ yesno {IMGSVRCmdSave dtwomass $2} + | FRAME_ frame {IMGSVRCmdMode dtwomass $2} + | SURVEY_ survey {IMGSVRCmdSurvey dtwomass $2} | UPDATE_ update - | SURVEY_ survey {global dtwomass; set dtwomass(survey) $2} - | COORD_ numeric numeric deg {global dtwomass; set dtwomass(x) $2; set dtwomass(y) $3; set dtwomass(skyformat) $4; set dtwomass(skyformat,msg) $4; IMGSVRApply dtwomass 1} - | COORD_ SEXSTR_ SEXSTR_ sex {global dtwomass; set dtwomass(x) $2; set dtwomass(y) $3; set dtwomass(skyformat) $4; set dtwomass(skyformat,msg) $4; IMGSVRApply dtwomass 1} - | NAME_ STRING_ {global dtwomass; set dtwomass(name) $2; IMGSVRApply dtwomass 1} + | COORD_ numeric numeric deg {IMGSVRCmdCoord dtwomass $2 $3 $4} + | COORD_ SEXSTR_ SEXSTR_ sex {IMGSVRCmdCoord dtwomass $2 $3 $4} + | NAME_ STRING_ {IMGSVRCmdName dtwomass $2} ; -update : FRAME_ {IMGSVRUpdate dtwomass; IMGSVRApply dtwomass 1} - | CROSSHAIR_ {IMGSVRCrosshair dtwomass; IMGSVRApply dtwomass 1} +update : FRAME_ {IMGSVRCmdUpdateFrame dtwomass} + | CROSSHAIR_ {IMGSVRCmdUpdateCrosshair dtwomass} ; survey : 'j' {set _ $1} diff --git a/ds9/parsers/vlaparser.tac b/ds9/parsers/vlaparser.tac index 9a8369f..bcb5a51 100644 --- a/ds9/parsers/vlaparser.tac +++ b/ds9/parsers/vlaparser.tac @@ -23,22 +23,22 @@ command : vla vla : {IMGSVRApply dvla 1} | OPEN_ {} | CLOSE_ {ARDestroy dvla} - | STRING_ {global dvla; set dvla(name) $1; IMGSVRApply dvla 1} - | numeric numeric coordOpt {global dvla; set dvla(x) $1; set dvla(y) $2; set dvla(skyformat) degrees; set dvla(skyformat,msg) degrees; IMGSVRApply dvla 1} - | SEXSTR_ SEXSTR_ coordOpt {global dvla; set dvla(x) $1; set dvla(y) $2; set dvla(skyformat) sexagesimal; set dvla(skyformat,msg) sexagesimal; IMGSVRApply dvla 1} - | SIZE_ numeric numeric sizeOpt {global dvla; set dvla(width) $2; set dvla(height) $3; set dvla(rformat) $4; set dvla(rformat,msg) $4} - | SAVE_ yesno {global dvla; set dvla(save) $2} - | FRAME_ frame {global dvla; set dvla(mode) $2} + | STRING_ {IMGSVRCmdName dvla $1} + | numeric numeric coordOpt {IMGSVRCmdCoord dvla $1 $2 degrees} + | SEXSTR_ SEXSTR_ coordOpt {IMGSVRCmdCoord dvla $1 $2 sexagesimal} + | SIZE_ numeric numeric sizeOpt {IMGSVRCmdSize dvla $2 $3 $4} + | SAVE_ yesno {IMGSVRCmdSave dvla $2} + | FRAME_ frame {IMGSVRCmdMode dvla $2} + | SURVEY_ survey {IMGSVRCmdSurvey dvla $2} | UPDATE_ update - | SURVEY_ survey {global dvla; set dvla(survey) $2} - | COORD_ numeric numeric deg {global dvla; set dvla(x) $2; set dvla(y) $3; set dvla(skyformat) $4; set dvla(skyformat,msg) $4; IMGSVRApply dvla 1} - | COORD_ SEXSTR_ SEXSTR_ sex {global dvla; set dvla(x) $2; set dvla(y) $3; set dvla(skyformat) $4; set dvla(skyformat,msg) $4; IMGSVRApply dvla 1} - | NAME_ STRING_ {global dvla; set dvla(name) $2; IMGSVRApply dvla 1} + | COORD_ numeric numeric deg {IMGSVRCmdCoord dvla $2 $3 $4} + | COORD_ SEXSTR_ SEXSTR_ sex {IMGSVRCmdCoord dvla $2 $3 $4} + | NAME_ STRING_ {IMGSVRCmdName dvla $2} ; -update : FRAME_ {IMGSVRUpdate dvla; IMGSVRApply dvla 1} - | CROSSHAIR_ {IMGSVRCrosshair dvla; IMGSVRApply dvla 1} +update : FRAME_ {IMGSVRCmdUpdateFrame dvla} + | CROSSHAIR_ {IMGSVRCmdUpdateCrosshair dvla} ; survey : STRIPE82_ {set _ stripe82} diff --git a/ds9/parsers/vlssparser.tac b/ds9/parsers/vlssparser.tac index 9cccb35..1f2a18b 100644 --- a/ds9/parsers/vlssparser.tac +++ b/ds9/parsers/vlssparser.tac @@ -20,21 +20,21 @@ command : vlss vlss : {IMGSVRApply dvlss 1} | OPEN_ {} | CLOSE_ {ARDestroy dvlss} - | STRING_ {global dvlss; set dvlss(name) $1; IMGSVRApply dvlss 1} - | numeric numeric coordOpt {global dvlss; set dvlss(x) $1; set dvlss(y) $2; set dvlss(skyformat) degrees; set dvlss(skyformat,msg) degrees; IMGSVRApply dvlss 1} - | SEXSTR_ SEXSTR_ coordOpt {global dvlss; set dvlss(x) $1; set dvlss(y) $2; set dvlss(skyformat) sexagesimal; set dvlss(skyformat,msg) sexagesimal; IMGSVRApply dvlss 1} - | SIZE_ numeric numeric sizeOpt {global dvlss; set dvlss(width) $2; set dvlss(height) $3; set dvlss(rformat) $4; set dvlss(rformat,msg) $4} - | SAVE_ yesno {global dvlss; set dvlss(save) $2} - | FRAME_ frame {global dvlss; set dvlss(mode) $2} + | STRING_ {IMGSVRCmdName dvlss $1} + | numeric numeric coordOpt {IMGSVRCmdCoord dvlss $1 $2 degrees} + | SEXSTR_ SEXSTR_ coordOpt {IMGSVRCmdCoord dvlss $1 $2 sexagesimal} + | SIZE_ numeric numeric sizeOpt {IMGSVRCmdSize dvlss $2 $3 $4} + | SAVE_ yesno {IMGSVRCmdSave dvlss $2} + | FRAME_ frame {IMGSVRCmdMode dvlss $2} | UPDATE_ update - | COORD_ numeric numeric deg {global dvlss; set dvlss(x) $2; set dvlss(y) $3; set dvlss(skyformat) $4; set dvlss(skyformat,msg) $4; IMGSVRApply dvlss 1} - | COORD_ SEXSTR_ SEXSTR_ sex {global dvlss; set dvlss(x) $2; set dvlss(y) $3; set dvlss(skyformat) $4; set dvlss(skyformat,msg) $4; IMGSVRApply dvlss 1} - | NAME_ STRING_ {global dvlss; set dvlss(name) $2; IMGSVRApply dvlss 1} + | COORD_ numeric numeric deg {IMGSVRCmdCoord dvlss $2 $3 $4} + | COORD_ SEXSTR_ SEXSTR_ sex {IMGSVRCmdCoord dvlss $2 $3 $4} + | NAME_ STRING_ {IMGSVRCmdName dvlss $2} ; -update : FRAME_ {IMGSVRUpdate dvlss; IMGSVRApply dvlss 1} - | CROSSHAIR_ {IMGSVRCrosshair dvlss; IMGSVRApply dvlss 1} +update : FRAME_ {IMGSVRCmdUpdateFrame dvlss} + | CROSSHAIR_ {IMGSVRCmdUpdateCrosshair dvlss} ; %% -- cgit v0.12