casa
5.7.0-16
|
a container for data buffers used to fill a measurement set More...
#include <DataLoadingBuf.h>
Public Member Functions | |
DataLoadingBuf () | |
create the container More... | |
~DataLoadingBuf () | |
delete the container More... | |
void | resizeForNspect (casacore::Int i) |
resize our arrays of containers to hold data for wide band data and a given number of narrow band spectral windows. More... | |
casacore::Int | nchanForSpWin (casacore::Int i) |
return the number of channels that can be stored in a given window. More... | |
casacore::Cube< casacore::Bool > & | flagsForSpWin (casacore::Int winid) |
return a reference to the flags casacore::Cube for a given window. More... | |
casacore::Matrix < casacore::Complex > & | visForSpWin (casacore::Int winid) |
return a reference to the vis casacore::Matrix for a given window More... | |
casacore::Vector < casacore::Float > & | weight () |
return a reference to the weight vector More... | |
casacore::Vector < casacore::Float > & | sigma () |
return a reference to the sigma vector More... | |
void | resizeForSpWin (casacore::Int winid, casacore::Int nchan) |
resize the containers for a given window to the given number of channels More... | |
void | resizeForNpol (casacore::Int npol) |
resize the containers for a given number of polarization correlations More... | |
Private Member Functions | |
DataLoadingBuf (DataLoadingBuf &) | |
Private Attributes | |
casacore::Block < casacore::Matrix < casacore::Complex > * > | vislist |
casacore::Block < casacore::Cube < casacore::Bool > * > | flgslist |
casacore::Vector< casacore::Float > | wt |
casacore::Vector< casacore::Float > | rms |
a container for data buffers used to fill a measurement set
Public interface
class holds buffers used to load data into a Measurment Set
Miriad data support multiple spectral windows for a given correllator setup. Furthermore, a dataset can contain multiple setups. This class attempts to avoid having to repeatedly create a buffer inside a loading loop.
This class allows one to create reusable buffers for each of the spectral windows that can be passed to an casacore::ArrayColumn's put()
function. This avoids the cost of recreating the buffers inside a loading loop that cycles through the input Miriad windows. The buffers can be resized if necessary if the Miriad correllator setup changes.
This class stores for each window a casacore::Matrix<casacore::Complex> to store the visibility data and a casacore::Cube<casacore::Bool> to hold the flags. Normally, you can have all wide-band windows share a single buffer (since they are all the same size, namely having 1 channel). The buffers are access via their (zero-base) window index, starting with the narrow band windows. A window index greater than or equal to the number of narrow band windows (set via resizeForNspec()
) is assumed to refer a wide-band window and the last buffer is returned.
If the size of a buffer needs to be changed (e.g. because the correllator setup changed such that the number of channels in a window subsequently changed), it is most convenient to do the resizing via resizeForSpWin()
.
To set up the buffers, you need to know how many windows you have, and the number of channels in each window.
Now to use the buffers...
Definition at line 127 of file DataLoadingBuf.h.
|
private |
DataLoadingBuf::DataLoadingBuf | ( | ) |
create the container
DataLoadingBuf::~DataLoadingBuf | ( | ) |
delete the container
|
inline |
return a reference to the flags casacore::Cube for a given window.
A value for i
greater than or equal to the number of narrow band windows is assumed to refer to a wideband window.
Definition at line 157 of file DataLoadingBuf.h.
References flgslist, and casacore::Block< T >::nelements().
|
inline |
return the number of channels that can be stored in a given window.
A value for i
greater than or equal to the number of narrow band windows is assumed to refer to a wideband window; thus, 1 will be returned.
Definition at line 152 of file DataLoadingBuf.h.
References casacore::Matrix< T >::ncolumn(), and visForSpWin().
|
inline |
resize the containers for a given number of polarization correlations
Definition at line 194 of file DataLoadingBuf.h.
References flgslist, casacore::Block< T >::nelements(), casacore::Vector< T >::resize(), casacore::Block< T >::resize(), rms, vislist, and wt.
void DataLoadingBuf::resizeForNspect | ( | casacore::Int | i | ) |
resize our arrays of containers to hold data for wide band data and a given number of narrow band spectral windows.
i
is the number of narrow band spectral windows.
|
inline |
resize the containers for a given window to the given number of channels
Definition at line 178 of file DataLoadingBuf.h.
References flgslist, casacore::Block< T >::nelements(), visForSpWin(), and vislist.
|
inline |
return a reference to the sigma vector
Definition at line 175 of file DataLoadingBuf.h.
References rms.
|
inline |
return a reference to the vis casacore::Matrix for a given window
Definition at line 165 of file DataLoadingBuf.h.
References casacore::Block< T >::nelements(), and vislist.
Referenced by nchanForSpWin(), and resizeForSpWin().
|
inline |
return a reference to the weight vector
Definition at line 172 of file DataLoadingBuf.h.
References wt.
|
private |
Definition at line 130 of file DataLoadingBuf.h.
Referenced by flagsForSpWin(), resizeForNpol(), and resizeForSpWin().
|
private |
Definition at line 132 of file DataLoadingBuf.h.
Referenced by resizeForNpol(), and sigma().
|
private |
Definition at line 129 of file DataLoadingBuf.h.
Referenced by resizeForNpol(), resizeForSpWin(), and visForSpWin().
|
private |
Definition at line 131 of file DataLoadingBuf.h.
Referenced by resizeForNpol(), and weight().