blob: 2ba17a2ca650dd32f61caefd4b9dda6f23ab0c7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
%{
%}
%token INT_
%token REAL_
%token STRING_
%token SEXSTR_
%token HMSSTR_
%token DMSSTR_
%token 2MASS_
%token 3D_
%token ABOUT_
%token AIP_
%token ALIGN_
%token ANALYSIS_
%token ARCMIN_
%token ARCSEC_
%token ARRAY_
%token ASINH_
%token AZIMUTH_
%token BACKGROUND_
%token BORDER_
%token CLOSE_
%token COLOR_
%token COMPASS_
%token COORD_
%token CROSSHAIR_
%token CURRENT_
%token DATASEC_
%token DEGREES_
%token ELEVATION_
%token EXP_
%token FALSE_
%token FRAME_
%token GLOBAL_
%token HIGHLITE_
%token HISTEQU_
%token LIMITS_
%token LINEAR_
%token LOCAL_
%token LOCK_
%token LOG_
%token MATCH_
%token METHOD_
%token MINMAX_
%token MIP_
%token MODE_
%token NAME_
%token NEW_
%token NO_
%token NONE_
%token OFF_
%token ON_
%token OPEN_
%token POW_
%token SAVE_
%token SCALE_
%token SCALELIMITS_
%token SCOPE_
%token SEXAGESIMAL_
%token SINH_
%token SIZE_
%token SQUARED_
%token SQRT_
%token SURVEY_
%token TRUE_
%token UPDATE_
%token USER_
%token VIEW_
%token YES_
%token ZSCALE_
%token ZMAX_
%%
commands : commands command
| command
;
command : 2MASS_ {2MASSDialog} 2mass
| 3D_ {3DDialog} 3d
| ABOUT_ about
| ALIGN_ align
| ANALYSIS_ analysis
| ARRAY_ array
| ASINH_ {global scale; set scale(type) asinh; ChangeScale}
| HISTEQU_ {global scale; set scale(type) histequ; ChangeScale}
| LINEAR_ {global scale; set scale(type) linear; ChangeScale}
| LOG_ {global scale; set scale(type) log; ChangeScale}
| POW_ {global scale; set scale(type) pow; ChangeScale}
| SINH_ {global scale; set scale(type) sinh; ChangeScale}
| SQUARED_ {global scale; set scale(type) squared; ChangeScale}
| SQRT_ {global scale; set scale(type) sqrt; ChangeScale}
| SCALE_ scale
;
numeric : REAL_ {set _ $1}
| INT_ {set _ $1}
;
yesno : YES_ {set _ 1}
| TRUE_ {set _ 1}
| ON_ {set _ 1}
| NO_ {set _ 0}
| FALSE_ {set _ 0}
| OFF_ {set _ 0}
| '1' {set _ 1}
# | '0' {set _ 0}
;
newCurrent : NEW_ {set _ new}
| CURRENT_ {set _ current}
;
degArcminArcsec : DEGREES_ {set _ degrees}
| ARCMIN_ {set _ arcmin}
| ARCSEC_ {set _ arcsec}
;
optSex : {set _ sexagesimal}
| SEXAGESIMAL_ {set _ sexagesimal}
;
optDeg : {set _ degrees}
| DEGREES_ {set _ degrees}
;
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}
| COORD_ 2massCoord {IMGSVRApply dtwomass 1}
| SIZE_ 2massSize
| SAVE_ yesno {global dtwomass; set dtwomass(save) $2}
| FRAME_ newCurrent {global dtwomass; set dtwomass(mode) $2}
| UPDATE_ FRAME_ {IMGSVRUpdate dtwomass; IMGSVRApply dtwomass 1}
| UPDATE_ CROSSHAIR_ {IMGSVRCrosshair dtwomass; IMGSVRApply dtwomass 1}
| SURVEY_ 2massSurvey {global dtwomass; set dtwomass(survey) $2}
| OPEN_ {}
| CLOSE_ {ARDestroy dtwomass}
;
2massCoord : SEXSTR_ SEXSTR_ optSex {
global dtwomass
set dtwomass(x) $1
set dtwomass(y) $2
set dtwomass(skyformat) $3
set dtwomass(skyformat,msg) $3
}
| numeric numeric optDeg {
global dtwomass
set dtwomass(x) $1
set dtwomass(y) $2
set dtwomass(skyformat) $3
set dtwomass(skyformat,msg) $3
}
;
2massSize : numeric numeric {
global dtwomass
set dtwomass(width) $1
set dtwomass(height) $2
}
| numeric numeric degArcminArcsec {
global dtwomass
set dtwomass(width) $1
set dtwomass(height) $2
set dtwomass(rformat) $3
set dtwomass(rformat,msg) $3
}
;
2massSurvey : 'j' {set _ $1}
| 'h' {set _ $1}
| 'k' {set _ $1}
;
3d : {Create3DFrame}
| VIEW_ numeric numeric {global threed; set threed(az) $2; set threed(el) $3; 3DViewPoint}
| AZIMUTH_ numeric {global threed; set threed(az) $2; 3DViewPoint}
| ELEVATION_ numeric {global threed; set threed(el) $2; 3DViewPoint}
| SCALE_ numeric {global threed; set threed(scale) $2; 3DScale}
| METHOD_ 3dMethod {global threed; set threed(method) $2; 3DRenderMethod}
| BACKGROUND_ 3dBackground {global threed; set threed(background) $2; 3DBackground}
| BORDER_ 3dBorder
| HIGHLITE_ 3dHighlite
| COMPASS_ 3dCompass
| OPEN_ {}
| CLOSE_ {3DDestroyDialog}
;
3dMethod : MIP_ {set _ mip}
| AIP_ {set _ aip}
;
3dBackground : NONE_ {set _ none}
| AZIMUTH_ {set _ azimuth}
| ELEVATION_ {set _ elevation}
;
3dHighlite : yesno {global threed; set threed(highlite) $1; 3DHighlite}
| COLOR_ STRING_ {global threed; set threed(highlite,color) $2; 3DHighliteColor}
;
3dBorder : yesno {global threed; set threed(border) $1; 3DBorder}
| COLOR_ STRING_ {global threed; set threed(border,color) $2; 3DBorderColor}
;
3dCompass : yesno {global threed; set threed(compass) $1; 3DCompass}
| COLOR_ STRING_ {global threed; set threed(compass,color) $2; 3DCompassColor}
;
about : {puts "*** ABOUT ***"}
;
align : {global current; set current(align) 1; AlignWCSFrame}
| yesno {global current; set current(align) $1; AlignWCSFrame}
;
analysis : {puts "*** ANALYSIS ***"}
;
array : {puts "*** ARRAY ***"}
;
scale : scaleScales {global scale; set scale(type) $1; ChangeScale}
| LOG_ scaleLog
| DATASEC_ yesno
| LIMITS_ scaleLimits
| SCALELIMITS_ scaleLimits
| MINMAX_ {global scale; set scale(mode) minmax; ChangeScaleMode}
| ZSCALE_ {global scale; set scale(mode) zscale; ChangeScaleMode}
| ZMAX_ {global scale; set scale(mode) zmax; ChangeScaleMode}
| USER_ {global scale; set scale(mode) user; ChangeScaleMode}
| MODE_ scaleMode {global scale; set scale(mode) $2; ChangeScaleMode}
| MODE_ numeric {global scale; set scale(mode) $2; ChangeScaleMode}
| LOCAL_ {global scale; set scale(scope) local; ChangeScaleScope}
| GLOBAL_ {global scale; set scale(scope) global; ChangeScaleScope}
| SCOPE_ scaleScope {global scale; set scale(scope) $2; ChangeScaleScope}
| MATCH_ {MatchScaleCurrent}
| MATCH_ LIMITS_ {MatchScaleLimitsCurrent}
| MATCH_ SCALELIMITS_ {MatchScaleLimitsCurrent}
| LOCK_ {global scale; set scale(lock) 1; LockScaleCurrent}
| LOCK_ yesno {global scale; set scale(lock) $2; LockScaleCurrent}
| LOCK_ LIMITS_ {global scale; set scale(lock,limits) 1; LockScaleLimitsCurrent}
| LOCK_ LIMITS_ scaleLockLimits
| LOCK_ SCALELIMITS_ {global scale; set scale(lock,limits) 1; LockScaleLimitsCurrent}
| LOCK_ SCALELIMITS_ scaleLockLimits
| OPEN_ {ScaleDialog}
| CLOSE_ {ScaleDestroyDialog}
;
scaleScales : LINEAR_ {set _ linear}
| POW_ {set _ pow}
| SQRT_ {set _ sqrt}
| SQUARED_ {set _ squared}
| ASINH_ {set _ asinh}
| SINH_ {set _ sinh}
| HISTEQU_ {set _ histequ}
;
scaleLog : {global scale; set scale(type) log; ChangeScale}
| EXP_ numeric {global scale; set scale(log) $2; ChangeScale}
;
scaleLimits: numeric numeric {global scale; set scale(min) $1; set scale(max) $2; ChangeScaleLimit}
;
scaleLockLimits : yesno {global scale; set scale(lock,limits) $1; LockScaleLimitsCurrent}
;
scaleMode : MINMAX_ {set _ minmax}
| ZSCALE_ {set _ zscale}
| ZMAX_ {set _ zmax}
;
scaleScope : LOCAL_ {set _ local}
| GLOBAL_ {set _ global}
;
%%
|