The combination is defined in terms of IDs into an MS's POLARIZATION and SPECTRAL_WINDOW tables (which are usually managed via a SimObservations object), similar to structure of a MeasurmentSet's DATA_DESCRIPTION record. The difference being that in a SimDataDesc, a single polarization setup can be with a set of windows as an aid to users simulating typical uses of correlation spectrometers. The IDs are set at construction time and cannot be changed later.
Since this class has no connections either a spectral window table nor a polarization setup table, no checks are done to ensure that the IDs exist anywhere or are otherwise valid. This must be done at a higher level.
Create a record associating a polarization setup with a set of spectral windows
create a copy
get and set the row ID, the first row in the DATA_DESCRIPTION table containing this record. An ID less than zero means that this record has not yet been recorded.
return the ID of the polarization setup
return the list of window IDs polarization setup is associated with. An id < 0 indicates that the line is associated with all windows
return the number of spectral windows refered to in this description
An important function handled by this class is the recording of the data descriptiosn to a Measurement Set. This is done with the flush() function. When it writes the data from a SimDataDesc in its list to the MS, it sets the row number of the window via setRow(); this is used as a flag indicating that the SimDataDesc has been flushed. This allows one to later add additional setups to the list; when flush() is called again, only the new SimDataDesc data are written out. This, of course, assumes that the same output MSDataDescription is passed to the flush() function each time. If you want to write all the data to a new DATA_DESCRIPTION table, you can call clearIds() to clear all the row markers.
A list of data descriptions can be read in from a DATA_DESCRIPTION table as well using the initFrom() method or the SimDataDescList(const MSDataDescription&, ...) constructor. These will implicitly set the row markers from the input table. This allows one to add new setups to the already recorded set.
create a list and fill it with the contents of a DATA_DESCRIPTION table
create a copy
reset all the row markers used to flag the SimDataDesc members that have been recorded to a Measurement Set already. Thus, the next call to flush() will record all SimPols to the DATA_DESCRIPTION table. This should be used when writing to a new DATA_DESCRIPTION table, different from one previously read from or written to.
access the i-th SimDataDesc object in this list.
return the SimDataDesc for the data description with a given ID.
return the number of SimDataDesc objects in this list
return the number of data description IDs in this list. That is, return the number of window-polarization setup cominations in this list.
Add a description associating a polarization setup with a spectral window. polid is the POLARIZATION_ID, and spw is the SPECTRALWINDOW_ID when upto=False. If upto is True, the polarization set up will be associated with all spectral windows with IDs less than spw.
Create a record associating a polarization setup with a set of spectral windows
load a vector that provides a map of DataDescription IDs to spectral window. If npol is >= 0, then only those data description IDs that point to polarization IDs < npol will be included in the map. Similarly, if nspw >= 0, only those data description IDs that point to spectral window IDs < nspw will be included. To get a map that is consistent with what is actually written out to the DATA_DESCRIPTION table by flush(), npol and nspw must both be > 0. When npol and nspw are not provided, the map returned is one based on the assumption that all data description records are valid and will be written out.
add data descriptions lookups from an MS
write out all data descriptions that have yet to be written