Foo.
This section presents a detailed API reference for the mirtask.uvdat module.
Read in data via the UVDAT subsystem.
Parameters: |
|
---|---|
Return type: | generator of (handle, preamble, data, flags) |
Returns: | generator yielding UV data records |
Read in data with the UVDAT subsystem. The system must have previously been initialized, typically in a call to mirtask.keys.KeySpec.process() after configuration with mirtask.keys.KeySpec.uvdat().
The return value is a generator that yields tuples of (handle, preamble, data, flags), where handle is a UVDatDataSet corresponding to the dataset being read, and preamble, data, and flags are the usual UV data arrays. For speed, the identities of the arrays do not change from iteration to iteration, but their contents do.
Set up the UVDAT subsystem manually and read in the data.
Parameters: |
|
---|---|
Return type: | generator of (handle, preamble, data, flags) |
Returns: | generator yielding UV data records |
Set up the UVDAT subsytem with explicitly-specified parameters and read in the data.
The argument toread specifies which dataset or datasets to read. If it is a non-string iterable, the stringification of each of its values is treated as a dataset to read. Otherwise, its stringification is treated as the dataset to read. Escaping is not supported by MIRIAD, so if toread = 'a,b', MIRIAD will interpret this as a direction to read two datasets named “a” and “b”.
The return value is a generator that yields tuples of (handle, preamble, data, flags), where handle is a UVDatDataSet corresponding to the dataset being read, and preamble, data, and flags are the usual UV data arrays. For speed, the identities of the arrays do not change from iteration to iteration, but their contents do.
Optional features of the UVDAT subsystem may be enabled by including their control characters in the contents of uvdOptions:
Character | Feature behavior |
---|---|
p | Planet rotation and scaling corrections should be applied. |
w | UVW coordinates should be returned in wavelength units, not nanoseconds. (Beware when writing these data to new UV datasets, as the output routines expect the values to be in nanoseconds.) |
1 | (The character is the number one.) Average the data down to one channel. |
x | The input data must be cross-correlations. |
a | The input data must be autocorrelations. |
b | The input must be exactly one UV dataset (not multiple). |
3 | The “preamble” returned while reading data will always have 5 elements and include the w coordinate. |
Retrieve handles to the datasets to be read by the UVDAT subsystem.
Return type: | generator of UVDatDataSet |
---|---|
Returns: | handles to the datasets to by read by the UVDAT system |
Generates a sequence of UVDatDataSet objects allowing access to the datasets that would be read by the UVDAT subsystem.
If you plan on reading the UV data associated with these handles, you should instead use read().
See also singleInputSet() in the case that you know there is exactly one input dataset.
Get a UVDatDataSet object representing the input UV dataset.
Return type: | UVDatDataSet |
---|---|
Returns: | a UV data dataset |
Retrieves a UVDatDataSet object corresponding to the dataset to be read by the UVDAT subsystem.
If you want to read the UV data associated with this handle, use read() or setupAndRead().
The subsystem can accept more than one input dataset generically, but you should only call this function if UVDAT has been initialized to read only one dataset. You can ensure this condition by passing the b option to setupAndRead() or mirtask.keys.KeySpec.uvdat(). If you don’t want to or can’t enforce this condition, use inputSets().
Synopsis : | a handle to a UV dataset being read with the UVDAT subsystem |
---|
This class is a subclass of mirtask.UVDataSet with extra code to invoke the correct lifecycle functions associated with MIRIAD’s UVDAT subsystem. It should transparently behave like a mirtask.UVDataSet from the Python programmer’s perspective.
You should not construct a UVDatDataSet yourself.
Return the number of simultaneous polarizations being returned by readData. Zero indicates that this number could not be determined.
Return the polarizations being returned by readData, an array of the size returned by getNPol (). Zeros indicate an error. Polarization values are as in FITS and are defined in mirtask.util.POL_??.
Return the last Stokes parameter returned by readData. May vary from one visibility to another.
Return the number of channels being processed.
Return the number of files being processed.
Get the serial number of the current UV record.
Returns: | the serial number |
---|---|
Return type: | int |
Counting begins at zero. The return value may vary from what mirtask.UVDataSet.getCurrentVisNum() returns if polarization processing is active, because the underlying data records may be merged.
Return the variance of the current visibility.
Return the Jansky-per-Kelvin value of the current visibility.
Get the path of the file currently being processed.
Returns: | the path of the file currently being processed |
---|---|
Return type: | string |
Maps to a call of MIRIAD’s UVDATGTA function with an “object” of “name”.
Get the linetype of the current record.
Returns: | the linetype |
---|---|
Return type: | string |
The linetype is one of “channel”, “velocity”, “felocity”, “wide”, or “” (if not explicitly specified on the commandline). Maps to a call of MIRIAD’s UVDATGTA function with an “object” of “ltype”.