The data describing the window is set at construction time and cannot be changed later. The data model assumes that the spectral channels that can be described by a starting frequency, a frequency increment, and a total number of channels. Furthermore, all channels are assumed to have the same channel bandwidth. The window can be given a name and a sideband designation. The only writable data of this class are a row marker (via setRow()), used by SimSpWinList to keep track of windows that have been written out to a SPECTRAL_WINDOW table in a Measurement Set, and a uniform flag (via setUniform()) which is used by SimSpWinList to indicate that a window read in from an MS does not really fit into the simple uniform data model. Neither of these writable items affect what is written out to a Measurement Set.
initialize the container to a single-channel continuum window
make a copy of the container
return the net sideband code
load a Vector with the channel frequencies in Hertz
load a Vector with the channel widths in Hertz
return the total bandwidth of the window in Hz. This is equal to the step size times the number of channels.
get and set the name of the window
get and set the ID. An ID less than zero means that this record has not yet been recorded.
get and set the uniformity flag. This flag is False if the set up is not actually uniform enough to be described by this container. This will be the case if the set up originated from an atypical MS.
An important function handled by this class is the recording of the window descriptions to a Measurement Set. This is done with the flush() function. When it writes the data from a SimSpWin 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 SimSpWin as been flushed. This allows one to later add additional windows to the list; when flush() is called again, only the new SimSpWin data are written out. This, of course, assumes that the same output MSSpectralWindow is passed to the flush() function each time. If you want to write all the data to a new SPECTRAL_WINDOW table, you can call clearIds() to clear all the row markers.
A set of windows can be read in from a SPECTRAL_WINDOW table as well using the initFrom() method or the SimSpWinList(const MSSpectralWindow&, ...) constructor. These will implicitly set the row markers from the input table. This allows one to add new windows to the already recorded set.
create a buffer and fill it with the contents of a SPECTRAL_WINDOW table
create a copy
reset all the row markers used to flag the SimSpWin members that have been recorded to a Measurement Set already. Thus, the next call to flush() will record all SimSpWins to the SPECTRAL_WINDOW table. This should be used when writing to a new SPECTRAL_WINDOW table, different from one previously read from or written to.
access the i-th window in this list.
return the number of windows described in this list
add a multi-channel spectral window
add a single channel continuum window
add a multi-channel spectral window
load the number of channels in each window into given Vector. The input Vector, nchan, will be resized to the value returned by numWindows().
add a multi-channel spectral window
add window descriptions from an MS SPECTRAL_WINDOW table
add a multi-channel spectral window
write out all windows that have yet to be written