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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
|
include "../../lib/astrom.h"
include "../../lib/acatalog.h"
include "../../lib/aimpars.h"
# AT_DRCPSET -- Reset the region definition parameters to their default values.
procedure at_drcpset (at)
pointer at #I the pointer to the main astrom structure
begin
# Set the default field center and width.
call at_setd (at, RCRA, 0.0d0)
call at_setd (at, RCDEC, 0.0d0)
call at_setd (at, RCRAWIDTH, 10.0d0)
call at_setd (at, RCDECWIDTH, 10.0d0)
# Set the default field center units.
call at_seti (at, RCRAUNITS, 0)
call at_seti (at, RCDECUNITS, 0)
# Set the default field center coordinate system.
call at_sets (at, RCSYSTEM, "")
end
# AT_DFSPSET -- Reset the filtering parameters to their default values.
procedure at_dfspset (at)
pointer at #I the pointer to the main astrom structure
begin
call at_sets (at, FIELDS, "f[*]")
call at_sets (at, FEXPR, "yes")
call at_sets (at, FNAMES, "")
call at_sets (at, FNTYPES, "")
call at_sets (at, FNUNITS, "")
call at_sets (at, FNFORMATS, "")
call at_sets (at, FSORT, "")
call at_seti (at, FREVERSE, NO)
call at_sets (at, FOSYSTEM, "")
call at_sets (at, FIRA, "ra")
call at_sets (at, FIDEC, "dec")
call at_seti (at, FORAUNITS, 0)
call at_seti (at, FODECUNITS, 0)
call at_sets (at, FORAFORMAT, "")
call at_sets (at, FODECFORMAT, "")
call at_sets (at, FIXP, "xp")
call at_sets (at, FIYP, "yp")
call at_sets (at, FIXC, "xc")
call at_sets (at, FIYC, "yc")
call at_sets (at, FOXFORMAT, "%10.3f")
call at_sets (at, FOYFORMAT, "%10.3f")
end
# AT_DWCPSET -- Reset the wcs parameters to their default values.
procedure at_dwcpset (at)
pointer at #I the pointer to the main astrom structure
double dval
pointer st, sym
int ip
pointer at_statp(), stfind()
int ctod()
begin
st = at_statp (at, WCST)
if (st == NULL)
return
sym = stfind (st, "wxref")
if (sym != NULL) {
call strcpy ("INDEF", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
ip = 1
if (ctod ("INDEF", ip, dval) <= 0)
dval = INDEFD
call at_setd (at, WXREF, dval)
}
sym = stfind (st, "wyref")
if (sym != NULL) {
call strcpy ("INDEF", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
ip = 1
if (ctod ("INDEF", ip, dval) <= 0)
dval = INDEFD
call at_setd (at, WYREF, dval)
}
sym = stfind (st, "wxmag")
if (sym != NULL) {
call strcpy ("INDEF", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
ip = 1
if (ctod ("INDEF", ip, dval) <= 0)
dval = INDEFD
call at_setd (at, WXMAG, dval)
}
sym = stfind (st, "wymag")
if (sym != NULL) {
call strcpy ("INDEF", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
ip = 1
if (ctod ("INDEF", ip, dval) <= 0)
dval = INDEFD
call at_setd (at, WYMAG, dval)
}
sym = stfind (st, "wxrot")
if (sym != NULL) {
call strcpy ("180.0", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
ip = 1
if (ctod ("180.0", ip, dval) <= 0)
dval = INDEFD
call at_setd (at, WXROT, dval)
}
sym = stfind (st, "wyrot")
if (sym != NULL) {
call strcpy ("0.0", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
ip = 1
if (ctod ("0.0", ip, dval) <= 0)
dval = INDEFD
call at_setd (at, WYROT, dval)
}
sym = stfind (st, "wraref")
if (sym != NULL) {
call strcpy ("RA", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
ip = 1
if (ctod ("RA", ip, dval) <= 0)
dval = INDEFD
call at_setd (at, WRAREF, dval)
}
sym = stfind (st, "wdecref")
if (sym != NULL) {
call strcpy ("DEC", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
ip = 1
if (ctod ("DEC", ip, dval) <= 0)
dval = INDEFD
call at_setd (at, WDECREF, dval)
}
sym = stfind (st, "wraunits")
if (sym != NULL) {
call strcpy ("", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
call at_seti (at, WRAUNITS, 0)
}
sym = stfind (st, "wdecunits")
if (sym != NULL) {
call strcpy ("", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
call at_seti (at, WDECUNITS, 0)
}
sym = stfind (st, "wproj")
if (sym != NULL) {
call strcpy ("INDEF", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
call at_sets (at, WPROJ, "tan")
}
sym = stfind (st, "wsystem")
if (sym != NULL) {
call strcpy ("EQUINOX", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
call at_sets (at, WSYSTEM, "EQUINOX")
}
end
# AT_DIMPSET -- Read in the default image data parameters.
procedure at_dimpset (at)
pointer at #I the pointer to the main astrom structure
double dval
real rval
pointer st, sym
int ip
pointer at_statp(), stfind()
int ctod(), ctor()
begin
st = at_statp (at, IMST)
if (st == NULL)
return
sym = stfind (st, "esitelng")
if (sym != NULL) {
call strcpy ("INDEF", AT_IMSTKVAL(sym), LEN_IMST_STRUCT)
ip = 1
if (ctod ("INDEF", ip, dval) <= 0)
dval = INDEFD
call at_setd (at, ESITELNG, dval)
}
sym = stfind (st, "esitelat")
if (sym != NULL) {
call strcpy ("INDEF", AT_IMSTKVAL(sym), LEN_IMST_STRUCT)
ip = 1
if (ctod ("INDEF", ip, dval) <= 0)
dval = INDEFD
call at_setd (at, ESITELAT, dval)
}
sym = stfind (st, "esitealt")
if (sym != NULL) {
call strcpy ("INDEF", AT_IMSTKVAL(sym), LEN_IMST_STRUCT)
ip = 1
if (ctor ("INDEF", ip, rval) <= 0)
rval = INDEFR
call at_setr (at, ESITEALT, rval)
}
sym = stfind (st, "esitetz")
if (sym != NULL) {
call strcpy ("INDEF", AT_IMSTKVAL(sym), LEN_IMST_STRUCT)
ip = 1
if (ctor ("INDEF", ip, rval) <= 0)
rval = INDEFR
call at_setr (at, ESITETZ, rval)
}
sym = stfind (st, "emjdobs")
if (sym != NULL) {
call strcpy ("MJD-OBS", AT_IMSTKVAL(sym), LEN_IMST_STRUCT)
ip = 1
if (ctod ("MJD-OBS", ip, dval) <= 0)
dval = INDEFD
call at_setd (at, EMJDOBS, dval)
}
sym = stfind (st, "edatamin")
if (sym != NULL) {
call strcpy ("INDEF", AT_IMSTKVAL(sym), LEN_IMST_STRUCT)
ip = 1
if (ctor ("INDEF", ip, rval) <= 0)
rval = INDEFR
call at_setr (at, EDATAMIN, rval)
}
sym = stfind (st, "edatamax")
if (sym != NULL) {
call strcpy ("INDEF", AT_IMSTKVAL(sym), LEN_IMST_STRUCT)
ip = 1
if (ctor ("INDEF", ip, rval) <= 0)
rval = INDEFR
call at_setr (at, EDATAMAX, rval)
}
sym = stfind (st, "egain")
if (sym != NULL) {
call strcpy ("GAIN", AT_IMSTKVAL(sym), LEN_IMST_STRUCT)
ip = 1
if (ctor ("GAIN", ip, rval) <= 0)
rval = INDEFR
call at_setr (at, EGAIN, rval)
}
sym = stfind (st, "erdnoise")
if (sym != NULL) {
call strcpy ("RDNOISE", AT_IMSTKVAL(sym), LEN_IMST_STRUCT)
ip = 1
if (ctor ("RDNOISE", ip, rval) <= 0)
rval = INDEFR
call at_setr (at, ERDNOISE, rval)
}
sym = stfind (st, "ewavlen")
if (sym != NULL) {
call strcpy ("INDEF", AT_IMSTKVAL(sym), LEN_IMST_STRUCT)
ip = 1
if (ctor ("INDEF", ip, rval) <= 0)
rval = INDEFR
call at_setr (at, EWAVLEN, rval)
}
sym = stfind (st, "etemp")
if (sym != NULL) {
call strcpy ("INDEF", AT_IMSTKVAL(sym), LEN_IMST_STRUCT)
ip = 1
if (ctor ("INDEF", ip, rval) <= 0)
rval = INDEFR
call at_setr (at, ETEMP, rval)
}
sym = stfind (st, "epress")
if (sym != NULL) {
call strcpy ("INDEF", AT_IMSTKVAL(sym), LEN_IMST_STRUCT)
ip = 1
if (ctor ("INDEF", ip, rval) <= 0)
rval = INDEFR
call at_setr (at, EPRESS, rval)
}
sym = stfind (st, "observat")
if (sym != NULL) {
call strcpy ("OBSERVAT", AT_WCSTKVAL(sym), LEN_WCST_STRUCT)
call at_sets (at, OBSERVAT, "OBSERVAT")
}
end
|