miriad 4.1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +103 -0
- data/Rakefile +82 -0
- data/ext/bug.c +341 -0
- data/ext/dio.c +317 -0
- data/ext/extconf.rb +49 -0
- data/ext/headio.c +835 -0
- data/ext/hio.c +1515 -0
- data/ext/hio.h +48 -0
- data/ext/interface.c +74 -0
- data/ext/io.h +56 -0
- data/ext/key.c +934 -0
- data/ext/maskio.c +398 -0
- data/ext/maxdimc.h.in +9 -0
- data/ext/miriad.h +371 -0
- data/ext/miriad.i +464 -0
- data/ext/miriad_ruby.c +602 -0
- data/ext/miriad_ruby.i +443 -0
- data/ext/miriad_wrap.c +4210 -0
- data/ext/narray_ruby.swg +59 -0
- data/ext/pack.c +639 -0
- data/ext/scrio.c +132 -0
- data/ext/sysdep.h +185 -0
- data/ext/uvio.c +4934 -0
- data/ext/xyio.c +476 -0
- data/ext/xyzio.c +2020 -0
- data/lib/miriad.rb +564 -0
- metadata +93 -0
data/ext/miriad_ruby.c
ADDED
@@ -0,0 +1,602 @@
|
|
1
|
+
/*
|
2
|
+
* This file is just to document the classes/methods from the SWIG wrappers
|
3
|
+
* that we want to document. It is for rdoc, not gcc. At least for now.
|
4
|
+
* Eventually, it might be nice to dump SWIG since I seem to spend more time
|
5
|
+
* keeping it happy than it seems to save.
|
6
|
+
*/
|
7
|
+
|
8
|
+
#define static typedef
|
9
|
+
#define VALUE int
|
10
|
+
|
11
|
+
/*
|
12
|
+
* Document-class: Miriad
|
13
|
+
*/
|
14
|
+
|
15
|
+
/*
|
16
|
+
* Document-class: Miriad::Uvio
|
17
|
+
*/
|
18
|
+
|
19
|
+
/*
|
20
|
+
* Document-method: initialize
|
21
|
+
*
|
22
|
+
* call-seq: Uvio.new(name, status)
|
23
|
+
*
|
24
|
+
* <b>NOTE: This method provides lower-level access than the open() method. It
|
25
|
+
* may disappear in future versions.</b>
|
26
|
+
*
|
27
|
+
* Opens a uv dataset and readies it for access. Here +name+ is the dataset's
|
28
|
+
* name. +status+ can be: <tt>'old'</tt> or <tt>'read'</tt> to open an
|
29
|
+
* existing dataset for reading, <tt>'new'</tt> or <tt>'write'</tt> to create a
|
30
|
+
* new dataset, or <tt>'append'</tt> to add to an existing dataset
|
31
|
+
*/
|
32
|
+
static VALUE uvio_initialize();
|
33
|
+
|
34
|
+
/*
|
35
|
+
* Document-method: close
|
36
|
+
*
|
37
|
+
* call-seq: close() -> nil
|
38
|
+
*
|
39
|
+
* Closes the uv dataset.
|
40
|
+
*/
|
41
|
+
static VALUE uvio_close;
|
42
|
+
|
43
|
+
/*
|
44
|
+
* Document-method: flush
|
45
|
+
*
|
46
|
+
* call-seq: flush() -> nil
|
47
|
+
*
|
48
|
+
* Flush buffers of the uv dataset to disk.
|
49
|
+
*/
|
50
|
+
static VALUE uvio_flush;
|
51
|
+
|
52
|
+
/*
|
53
|
+
* Document-method: uvnext
|
54
|
+
*
|
55
|
+
* call-seq: uvnext() -> nil
|
56
|
+
*
|
57
|
+
* Skip to the next uv data record. When writing, this causes an end-of-record
|
58
|
+
* mark to be written. When reading, this causes data to be read up until the
|
59
|
+
* next end-of-record mark.
|
60
|
+
*/
|
61
|
+
static VALUE uvio_uvnext;
|
62
|
+
|
63
|
+
/*
|
64
|
+
* Document-method: rewind
|
65
|
+
*
|
66
|
+
* call-seq: rewind() -> nil
|
67
|
+
*
|
68
|
+
* Rewind a uv file, readying it to be read from the begining again.
|
69
|
+
*/
|
70
|
+
static VALUE uvio_rewind;
|
71
|
+
|
72
|
+
/*
|
73
|
+
* Document-method: probvr
|
74
|
+
*
|
75
|
+
* call-seq: probvr(var) -> [type, length, updated] or nil
|
76
|
+
*
|
77
|
+
* Checks whether a the uv variable +var+ exists. If it does, returns a three
|
78
|
+
* element array indicating the variable's type, (current) length, and whether
|
79
|
+
* it was updated on the last call to read or scan. If it doesn't exist, it
|
80
|
+
* returns nil.
|
81
|
+
*
|
82
|
+
* +type+ can be one of...
|
83
|
+
*
|
84
|
+
* * <tt>'a'</tt> - ASCII data
|
85
|
+
* * <tt>'i'</tt> - Integer data
|
86
|
+
* * <tt>'r'</tt> - Single precision real data
|
87
|
+
* * <tt>'d'</tt> - Double precision real data
|
88
|
+
* * <tt>'c'</tt> - Single precision complex data
|
89
|
+
*/
|
90
|
+
static VALUE uvio_probvr;
|
91
|
+
|
92
|
+
/*
|
93
|
+
* Document-method: putvr
|
94
|
+
*
|
95
|
+
* call-seq: putvr(var, data, type=-1) -> nil
|
96
|
+
*
|
97
|
+
* Writes +data+ as the value of a uv variable +var+. +data+ can be a Ruby
|
98
|
+
* object, an Array of Ruby objects, or an NArray.
|
99
|
+
*
|
100
|
+
* If +type+ is -1, the default, the MIRIAD type will be autodetected from
|
101
|
+
* +data+. Generally, this works well only for Strings and NArrays, but not
|
102
|
+
* for Numeric types. For full control, specify +type+ as one of...
|
103
|
+
*
|
104
|
+
* * <tt>?a</tt> - ASCII data
|
105
|
+
* * <tt>?i</tt> - Integer data
|
106
|
+
* * <tt>?r</tt> - Single precision real data
|
107
|
+
* * <tt>?d</tt> - Double precision real data
|
108
|
+
*/
|
109
|
+
static VALUE uvio_putvr;
|
110
|
+
|
111
|
+
/*
|
112
|
+
* Document-method: scan
|
113
|
+
*
|
114
|
+
* call-seq: scan(var) -> nil
|
115
|
+
*
|
116
|
+
* Scan through the uv file until variable +var+ changes. This always reads to
|
117
|
+
* the end of the record in which +var+ was encountered (i.e. until all
|
118
|
+
* variables that change simultaneously are read).
|
119
|
+
*/
|
120
|
+
static VALUE uvio_scan;
|
121
|
+
|
122
|
+
/*
|
123
|
+
* Document-method: write
|
124
|
+
*
|
125
|
+
* call-seq: write(preamble, data, flags) -> [preamble, data, flags]
|
126
|
+
*
|
127
|
+
* Write a visibility record to the uv dataset. Please note +write+ closes the
|
128
|
+
* record. Any wideband data should have been written with +wwrite+ before this
|
129
|
+
* call.
|
130
|
+
*
|
131
|
+
* +preamble+ can be an Array or NArray of 4 or 5 elements giving _u_, _v_,
|
132
|
+
* optionally _w_ (see uvset()), _time_, and _baseline_ (in that order). If
|
133
|
+
* +preamble+ is an NArray, it must be of type NArray::DFLOAT.
|
134
|
+
*
|
135
|
+
* +data+ is the complex correlation data. It can be an Array or NArray. If
|
136
|
+
* it is an Array, it must have the real and imaginary components in
|
137
|
+
* consecutive elemtents (specifically, Complex Array elements are not [yet]
|
138
|
+
* supported). If it is an NArray, it must be of type NArray::SFLOAT (with
|
139
|
+
* real and imaginary components in consecutive elements) or NArray::SCOMPLEX
|
140
|
+
* (with complex elements).
|
141
|
+
*
|
142
|
+
* +flags+ can be an Array or NArray. If it is an NArray, it must be of type
|
143
|
+
* NArray::LINT. Note that +flags+ must have as many elements as +data+ has
|
144
|
+
* complex data points. This will be either half as many elements as +data+
|
145
|
+
* (if +data+ has real and imaginary components in consecutive elements) or the
|
146
|
+
* same number of elements as +data+ (if +data+ is NArray::SCOMPLEX).
|
147
|
+
*/
|
148
|
+
static VALUE uvio_write;
|
149
|
+
|
150
|
+
/*
|
151
|
+
* Document-method: wwrite
|
152
|
+
*
|
153
|
+
* call-seq: wwrite(preamble, data, flags) -> [preamble, data, flags]
|
154
|
+
*
|
155
|
+
* Write a wide-band visibility record to the data file. Make sure this routine
|
156
|
+
* is called before write(), since that closes the record.
|
157
|
+
*
|
158
|
+
* See write() for a discussion of preamble, data, and flags.
|
159
|
+
*
|
160
|
+
*/
|
161
|
+
static VALUE uvio_wwrite;
|
162
|
+
|
163
|
+
/*
|
164
|
+
* Document-method: set
|
165
|
+
*
|
166
|
+
* call-seq: set(object, type, n=0, p1=0.0, p2=0.0, p3=0.0) -> nil
|
167
|
+
*
|
168
|
+
* Modifies the behavior of the read and write methods.
|
169
|
+
*
|
170
|
+
* ==== How set affects read
|
171
|
+
*
|
172
|
+
* The uvread routine can perform, at the programmer's request, extra
|
173
|
+
* processing steps on the visibility data. These steps consist of averaging
|
174
|
+
* and resampling frequency channels, uv coordinate conversion and some
|
175
|
+
* corrections for planet observations. The steps are requested by calls to
|
176
|
+
* set. In the call to set, +object+ (String) gives the general processing step
|
177
|
+
* that is being requested. The +type+ argument (String) gives more specific
|
178
|
+
* details, and the arguments +n+ (Integer) and <tt>p1</tt>, <tt>p2</tt> and
|
179
|
+
* <tt>p3</tt> (Floats) give any numerical values needed.
|
180
|
+
*
|
181
|
+
* Note that the setup given by set only becomes correctly activated during
|
182
|
+
* the next call to read. Before this next call, the setup is in a somewhat
|
183
|
+
* nebulous state. You should not expect various other routines associated
|
184
|
+
* with read to work as expected until after the next call to read.
|
185
|
+
* Associated routines include flagwr and info [info not yet implemented].
|
186
|
+
*
|
187
|
+
* The possible values of the arguments to set are summarized below. Not all
|
188
|
+
* parameters are used in every case. If a parameter is not mentioned for a
|
189
|
+
* particular usage, then it is ignored. While several processing steps can be
|
190
|
+
* performed simultaneously (several calls to set will be needed to specify
|
191
|
+
* them all), others are mutually inconsistent. When mutually inconsistent
|
192
|
+
* steps are requested, the last requested step is honored.
|
193
|
+
*
|
194
|
+
* * <tt>object='data'</tt> -> n=_nchan_, p1=_start_, p2=_width_, p3=_step_
|
195
|
+
*
|
196
|
+
* This gives operations on the spectral data.
|
197
|
+
*
|
198
|
+
* * <tt>type='channel'</tt> selects the channels to be returned, and
|
199
|
+
* possible averaging together of the channel data. If the original
|
200
|
+
* channels are numbers from 1 to _N_, then, by using
|
201
|
+
* <tt>type='channel'</tt>, read will return _nchan_ massaged channels,
|
202
|
+
* where the <em>i</em>th channel of the massaged channels is formed by
|
203
|
+
* averaging _width_ channels of the original data, starting at channel
|
204
|
+
* (_i_-1)*_step_+_start_. If set is called with _nchan_ being zero, all
|
205
|
+
* channels are selected (note that this only makes sense if _start_,
|
206
|
+
* _step_, and _width_ are all 1).
|
207
|
+
*
|
208
|
+
* * <tt>type='wide'</tt> is similar, but uses the continuum data rather than
|
209
|
+
* the spectral data.
|
210
|
+
*
|
211
|
+
* * <tt>type='velocity'</tt> is also similar, returning a weighted sum of
|
212
|
+
* the spectral data. However in this case _start_, _width_ and _step_ are
|
213
|
+
* given in units of km/s (rather than channels). This is particularly
|
214
|
+
* useful if the spectrometer setup is not constant throughout the data or
|
215
|
+
* there is no Doppler tracking, and so the velocity of a given channel
|
216
|
+
* changes.
|
217
|
+
*
|
218
|
+
* * Note that 'channel', 'wide', and 'velocity' are mutually exclusive. The
|
219
|
+
* default is 'channel' (or wide if there is no spectral data in the file),
|
220
|
+
* with _start_, _width_, and _step_ of 1.
|
221
|
+
*
|
222
|
+
* * If there are fewer than _nchan_ channels, then dummy channels, which are
|
223
|
+
* flagged as bad, are added. If _nchan_ is specified as 0, then read will
|
224
|
+
* return as many channels as possible.
|
225
|
+
*
|
226
|
+
* * <tt>object='reference'</tt> -> p1=_start_, p2=_width_
|
227
|
+
*
|
228
|
+
* The "reference line" is a spectral channel, or an average of spectral
|
229
|
+
* channels, which the main data is divided by. Typically the reference line
|
230
|
+
* would be a strong point source (e.g. a maser). The resultant data is
|
231
|
+
* essentially normalized and shifted, but it also has atmospheric-based and
|
232
|
+
* instrument-base calibration problems removed. The extra parameters needed
|
233
|
+
* to describe the reference line is the same as for <tt>object='data'</tt>,
|
234
|
+
* except that the number of channels, and the increment is ignored (there is
|
235
|
+
* only ever one reference line). The default is not to have a reference
|
236
|
+
* line.
|
237
|
+
*
|
238
|
+
* * <tt>object='coord'</tt>
|
239
|
+
*
|
240
|
+
* This sets the units of the u, v, and w coordinates returned in the
|
241
|
+
* preamble. Using <tt>type='wavelength'</tt> or <tt>type='nanosec'</tt>
|
242
|
+
* sets the units of the returned coordinates. For <tt>'wavelength'</tt>, the
|
243
|
+
* sky frequency used is that of the first channel returned. The default
|
244
|
+
* value is <tt>'nanosec'</tt>.
|
245
|
+
*
|
246
|
+
* * <tt>object='planet'</tt> -> p1=_plmaj_, p2=_plmin_, p3=_plangle_
|
247
|
+
*
|
248
|
+
* This causes the u and v coordinates to be scaled and rotated, and the
|
249
|
+
* correlation values to be scaled, to adjust for changes when observing
|
250
|
+
* planets. The parameters _plmaj_, _plmin_ and _plangle_ give the reference
|
251
|
+
* size (arcseconds) and position angle (degrees) of the planet. If the
|
252
|
+
* reference size is 0, then the size of the first selected data record is
|
253
|
+
* used.
|
254
|
+
*
|
255
|
+
* * <tt>object='selection'</tt> -> n=_n_
|
256
|
+
*
|
257
|
+
* This gives extra control over the uv selection process. Currently
|
258
|
+
* there is only one possible type, <tt>'amplitude'</tt>, which enables or disables the
|
259
|
+
* amplitude selection process. If the argument _n_ is positive, then amplitude
|
260
|
+
* selection is applied (i.e. the normal action), otherwise amplitude
|
261
|
+
* selection is not applied.
|
262
|
+
*
|
263
|
+
* * <tt>object='preamble'</tt>
|
264
|
+
*
|
265
|
+
* * <tt>type='uv/time/baseline'</tt> - The preamble will be read as four
|
266
|
+
* doubles: _u_, _v_, _time_, and _baseline_. If the dataset was written with five
|
267
|
+
* element preambles, _w_ will be discarded.
|
268
|
+
*
|
269
|
+
* * <tt>type='uvw/time/baseline'</tt> - The preamble will be read as five
|
270
|
+
* doubles: _u_, _v_, _w_, _time_, and _baseline_. If the dataset was
|
271
|
+
* written with four element preambles, _w_ will be set to 0.0.
|
272
|
+
*
|
273
|
+
* ==== How set affects write
|
274
|
+
*
|
275
|
+
* * <tt>object='corr'</tt>
|
276
|
+
*
|
277
|
+
* The uv routines allow the correlation data to be stored on disk, either as
|
278
|
+
* floating point numbers, or as 16 bit integers with an associated scale
|
279
|
+
* factor. The 16 bit format roughly halves the disk space required, but
|
280
|
+
* slows the read and write operation, and can cause precision problems. On
|
281
|
+
* the first call to write, the uv routines decide on the format to use,
|
282
|
+
* using a simple rule. The set method can be used to override this rule. To
|
283
|
+
* be of use, it must be called before the first call to write. The type
|
284
|
+
* argument is a single character, being <tt>'r'</tt> or <tt>'j'</tt>, which
|
285
|
+
* instructs floating point or scaled integers, respectively, to be used.
|
286
|
+
*
|
287
|
+
* * <tt>object='data'</tt>
|
288
|
+
*
|
289
|
+
* This controls whether write() writes the data to the +corr+ or +wcorr+
|
290
|
+
* variable. The default is to write it to the +corr+ item (i.e. it assumes
|
291
|
+
* that the data is spectral, rather than continuum data).
|
292
|
+
*
|
293
|
+
* * <tt>object='preamble'</tt>
|
294
|
+
*
|
295
|
+
* * <tt>type='uv/time/baseline'</tt> - The preamble will be written as four
|
296
|
+
* doubles: _u_, _v_, _time_, and _baseline_.
|
297
|
+
*
|
298
|
+
* * <tt>type='uvw/time/baseline'</tt> - The preamble will be written as five
|
299
|
+
* doubles: _u_, _v_, _w_, _time_, and _baseline_.
|
300
|
+
*/
|
301
|
+
static VALUE uvio_set;
|
302
|
+
|
303
|
+
/*
|
304
|
+
* Document-method: uvread
|
305
|
+
*
|
306
|
+
* call-seq: uvread(preamble, data, flags) -> [nread, preamble, data, flags]
|
307
|
+
*
|
308
|
+
* <b>NOTE: This method provides lower-level access than the read() method. It
|
309
|
+
* may disappear in future versions.</b>
|
310
|
+
*
|
311
|
+
* This reads a single visibility from the data file. This starts by scanning
|
312
|
+
* the uv data stream until a correlation record is found. The correlations are
|
313
|
+
* then converted to complex numbers if necessary, and returned to the caller.
|
314
|
+
* +read+ also performs some massaging and selection steps (see set() and
|
315
|
+
* select()).
|
316
|
+
*
|
317
|
+
* * +preamble+
|
318
|
+
*
|
319
|
+
* The preamble is either [_u_,_v_,_time_,_baseline_] or
|
320
|
+
* <tt></tt>[_u_,_v_,_w_,_time_,_baseline_] if
|
321
|
+
* <tt>set('preamble','uvw/time/baseline')</tt> was called. A 5 element
|
322
|
+
* preamble will populate _w_ with 0.0 if the dataset was written with only a
|
323
|
+
* 4 element preamble.
|
324
|
+
*
|
325
|
+
* * If a Fixnum is passed in as +preamble+, an NArray that long of type
|
326
|
+
* NArray::DFLOAT is created and returned with the preamble data.
|
327
|
+
*
|
328
|
+
* * Otherwise +preamble+ must be passed in as an Array or NArray (of type
|
329
|
+
* NArray::DFLOAT) of suitable length (i.e. either 4 or 5). Its contents
|
330
|
+
* will be overwritten with new premable data.
|
331
|
+
*
|
332
|
+
* * +data+
|
333
|
+
*
|
334
|
+
* The complex valued correlation data are returned in +data+.
|
335
|
+
*
|
336
|
+
* * If a Fixnum or Bignum is passed in as +data+, an NArray that long of
|
337
|
+
* type NArray::SCOMPLEX is created, populated with +nread+ complex data
|
338
|
+
* values, and returned.
|
339
|
+
*
|
340
|
+
* * Otherwise, +data+ must be passed in as an Array or Narray (of type
|
341
|
+
* NArray::SCOMPLEX). Its contents will be overwritten with +nread+ data
|
342
|
+
* values. Note that an Array will be filled with real and imaginary
|
343
|
+
* components in consecutive elements and must therefore contain twice as
|
344
|
+
* many elements as the number of complex valued data points. In general,
|
345
|
+
* NArray +data+ will be preferred.
|
346
|
+
*
|
347
|
+
* * In either of the above cases, the number of complex valued data points
|
348
|
+
* (either +data+ or <tt>data.length</tt>) must be the same as the number
|
349
|
+
* of flag values, otherwise an exception will be raised. Note that the
|
350
|
+
* length of an Array is twice the number of complex valued data points
|
351
|
+
* that will fit in it.
|
352
|
+
*
|
353
|
+
* * +flags+
|
354
|
+
*
|
355
|
+
* The flags indicate whether the corresponding data value has been deemed
|
356
|
+
* good or bad. A +1+ means good; a +0+ means bad.
|
357
|
+
*
|
358
|
+
* * If a Fixnum or Bignum is passed in as +flags+, an NArray that long of
|
359
|
+
* type NArray::LINT is created, populated with +nread+ flag values, and
|
360
|
+
* returned.
|
361
|
+
*
|
362
|
+
* * Otherwise, +flags+ must be passed in as an Array or Narray (of type
|
363
|
+
* NArray::LINT). Its contents will be overwritten with +nread+ flag
|
364
|
+
* values.
|
365
|
+
*
|
366
|
+
* * In either of the above cases, the number of complex valued data points
|
367
|
+
* (either +data+ or <tt>data.length</tt>) must be the same as the number
|
368
|
+
* of flag values, otherwise an exception will be raised.
|
369
|
+
*
|
370
|
+
* * +nread+
|
371
|
+
*
|
372
|
+
* The number of complex data values and flag values actually read is
|
373
|
+
* returned in the first element of the return Array.
|
374
|
+
*/
|
375
|
+
static VALUE uvio_uvread;
|
376
|
+
|
377
|
+
/*
|
378
|
+
* Document-method: uvwread
|
379
|
+
*
|
380
|
+
* call-seq: uvwread(data, flags) -> [nread, data, flags]
|
381
|
+
*
|
382
|
+
* <b>NOTE: This method provides lower-level access than the wread() method.
|
383
|
+
* It may disappear in future versions.</b>
|
384
|
+
*
|
385
|
+
* This reads a single wideband visibility record from the data file. This
|
386
|
+
* should generally be called after uvread(). It performs no scanning before
|
387
|
+
* returning the data. Thus it always returns any wideband data (even if
|
388
|
+
* uvread() has detected end-of-file). Although uvwread() is independent of the
|
389
|
+
* linetype set with set(), it otherwise generally performs the same massaging
|
390
|
+
* steps as uvread() (e.g. data selection, amplitude flagging and planet
|
391
|
+
* scaling).
|
392
|
+
*
|
393
|
+
* The parameters and return values are the same as for uvread(), minus the
|
394
|
+
* +preamble+ parameter and return value.
|
395
|
+
*/
|
396
|
+
static VALUE uvio_uvwread;
|
397
|
+
|
398
|
+
/*
|
399
|
+
* Document-method: getvr
|
400
|
+
*
|
401
|
+
* call-seq: getvr(name) -> value or nil
|
402
|
+
*
|
403
|
+
* Returns the current value of uv variable named +name+ or +nil+ if the named
|
404
|
+
* variable does not (yet) exist.
|
405
|
+
*
|
406
|
+
* Note that complex uv variables are not [yet] supported.
|
407
|
+
*/
|
408
|
+
static VALUE uvio_getvr;
|
409
|
+
|
410
|
+
/*
|
411
|
+
* Document-method: updated?
|
412
|
+
*
|
413
|
+
* call-seq: updated?() -> true or false
|
414
|
+
*
|
415
|
+
* This checks whether any "important variables" has been updated in the
|
416
|
+
* last call to uvread() or scan(). Important variables are those flagged
|
417
|
+
* with the 'u' flag in a call to track().
|
418
|
+
*/
|
419
|
+
static VALUE uvio_updated;
|
420
|
+
|
421
|
+
/*
|
422
|
+
* Document-method: track
|
423
|
+
*
|
424
|
+
* call-seq: track(name, switches)
|
425
|
+
*
|
426
|
+
* Allows the programmer to set switches associated with uv variable +name+.
|
427
|
+
*
|
428
|
+
* There appears to be no way to "untrack" a variable.
|
429
|
+
*
|
430
|
+
* +swicthes+ is a String containing one or both of the following characters:
|
431
|
+
*
|
432
|
+
* <tt>u</tt>::
|
433
|
+
* Remember if variable +name+ gets updated. When it gets updated, updated?
|
434
|
+
* returns true the next time it is called.
|
435
|
+
*
|
436
|
+
* <tt>c</tt>::
|
437
|
+
* Remember if variable +name+ gets updated. When it gets updated, cause it
|
438
|
+
* to be copied during the next call to copyvr. [copyvr not yet supported.]
|
439
|
+
*/
|
440
|
+
static VALUE uvio_track;
|
441
|
+
|
442
|
+
/*
|
443
|
+
* Document-method: sela
|
444
|
+
*
|
445
|
+
* call-seq: sela(object, datasel, value) -> nil
|
446
|
+
*
|
447
|
+
* Select or reject uv data based on a String. This specifies the portion of
|
448
|
+
* the data to be selected by calls to uvread.
|
449
|
+
*
|
450
|
+
* +object+ can be either <tt>'source'</tt> or <tt>'purpose'</tt>.
|
451
|
+
*
|
452
|
+
* +datasel+ is either 1 to select or 0 to reject.
|
453
|
+
*
|
454
|
+
* +value+ is a String that will be used as the search critereon.
|
455
|
+
*
|
456
|
+
* See also select().
|
457
|
+
*/
|
458
|
+
static VALUE uvio_sela;
|
459
|
+
|
460
|
+
/*
|
461
|
+
* Document-method: select
|
462
|
+
*
|
463
|
+
* call-seq: select(object, datasel, p1=0.0, p2=0.0) -> nil
|
464
|
+
*
|
465
|
+
* Select or reject uv data based on numeric values. This specifies the
|
466
|
+
* portion of the data to be selected by calls to uvread. Generally uvselect
|
467
|
+
* will be called many times, each call giving a different selection or discard
|
468
|
+
* criterion.
|
469
|
+
*
|
470
|
+
* Normally data that are not selected, are not returned. Exceptions are the
|
471
|
+
* "window" and "amplitude" objects, which cause the corresponding visibilities
|
472
|
+
* to be flagged as bad, but returned anyway.
|
473
|
+
*
|
474
|
+
* +object+ is a String giving the parameter on which a select/discard
|
475
|
+
* criterion is based. See the list below for permissible values for +object+.
|
476
|
+
*
|
477
|
+
* +datasel+ is either 1 to select or 0 to reject.
|
478
|
+
*
|
479
|
+
* <tt>p1</tt> and <tt>p2</tt>, both Floats, give added numerical parameters.
|
480
|
+
* Generally <tt>p1</tt> and <tt>p2</tt> give a range of parameter values to
|
481
|
+
* select or discard. Note that the units of the values are consistent with
|
482
|
+
* the units of the underlying uv variables. These are not necessarily the
|
483
|
+
* most convenient units for the user.
|
484
|
+
*
|
485
|
+
* Here is a list of permissible values for +object+ along with the
|
486
|
+
* applicability of <tt>p1</tt> and </tt>p2</tt> and their units (in
|
487
|
+
* parentheses). Only applicable parameters are shown; parameters not shown
|
488
|
+
* are ignored.
|
489
|
+
*
|
490
|
+
* <tt>time</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (Julian date)
|
491
|
+
* <tt>on</tt>:: <tt>p1</tt>=state
|
492
|
+
* <tt>polarization</tt>:: <tt>p1</tt>=polval (FITS code)
|
493
|
+
* <tt>dazim</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (radians?)
|
494
|
+
* <tt>delev</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (radians?)
|
495
|
+
* <tt>dra</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (radians)
|
496
|
+
* <tt>ddec</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (radians)
|
497
|
+
* <tt>ra</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (radians)
|
498
|
+
* <tt>dec</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (radians)
|
499
|
+
* <tt>ha</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (radians?)
|
500
|
+
* <tt>lst</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (radians?)
|
501
|
+
* <tt>elevation</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (radians?)
|
502
|
+
* <tt>uvrange</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (wavelengths)
|
503
|
+
* <tt>uvnrange</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (nanoseconds)
|
504
|
+
* <tt>frequency</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (GHz)
|
505
|
+
* <tt>pointing</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (arcseconds)
|
506
|
+
* <tt>seeing</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (???)
|
507
|
+
* <tt>visibility</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max
|
508
|
+
* <tt>increment</tt>:: <tt>p1</tt>=incr
|
509
|
+
* <tt>shadow</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max (???)
|
510
|
+
* <tt>bin</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max
|
511
|
+
* <tt>amplitude</tt>:: <tt>p1</tt>=min, <tt>p2</tt>=max
|
512
|
+
* <tt>window</tt>:: <tt>p1</tt>=win
|
513
|
+
* <tt>antennae</tt>:: <tt>p1</tt>=ant1, <tt>p2</tt>=ant2
|
514
|
+
* <tt>auto</tt>:: <tt></tt>
|
515
|
+
* <tt>or</tt>:: <tt></tt>
|
516
|
+
* <tt>and</tt>:: <tt></tt>
|
517
|
+
* <tt>clear</tt>:: <tt></tt>
|
518
|
+
*
|
519
|
+
* Notes:
|
520
|
+
*
|
521
|
+
* * For "antennae", a zero indicates "all antennae".
|
522
|
+
*
|
523
|
+
* * For "shadow", a zero indicates use "antdiam" variable.
|
524
|
+
*
|
525
|
+
* * The +clear+ object causes the selection criteria to be reset to its
|
526
|
+
* default of selected everything.
|
527
|
+
*
|
528
|
+
* * *NB*: +select+ treates +and+ and +or+ as having <b>identical
|
529
|
+
* precedence</b>, and handles these operators in the order in which they are
|
530
|
+
* given. Beware of this lack of precedence.
|
531
|
+
*/
|
532
|
+
static VALUE uvio_select;
|
533
|
+
|
534
|
+
/*
|
535
|
+
* Document-method: flagwr
|
536
|
+
*
|
537
|
+
* call-seq: flagwr(flags) -> nil
|
538
|
+
*
|
539
|
+
* Write uv flags after a read. This causes the flags associated with
|
540
|
+
* correlation data to be rewritten. It is typically used by a flagging
|
541
|
+
* program to overwrite old flagging information. It will typically be called
|
542
|
+
* soon after uvread (which is used to get the old flags, and position the
|
543
|
+
* file), thus overwriting the old flags.
|
544
|
+
*
|
545
|
+
* +flags+ is either an Array or NArray (of type NArray::LINT) and will
|
546
|
+
* typically have been returned by uvread and subsequently modified.
|
547
|
+
*/
|
548
|
+
static VALUE uvio_flagwr;
|
549
|
+
|
550
|
+
/*
|
551
|
+
* Document-method: wflagwr
|
552
|
+
*
|
553
|
+
* call-seq: wflagwr(flags) -> nil
|
554
|
+
*
|
555
|
+
* Write wideband flags after a uvwread. This rewrites the flags associated
|
556
|
+
* with the last call to uvwread. It will typically be called soon after
|
557
|
+
* uvwread, thus overwriting the old flags.
|
558
|
+
*
|
559
|
+
* +flags+ is either an Array or NArray (of type NArray::LINT) and will
|
560
|
+
* typically have been returned by uvread and subsequently modified.
|
561
|
+
*/
|
562
|
+
static VALUE uvio_wflagwr;
|
563
|
+
|
564
|
+
/*
|
565
|
+
* Document-method: hiswrite
|
566
|
+
*
|
567
|
+
* call-seq: hiswrite(text) -> nil
|
568
|
+
*
|
569
|
+
* Write a line of text to the history file. This writes a text string to the
|
570
|
+
* history file associated with the underlying dataset.
|
571
|
+
*/
|
572
|
+
static VALUE uvio_hiswrite;
|
573
|
+
|
574
|
+
#if 0
|
575
|
+
void Init_Uvio() {
|
576
|
+
VALUE mMiriad = rb_define_module("Miriad");
|
577
|
+
VALUE cUvio = rb_define_class_under(mMiriad,"Uvio",rb_cObject);
|
578
|
+
rb_define_method(cUvio, "initialize", uvio_initialize, 0);
|
579
|
+
rb_define_method(cUvio, "close", uvio_close, 0);
|
580
|
+
rb_define_method(cUvio, "flush", uvio_flush, 0);
|
581
|
+
rb_define_method(cUvio, "uvnext", uvio_uvnext, 0);
|
582
|
+
rb_define_method(cUvio, "rewind", uvio_rewind, 0);
|
583
|
+
rb_define_method(cUvio, "probvr", uvio_probvr, 0);
|
584
|
+
rb_define_method(cUvio, "putvr", uvio_putvr, 0);
|
585
|
+
rb_define_method(cUvio, "scan", uvio_scan, 0);
|
586
|
+
rb_define_method(cUvio, "write", uvio_write, 0);
|
587
|
+
rb_define_method(cUvio, "wwrite", uvio_wwrite, 0);
|
588
|
+
rb_define_method(cUvio, "set", uvio_set, 0);
|
589
|
+
rb_define_method(cUvio, "uvread", uvio_uvread, 0);
|
590
|
+
rb_define_method(cUvio, "uvwread", uvio_uvwread, 0);
|
591
|
+
rb_define_method(cUvio, "getvr", uvio_getvr, 0);
|
592
|
+
rb_define_method(cUvio, "updated?", uvio_updated, 0);
|
593
|
+
rb_define_method(cUvio, "track", uvio_track, 0);
|
594
|
+
rb_define_method(cUvio, "sela", uvio_sela, 0);
|
595
|
+
rb_define_method(cUvio, "select", uvio_select, 0);
|
596
|
+
rb_define_method(cUvio, "flagwr", uvio_flagwr, 0);
|
597
|
+
rb_define_method(cUvio, "wflagwr", uvio_wflagwr, 0);
|
598
|
+
rb_define_method(cUvio, "hiswrite", uvio_hiswrite, 0);
|
599
|
+
}
|
600
|
+
#endif // 0
|
601
|
+
|
602
|
+
/* vim: set expandtab ts=2 sw=2 smarttab syntax=c cindent fo+=tcroq : */
|