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:
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 a source list, 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 sources, and write out only the new data via the flush() command.
This class also manages a SimTelescope object describing the telescope that the observations are to be carried out on. The SimTelescope should be set at construction time. One can access the SimTelescope directly via the 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 observational setup that is a copy of another setup
Create a set of observation setups described by the data in a MeasurementSet. A telescope description is generated automatically. The first version of this function (taking a const MeasurmentSet) simply calls init(ms), while the second one also calls initAndAttach().
assignment operator
Load the description given by the data in a MeasurementSet The SOURCE and FIELD subtables will be read to determine what was observed, 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.
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.
return a pointer to the attached telescope description
return a pointer to the currently attached Measurement Set or null if none is currently attached.
define a data description set that connects a polarization setup to a set of spectral windows. polId is the ID for the polarization setup spwin points to the set of spectral windows to associate with this polarization setup. If the pointer is empty, the polarization setup will be associated with all currently defined windows.
return the number of data descriptions. This number represents the number of SimDataDesc objects that can be accessed via dataDesc(uInt). Each description potentially covers a range of data description IDs.
return the total number of data description IDs defined.
return an existing Data Description
create a mapping from the data description id to the spectral window id for the current telescope and observation configurations
add an observable source. The size of the input arrays should be equal to the number of spectral line transitions to be observed with this source. name is the name of the source. dir is the source's direction in the sky. code is a a string used to identify the special characteristics of the source or its role in the observations. spWinId is the spectral window to associate with this source description; an ID less than 0 refers to all windows.
return the number of Source descriptions
return an existing Source
set a field center for observing a source srcId is the source ID that this field is associated with. dir is the field's direction in the sky. repetition is the number of consecutive integrations to perform on this field. A value of zero means a suitable default value should be used.
set a field center for observing a source srcId is the source ID that this field is associated with. offRA is the true angular offset in the direction perpendicular to the celestial pole (i.e. along a great circle) of the field center from the source position given by dir. offDec is the angular offset in the direction of the celestial (north) pole of the field center from the source position. When given as a Double, radians is assumed as the unit. repetition is the number of consecutive integrations to perform on this field. A value of zero means a suitable default value should be used.
return the total number of fields currently defined
return the number of fields currently defined for a given source
return an existing Field
associate a spectral line with of a subset of the spectral windows, consequently setting the doppler tracking. srcId is the source the line is being observed in. trans is the name of the spectral line transition (e.g. "CO J=1-0"); this string should be unique for the the rest frequency. restfreq is the rest frequency of the line. spWinId is the ID of a single window to associate line with; spWinIds is a list of window IDs. Returned is the Doppler ID to be associated with the line. An exception is thrown if any of the spectral windows are already associated with a spectral line.
return the number of spectral lines currently defined
return an existing Source