casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
casa::SolveDataBuffer Class Reference

SolveDataBuffer is a container for VisBuffer2 data and related residual and differentiation results related to generic calibration solving. More...

#include <SolveDataBuffer.h>

Public Member Functions

 SolveDataBuffer ()
 Generic ctor. More...
 
 SolveDataBuffer (const vi::VisBuffer2 &vb)
 Create from a VisBuffer2. More...
 
 SolveDataBuffer (const SolveDataBuffer &sdb)
 Copy construct current iteration (or reattach). More...
 
 ~SolveDataBuffer ()
 Destructor. More...
 
SolveDataBufferoperator= (const SolveDataBuffer &sdb)
 Assignment. More...
 
bool Ok ()
 Does SDB contain finite weight? More...
 
void enforceAPonData (const casacore::String &apmode)
 Divide corrected by model NB: disable for now, may not be needed... More...
 
void enforceSolveWeights (const casacore::Bool pHandOnly)
 Zero flagged weights, and optionally the cross-hand weights. More...
 
void setFocusChan (const casacore::Int focusChan=-1)
 Set the focus channel (forms references to focus-channel flag/data/model) More...
 
void sizeResiduals (const casacore::Int &nPar, const casacore::Int &nDiff)
 Size/init/finalize the residuals workspaces. More...
 
void initResidWithModel ()
 
void finalizeResiduals ()
 
void updateWorkingFlags ()
 Manage working weights. More...
 
void updateWorkingWeights (casacore::Bool, casacore::Float clamp=0.0)
 
void cleanUp ()
 Delete the workspaces. More...
 
casacore::String polBasis () const
 Return pol basis. More...
 
casacore::Int nRows () const
 VB2-like data access methods (mostly const) More...
 
casacore::Int nAntennas () const
 
const casacore::Vector< int > & observationId () const
 
const casacore::Vector
< casacore::Int > & 
arrayId () const
 
const casacore::Vector
< casacore::Int > & 
antenna1 () const
 
const casacore::Vector
< casacore::Int > & 
antenna2 () const
 
const casacore::Vector
< casacore::Int > & 
dataDescriptionIds () const
 
const casacore::Vector
< casacore::Int > & 
spectralWindow () const
 
const casacore::Vector
< casacore::Int > & 
scan () const
 
const casacore::Vector
< casacore::Double > & 
time () const
 
const casacore::Vector
< casacore::Double > & 
timeCentroid () const
 
const casacore::Vector
< casacore::Int > & 
fieldId () const
 
casacore::Int nChannels () const
 
const casacore::Vector
< casacore::Double > & 
freqs () const
 
casacore::Double centroidFreq () const
 
casacore::Int nCorrelations () const
 
const casacore::Cube
< casacore::Complex > & 
visCubeModel () const
 
const casacore::Cube
< casacore::Complex > & 
visCubeCorrected () const
 
const casacore::Vector
< casacore::Float > & 
feedPa () const
 The feedPa. More...
 
casacore::Vector
< casacore::Bool > & 
flagRow ()
 These are not const, because we will generally amend them: More...
 
casacore::Cube< casacore::Bool > & flagCube ()
 
casacore::Cube< casacore::Float > & weightSpectrum ()
 
casacore::Cube< casacore::Bool > & infocusFlagCube ()
 Access functions. More...
 
const casacore::Cube
< casacore::Bool > & 
infocusFlagCube () const
 
casacore::Cube
< casacore::Complex > & 
infocusVisCube ()
 
const casacore::Cube
< casacore::Complex > & 
infocusVisCube () const
 
casacore::Cube< casacore::Float > & infocusWtSpec ()
 
const casacore::Cube
< casacore::Float > & 
infocusWtSpec () const
 
casacore::Cube
< casacore::Complex > & 
infocusModelVisCube ()
 
const casacore::Cube
< casacore::Complex > & 
infocusModelVisCube () const
 
casacore::Cube< casacore::Float > & workingWtSpec ()
 Working weights and flags const versions return infocus versions if working versions are empty! More...
 
const casacore::Cube
< casacore::Float > & 
const_workingWtSpec () const
 
casacore::Cube< casacore::Bool > & workingFlagCube ()
 
const casacore::Cube
< casacore::Bool > & 
const_workingFlagCube () const
 
casacore::Cube
< casacore::Complex > & 
residuals ()
 Workspace for the residual visibilities. More...
 
const casacore::Cube
< casacore::Complex > & 
residuals () const
 
casacore::Cube< casacore::Bool > & residFlagCube ()
 Workspace for flags of the residuals. More...
 
const casacore::Cube
< casacore::Bool > & 
residFlagCube () const
 
casacore::Array
< casacore::Complex > & 
diffResiduals ()
 Workspace for the differentiated residuals. More...
 
const casacore::Array
< casacore::Complex > & 
diffResiduals () const
 
void reportData ()
 Print out data, weights, flags for debugging purposes. More...
 

Protected Member Functions

void initFromVB (const vi::VisBuffer2 &vb)
 Handle copy from the input VB2. More...
 

Private Attributes

vi::VisBuffer2vb_
 The underlying VisBuffer2. More...
 
casacore::Int nAnt_
 The number of antennas. More...
 
casacore::Vector< double > freqs_
 The frequencies Currently, assumed uniform over rows. More...
 
double centroidFreq_
 
casacore::Vector< int > corrs_
 The correlation types Currently, assumed uniform over rows (private; used only by polBasis, currently) More...
 
casacore::Vector< float > feedPa_
 The feedPa Currently, assumed uniform (per antenna) over rows. More...
 
casacore::Vector< casacore::BoolfR_
 Array reference objects for things in the vb we need to mess with. More...
 
casacore::Cube< casacore::BoolfC_
 
casacore::Cube< casacore::FloatwS_
 
casacore::Int focusChan_p
 The current in-focus channel. More...
 
casacore::Cube< casacore::BoolinfocusFlagCube_p
 actual storage for the data More...
 
casacore::Cube< casacore::FloatinfocusWtSpec_p
 
casacore::Cube< casacore::Complex > infocusVisCube_p
 
casacore::Cube< casacore::Complex > infocusModelVisCube_p
 
casacore::Cube< casacore::BoolworkingFlagCube_p
 
casacore::Cube< casacore::FloatworkingWtSpec_p
 
casacore::Cube< casacore::Complex > residuals_p
 
casacore::Cube< casacore::BoolresidFlagCube_p
 
casacore::Array
< casacore::Complex > 
diffResiduals_p
 

Detailed Description

SolveDataBuffer is a container for VisBuffer2 data and related residual and differentiation results related to generic calibration solving.

Intended use:

Public interface

Prerequisite

Etymology

SolveDataBuffer is a Buffer for Solving Data

Synopsis

To Do

Definition at line 65 of file SolveDataBuffer.h.

Constructor & Destructor Documentation

casa::SolveDataBuffer::SolveDataBuffer ( )

Generic ctor.

casa::SolveDataBuffer::SolveDataBuffer ( const vi::VisBuffer2 vb)

Create from a VisBuffer2.

casa::SolveDataBuffer::SolveDataBuffer ( const SolveDataBuffer sdb)

Copy construct current iteration (or reattach).

casa::SolveDataBuffer::~SolveDataBuffer ( )

Destructor.

Member Function Documentation

const casacore::Vector<casacore::Int>& casa::SolveDataBuffer::antenna1 ( void  ) const
inline

Definition at line 121 of file SolveDataBuffer.h.

References vb_.

const casacore::Vector<casacore::Int>& casa::SolveDataBuffer::antenna2 ( void  ) const
inline

Definition at line 122 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::antenna2(), and vb_.

const casacore::Vector<casacore::Int>& casa::SolveDataBuffer::arrayId ( ) const
inline

Definition at line 120 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::arrayId(), and vb_.

casacore::Double casa::SolveDataBuffer::centroidFreq ( ) const
inline

Definition at line 131 of file SolveDataBuffer.h.

References centroidFreq_.

void casa::SolveDataBuffer::cleanUp ( )

Delete the workspaces.

const casacore::Cube<casacore::Bool>& casa::SolveDataBuffer::const_workingFlagCube ( ) const
inline
const casacore::Cube<casacore::Float>& casa::SolveDataBuffer::const_workingWtSpec ( ) const
inline
const casacore::Vector<casacore::Int>& casa::SolveDataBuffer::dataDescriptionIds ( ) const
inline

Definition at line 123 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::dataDescriptionIds(), and vb_.

casacore::Array<casacore::Complex>& casa::SolveDataBuffer::diffResiduals ( )
inline

Workspace for the differentiated residuals.

Definition at line 181 of file SolveDataBuffer.h.

References diffResiduals_p.

const casacore::Array<casacore::Complex>& casa::SolveDataBuffer::diffResiduals ( ) const
inline

Definition at line 182 of file SolveDataBuffer.h.

References diffResiduals_p.

void casa::SolveDataBuffer::enforceAPonData ( const casacore::String apmode)

Divide corrected by model NB: disable for now, may not be needed...

void divideCorrByModel();

Apply amp-only or phase-only to data

void casa::SolveDataBuffer::enforceSolveWeights ( const casacore::Bool  pHandOnly)

Zero flagged weights, and optionally the cross-hand weights.

const casacore::Vector<casacore::Float>& casa::SolveDataBuffer::feedPa ( ) const
inline

The feedPa.

Definition at line 137 of file SolveDataBuffer.h.

References feedPa_.

const casacore::Vector<casacore::Int>& casa::SolveDataBuffer::fieldId ( ) const
inline

Definition at line 128 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::fieldId(), and vb_.

void casa::SolveDataBuffer::finalizeResiduals ( )
casacore::Cube<casacore::Bool>& casa::SolveDataBuffer::flagCube ( )
inline
casacore::Vector<casacore::Bool>& casa::SolveDataBuffer::flagRow ( )
inline

These are not const, because we will generally amend them:

Definition at line 140 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::flagRow(), fR_, casacore::Vector< T >::reference(), and vb_.

const casacore::Vector<casacore::Double>& casa::SolveDataBuffer::freqs ( ) const
inline

Definition at line 130 of file SolveDataBuffer.h.

References freqs_.

casacore::Cube<casacore::Bool>& casa::SolveDataBuffer::infocusFlagCube ( )
inline

Access functions.

Access to focus-channel slices of the flags, data, and model

Definition at line 149 of file SolveDataBuffer.h.

References infocusFlagCube_p.

Referenced by const_workingFlagCube().

const casacore::Cube<casacore::Bool>& casa::SolveDataBuffer::infocusFlagCube ( ) const
inline

Definition at line 150 of file SolveDataBuffer.h.

References infocusFlagCube_p.

casacore::Cube<casacore::Complex>& casa::SolveDataBuffer::infocusModelVisCube ( )
inline

Definition at line 158 of file SolveDataBuffer.h.

References infocusModelVisCube_p.

const casacore::Cube<casacore::Complex>& casa::SolveDataBuffer::infocusModelVisCube ( ) const
inline

Definition at line 159 of file SolveDataBuffer.h.

References infocusModelVisCube_p.

casacore::Cube<casacore::Complex>& casa::SolveDataBuffer::infocusVisCube ( )
inline

Definition at line 152 of file SolveDataBuffer.h.

References infocusVisCube_p.

const casacore::Cube<casacore::Complex>& casa::SolveDataBuffer::infocusVisCube ( ) const
inline

Definition at line 153 of file SolveDataBuffer.h.

References infocusVisCube_p.

casacore::Cube<casacore::Float>& casa::SolveDataBuffer::infocusWtSpec ( )
inline

Definition at line 155 of file SolveDataBuffer.h.

References infocusWtSpec_p.

Referenced by const_workingWtSpec().

const casacore::Cube<casacore::Float>& casa::SolveDataBuffer::infocusWtSpec ( ) const
inline

Definition at line 156 of file SolveDataBuffer.h.

References infocusWtSpec_p.

void casa::SolveDataBuffer::initFromVB ( const vi::VisBuffer2 vb)
protected

Handle copy from the input VB2.

void casa::SolveDataBuffer::initResidWithModel ( )
casacore::Int casa::SolveDataBuffer::nAntennas ( ) const
inline

Definition at line 118 of file SolveDataBuffer.h.

References nAnt_.

casacore::Int casa::SolveDataBuffer::nChannels ( ) const
inline

Definition at line 129 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::nChannels(), and vb_.

casacore::Int casa::SolveDataBuffer::nCorrelations ( ) const
inline

Definition at line 132 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::nCorrelations(), and vb_.

casacore::Int casa::SolveDataBuffer::nRows ( ) const
inline

VB2-like data access methods (mostly const)

Definition at line 117 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::nRows(), and vb_.

const casacore::Vector<int>& casa::SolveDataBuffer::observationId ( ) const
inline

Definition at line 119 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::observationId(), and vb_.

bool casa::SolveDataBuffer::Ok ( )

Does SDB contain finite weight?

SolveDataBuffer& casa::SolveDataBuffer::operator= ( const SolveDataBuffer sdb)

Assignment.

casacore::String casa::SolveDataBuffer::polBasis ( ) const

Return pol basis.

void casa::SolveDataBuffer::reportData ( )

Print out data, weights, flags for debugging purposes.

casacore::Cube<casacore::Bool>& casa::SolveDataBuffer::residFlagCube ( )
inline

Workspace for flags of the residuals.

Definition at line 177 of file SolveDataBuffer.h.

References residFlagCube_p.

Referenced by const_workingFlagCube().

const casacore::Cube<casacore::Bool>& casa::SolveDataBuffer::residFlagCube ( ) const
inline

Definition at line 178 of file SolveDataBuffer.h.

References residFlagCube_p.

casacore::Cube<casacore::Complex>& casa::SolveDataBuffer::residuals ( )
inline

Workspace for the residual visibilities.

Definition at line 173 of file SolveDataBuffer.h.

References residuals_p.

const casacore::Cube<casacore::Complex>& casa::SolveDataBuffer::residuals ( ) const
inline

Definition at line 174 of file SolveDataBuffer.h.

References residuals_p.

const casacore::Vector<casacore::Int>& casa::SolveDataBuffer::scan ( ) const
inline

Definition at line 125 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::scan(), and vb_.

void casa::SolveDataBuffer::setFocusChan ( const casacore::Int  focusChan = -1)

Set the focus channel (forms references to focus-channel flag/data/model)

void casa::SolveDataBuffer::sizeResiduals ( const casacore::Int nPar,
const casacore::Int nDiff 
)

Size/init/finalize the residuals workspaces.

const casacore::Vector<casacore::Int>& casa::SolveDataBuffer::spectralWindow ( ) const
inline

Definition at line 124 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::spectralWindows(), and vb_.

const casacore::Vector<casacore::Double>& casa::SolveDataBuffer::time ( void  ) const
inline

Definition at line 126 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::time(), and vb_.

const casacore::Vector<casacore::Double>& casa::SolveDataBuffer::timeCentroid ( ) const
inline

Definition at line 127 of file SolveDataBuffer.h.

References casa::vi::VisBuffer2::timeCentroid(), and vb_.

void casa::SolveDataBuffer::updateWorkingFlags ( )

Manage working weights.

void casa::SolveDataBuffer::updateWorkingWeights ( casacore::Bool  ,
casacore::Float  clamp = 0.0 
)
const casacore::Cube<casacore::Complex>& casa::SolveDataBuffer::visCubeCorrected ( ) const
inline

Definition at line 134 of file SolveDataBuffer.h.

References vb_, and casa::vi::VisBuffer2::visCubeCorrected().

const casacore::Cube<casacore::Complex>& casa::SolveDataBuffer::visCubeModel ( ) const
inline

Definition at line 133 of file SolveDataBuffer.h.

References vb_, and casa::vi::VisBuffer2::visCubeModel().

casacore::Cube<casacore::Float>& casa::SolveDataBuffer::weightSpectrum ( )
inline
casacore::Cube<casacore::Bool>& casa::SolveDataBuffer::workingFlagCube ( )
inline

Definition at line 165 of file SolveDataBuffer.h.

References workingFlagCube_p.

casacore::Cube<casacore::Float>& casa::SolveDataBuffer::workingWtSpec ( )
inline

Working weights and flags const versions return infocus versions if working versions are empty!

Definition at line 163 of file SolveDataBuffer.h.

References workingWtSpec_p.

Member Data Documentation

double casa::SolveDataBuffer::centroidFreq_
private

Definition at line 206 of file SolveDataBuffer.h.

Referenced by centroidFreq().

casacore::Vector<int> casa::SolveDataBuffer::corrs_
private

The correlation types Currently, assumed uniform over rows (private; used only by polBasis, currently)

Definition at line 211 of file SolveDataBuffer.h.

casacore::Array<casacore::Complex> casa::SolveDataBuffer::diffResiduals_p
private

Definition at line 237 of file SolveDataBuffer.h.

Referenced by diffResiduals().

casacore::Cube<casacore::Bool> casa::SolveDataBuffer::fC_
private

Definition at line 219 of file SolveDataBuffer.h.

Referenced by flagCube().

casacore::Vector<float> casa::SolveDataBuffer::feedPa_
private

The feedPa Currently, assumed uniform (per antenna) over rows.

Definition at line 215 of file SolveDataBuffer.h.

Referenced by feedPa().

casacore::Int casa::SolveDataBuffer::focusChan_p
private

The current in-focus channel.

Definition at line 224 of file SolveDataBuffer.h.

casacore::Vector<casacore::Bool> casa::SolveDataBuffer::fR_
private

Array reference objects for things in the vb we need to mess with.

Definition at line 218 of file SolveDataBuffer.h.

Referenced by flagRow().

casacore::Vector<double> casa::SolveDataBuffer::freqs_
private

The frequencies Currently, assumed uniform over rows.

Definition at line 205 of file SolveDataBuffer.h.

Referenced by freqs().

casacore::Cube<casacore::Bool> casa::SolveDataBuffer::infocusFlagCube_p
private

actual storage for the data

Definition at line 227 of file SolveDataBuffer.h.

Referenced by infocusFlagCube().

casacore::Cube<casacore::Complex> casa::SolveDataBuffer::infocusModelVisCube_p
private

Definition at line 230 of file SolveDataBuffer.h.

Referenced by infocusModelVisCube().

casacore::Cube<casacore::Complex> casa::SolveDataBuffer::infocusVisCube_p
private

Definition at line 229 of file SolveDataBuffer.h.

Referenced by infocusVisCube().

casacore::Cube<casacore::Float> casa::SolveDataBuffer::infocusWtSpec_p
private

Definition at line 228 of file SolveDataBuffer.h.

Referenced by infocusWtSpec().

casacore::Int casa::SolveDataBuffer::nAnt_
private

The number of antennas.

Definition at line 201 of file SolveDataBuffer.h.

Referenced by nAntennas().

casacore::Cube<casacore::Bool> casa::SolveDataBuffer::residFlagCube_p
private

Definition at line 236 of file SolveDataBuffer.h.

Referenced by const_workingFlagCube(), and residFlagCube().

casacore::Cube<casacore::Complex> casa::SolveDataBuffer::residuals_p
private

Definition at line 235 of file SolveDataBuffer.h.

Referenced by residuals().

vi::VisBuffer2* casa::SolveDataBuffer::vb_
private
casacore::Cube<casacore::Bool> casa::SolveDataBuffer::workingFlagCube_p
private

Definition at line 232 of file SolveDataBuffer.h.

Referenced by const_workingFlagCube(), and workingFlagCube().

casacore::Cube<casacore::Float> casa::SolveDataBuffer::workingWtSpec_p
private

Definition at line 233 of file SolveDataBuffer.h.

Referenced by const_workingWtSpec(), and workingWtSpec().

casacore::Cube<casacore::Float> casa::SolveDataBuffer::wS_
private

Definition at line 220 of file SolveDataBuffer.h.

Referenced by weightSpectrum().


The documentation for this class was generated from the following file: