- CIRCUM = SimArray::CIRCUM,TAN=SimArray::TAN,EQUITORIAL=SimArray::EQUITORIAL,
This class uses some underlying container classes for storing the specific parts of the configuration which correspond roughly to records in the relevent sub-tables of a Measurement Set:
Normally, these classes are not handled directly by users of this class; however, it is possible gain direct access when finer read or write control over the data they hold is necessary.
The data contained in this object will ultimately be written out to a Measurement Set. To accomplish this, one must "attach" an output MeasurementSet to this object. This can be done either at construction time or later via the attach() or initAndAttach() function. If initAndAttach() is used or attachment is done at construction, any data already recorded in the MS, such as antenna descriptions, are read-in and loaded into this object. New data is written out via the flush() function. The "attachment" model allows the class to keep track of what's been written to disk already. Thus, one can update the telescope configuration, e.g. add additional antennas, and write out only the new data via the flush() command.
It is intended that a SimTelescope object be managed by a SimObservations object. Normally, a SimTelescope is constructed first and passed to the constructor of the SimObservations class. One would access the SimTelescope directly via the SimObservations::telescope() function. Attaching an MS to a SimObservations object will in turn attach it to its underlying SimTelescope. Accordingly, calling SimObservations::flush() will implicitly call SimTelescope::flush().
Create an undescribed telescope
Create an telescope at the given reference location
Create a telescope that is a copy of another telescope
Create a telescope described by the data in a MeasurementSet. The first version (taking a const MeasurmentSet) simply calls init(ms), while the second one calls initAndAttach().
Load the description given by the data in a MeasurementSet The ANTENNA, FEED, SPECTRAL_WINDOW, POLARIZATION, and DATA_DESCRIPTION subtables will be read to determine the basic telscope description, then the main table is scanned to determine the currently defined subarrays. (This constructor will read the MeasurementSet as if it describes a single telescope; thus, some complexity may be lost.) The second version will also call attach(ms, False);
Attach this description to a MeasurementSet so that when flush() is called, the description will get written to it. clear, if set to True, will cause all internal flags that mark which descriptions have been written so far to be cleared. Thus, the next time flush is called, all configuration records currently set will be written to the attached MS.
return a pointer to the currently attached Measurement Set or null if none is currently attached.
Write out the current description to a given MeasurementSet. Only those "new" records that have not already been written out to the MS will be flushed.
Set and get a name for this simulated telescope
Set and get the reference location for the telescope
Define a set of antennas assuming the current reference location for the array. The size of all input arrays must be equal to the number antennas being set. x,y,z define the position of the antennas relative to the reference location. unit is the unit of time or length used to give positions (if unit is time, values will be multiplied by the speed of light). This value should be a string recognized as a time or length by the MVTime and MVBaseline (via Quantity). coord is the coordinate system for the position vector x,y,z; the value is taken from the SimArray::LocalCoord enumeration. refloc is the reference location for the array. diam is the diameter of the dishes mount is name of the mount employed by the antennas antNames is a list of antenna names (e.g. "Ant 1"). stationNames is a list of station names (e.g. "N8"). offset is the offset from the "feed reference position" from the antenna positions, given as a pointer. subarrayID is default subarray to associate these antennas with.
Add a single antenna. This is useful for adding elements of a VLBI network of heterogenous dishes one at a time. name the name of the antenna or station pos defines the absolute position on the Earth of an antenna (the reference Location is not used). diam is the diameter of the dishes mount is the mount used on the antenna subarrayId is default subarray to associate these antennas with.
fill the currently configured antennas positions into a given vector. The vector will be resized appropriately. The number of antennas is returned.
fill the currently configured antenna positions as an array of ITRF position vectors. The first axis of the given Matrix represents the 3 components of the position vector in units of meters in the ITRF frame; the second axis is equal to the number of antennas in this subarray. start is the position along the second axis to place The matrix will be resized appropriately. The number of antennas is returned.
fill the antenna names into a given Vector of Strings. If the names have not been set, the names will be returned as empty strings. In any event, the given vector will be resized. The number of antennas is returned.
fill the station names into a given Vector of Strings. If the names have not been set, the names will be returned as empty strings. In any event, the given vector will be resized. The number of antennas is returned.
return number of currently added antennas
return a description of an antenna
remove all array descriptions
Add a multi-channel spectral window. Channels are restricted to be regularly spaced and having resolutions equal to the channel widths. nchan the number of channels in the window start the starting frequency width the channel width/resolution step the difference in frequency between each channel refFreq the reference frequency; if not specified, the central channel will be used. usb if True, mark as upper sideband; otherwise, lower sideband. The ID of the new window will be returned.
add a single channel continuum window freq the starting frequency width the channel width/resolution usb if True, mark as upper sideband; otherwise, lower sideband. The ID of the new window will be returned.
return the number of windows currently configured
Add a feed. id is the ID to associate with the feed. pols is a string containing the polarizations of the receptors. There should be one character for each receptor and should be equal to one of "XYRL". position give the position of the feed relative to the "feed reference position" recepAngle hold the receptor position angles (assuming linear polarization receptor) beamOff holds the beam offset for each receptor polResp holds polarization response of each receptor antId is the antenna to associated this feed description with; if negative, then associate with all antenna time,interval specify the time interval over which this description is correct spwId is the window to associate with this feed.
return the number of feed entries
set polarization correlations. An exception is thrown if the requested correlations cannot be formed by the given feeds. setFeed() must be called at least once. corrTypes lists the desired correlations. This vector should contain one, two or four types, each of which must be one of the cross-correlation types (e.g. XX, XY, RR, LR, XR, etc.). An exception is thrown if the list has an invalid number of elements. feed1 is the feed containing the first receptor in the correlation. feed2 is the feed containing the second receptor in the correlation.
set polarization correlations. This is a convenience function for easily selecting correlations across feeds with the same receptors If this is the case, you can get parallel hand correlations (e.g. RR, LL) by request ncorr=2. For full cross-correlation, use ncorr=4. In detail,
ncorr is an integer equal to 1, 2, or 4 indicating the number of correlations desired. When ncorr=4, all combinations of the first two receptors in each feed will be set. If ncorr=2, only 2 combinations will be recorded: the first receptor from each correlated and the second receptor from each. If ncorr=1, only a single correlation between the same receptor on each will be recorded; the chosen receptor is given by the value of whichSingle. feed1 is the feed containing the first receptor in the correlation. feed2 is the feed containing the second receptor in the correlation. whichSingle is the index of the receptor in each feed that should be correlated when ncorr=1; it is ignored otherwise.