28 #ifndef SYNTHESIS_SOLVEDATABUFFER_H
29 #define SYNTHESIS_SOLVEDATABUFFER_H
const casacore::Vector< casacore::Int > & arrayId() const
casacore::Cube< casacore::Bool > fC_
casacore::Cube< casacore::Bool > & residFlagCube()
Workspace for flags of the residuals.
const casacore::Vector< casacore::Int > & fieldId() const
casacore::Vector< double > freqs_
The frequencies Currently, assumed uniform over rows.
const casacore::Cube< casacore::Complex > & visCubeModel() const
SDBList()
Construct empty list.
double aggregateTimeCentroid() const
virtual const casacore::Vector< casacore::Int > & antenna2() const =0
size_t nelements() const
How many elements does this array have? Product of all axis lengths.
casacore::Int nSDB() const
How many SDBs?
casacore::Array< casacore::Complex > diffResiduals_p
casacore::Int nAntennas() const
casacore::Int nSDB_
How many SDBs contained herein.
casacore::Int nChannels() const
casacore::Cube< casacore::Bool > workingFlagCube_p
void sizeResiduals(const casacore::Int &nPar, const casacore::Int &nDiff)
Size/init/finalize the residuals workspaces.
casacore::Double centroidFreq() const
~Centroid frequency over all SDBs
casacore::Cube< casacore::Float > infocusWtSpec_p
const casacore::Cube< casacore::Complex > & visCubeCorrected() const
casacore::Int nRows() const
VB2-like data access methods (mostly const)
SolveDataBuffer & operator()(casacore::Int i)
Access an SDB by index.
casacore::Int nAnt_
The number of antennas.
casacore::Double centroidFreq() const
casacore::Cube< casacore::Float > wS_
virtual const casacore::Vector< casacore::Int > & arrayId() const =0
casacore::Int focusChan_p
The current in-focus channel.
virtual const casacore::Cube< casacore::Complex > & visCubeCorrected() const =0
virtual const casacore::Matrix<CStokesVector> & vis () const = 0; // [nF,nR] virtual void setVis (cas...
bool Ok()
Does the SDBList contain usable data? (at least one SDB, with non-zero net weight) ...
const casacore::Vector< double > & freqs() const
The frequencies Currently, this insists on uniformity over all SDBs.
casacore::Cube< casacore::Complex > residuals_p
casacore::Cube< casacore::Complex > & infocusVisCube()
virtual casacore::Int nPar()
M currently has just 2 complex parameters, i.e., both parallel hands.
void cleanUp()
Delete the workspaces.
void initResidWithModel()
int aggregateScan() const
casacore::Vector< int > corrs_
The correlation types Currently, assumed uniform over rows (private; used only by polBasis...
void updateWorkingWeights(casacore::Bool, casacore::Float clamp=0.0)
void initResidWithModel()
virtual const casacore::Cube< casacore::Complex > & visCubeModel() const =0
virtual void reference(const Array< T > &other)
Make this cube a reference to other.
const casacore::Cube< casacore::Complex > & infocusModelVisCube() const
virtual const casacore::Vector< casacore::Int > & dataDescriptionIds() const =0
virtual casacore::Int dataDescriptionId () const = 0; virtual void setDataDescriptionId (casacore::In...
vi::VisBuffer2 * vb_
The underlying VisBuffer2.
void updateWorkingWeights(casacore::Bool doL1=false, casacore::Float clamp=0.0)
const casacore::Vector< casacore::Double > & freqs() const
casacore::Cube< casacore::Bool > residFlagCube_p
SolveDataBuffer is a container for VisBuffer2 data and related residual and differentiation results r...
const casacore::Cube< casacore::Bool > & residFlagCube() const
casacore::Vector< casacore::Bool > & flagRow()
These are not const, because we will generally amend them:
casacore::Cube< casacore::Complex > & residuals()
Workspace for the residual visibilities.
bool Ok()
Does SDB contain finite weight?
void enforceSolveWeights(const casacore::Bool pHandOnly)
Zero flagged weights, and optionally the cross-hand weights.
const casacore::Cube< casacore::Complex > & residuals() const
casacore::Cube< casacore::Float > & weightSpectrum()
void add(const vi::VisBuffer2 &vb)
Generate a new SDB from an input VB2.
casacore::Double aggregateCentroidFreq() const
Simple centroid of per-SDB centroidFreqs NB: this differs from centroidFreq in that it is not a simpl...
void sizeResiduals(const casacore::Int &nPar, const casacore::Int &nDiff)
casacore::Cube< casacore::Float > workingWtSpec_p
virtual const casacore::Vector< casacore::Int > & observationId() const =0
const casacore::Vector< casacore::Int > & scan() const
void setFocusChan(const casacore::Int focusChan=-1)
Set the focus channel (forms references to focus-channel flag/data/model)
void enforceSolveWeights(const casacore::Bool pHandOnly)
virtual casacore::Int nRows() const =0
Returns the number of rows in this VisBuffer.
casacore::Int nCorrelations() const
virtual const casacore::Vector< casacore::Int > & scan() const =0
const casacore::Vector< casacore::Int > & dataDescriptionIds() const
casacore::Cube< casacore::Bool > & infocusFlagCube()
Access functions.
const casacore::Cube< casacore::Float > & infocusWtSpec() const
const casacore::Cube< casacore::Bool > & infocusFlagCube() const
casacore::String polBasis() const
Return pol basis.
int nChannels() const
How many data chans? Currently, this insists on uniformity over all SDBs.
const casacore::Vector< int > & observationId() const
casacore::Cube< casacore::Bool > & workingFlagCube()
bool Bool
Define the standard types used by Casacore.
void updateWorkingFlags()
Manage working weights.
casacore::Cube< casacore::Complex > infocusModelVisCube_p
virtual const casacore::Vector< casacore::Int > & fieldId() const =0
const casacore::Vector< casacore::Double > & timeCentroid() const
void reportData()
Print out data, weights, flags for debugging purposes.
const casacore::Vector< casacore::Int > & antenna1() const
void reportData()
Print out data, weights, flags for debugging purposes.
SolveDataBuffer & operator=(const SolveDataBuffer &sdb)
Assignment.
casacore::Vector< casacore::Bool > fR_
Array reference objects for things in the vb we need to mess with.
casacore::Vector< float > feedPa_
The feedPa Currently, assumed uniform (per antenna) over rows.
casacore::Cube< casacore::Complex > infocusVisCube_p
A drop-in replacement for Block<T*>.
virtual casacore::Int nCorrelations() const =0
Returns the number of correlations along the visCube correlation axis.
casacore::Cube< casacore::Bool > infocusFlagCube_p
actual storage for the data
int nAntennas() const
How many antennas Currently, this insists on uniformity over all SDBs.
casacore::Cube< casacore::Bool > & flagCube()
const casacore::Vector< casacore::Int > & antenna2() const
const casacore::Vector< casacore::Int > & spectralWindow() const
const casacore::Cube< casacore::Float > & const_workingWtSpec() const
SolveDataBuffer()
Generic ctor.
virtual const casacore::Vector< casacore::Double > & timeCentroid() const =0
casacore::PtrBlock< SolveDataBuffer * > SDB_
Keep SDBs as a list of pointers.
virtual casacore::Int nChannels() const =0
int nCorrelations() const
How man correlations Currently, this insists on uniformity over all SDBs.
virtual const casacore::Vector< casacore::Bool > & flagRow() const =0
VisBuffer2s encapsulate one chunk of visibility data for processing.
~SolveDataBuffer()
Destructor.
virtual const casacore::Cube< casacore::Bool > & flagCube() const =0
casacore::String polBasis() const
Return pol basis.
casacore::Vector< double > freqs_
Aggregate frequency storage (so we can calculate once-ish and return a reference) ...
void enforceAPonData(const casacore::String &apmode)
Aggregated methods.
void updateWorkingFlags()
NB: disable for now, may not be needed...
casacore::Array< casacore::Complex > & diffResiduals()
Workspace for the differentiated residuals.
const casacore::Cube< casacore::Complex > & infocusVisCube() const
casacore::Cube< casacore::Float > & infocusWtSpec()
double aggregateTime() const
casacore::Cube< casacore::Complex > & infocusModelVisCube()
String: the storage and methods of handling collections of characters.
void enforceAPonData(const casacore::String &apmode)
Divide corrected by model NB: disable for now, may not be needed...
void extendBaselineFlags()
Extend baseline-dependent flags to all SDBs in the list This uniformizes the baseline-dependent flags...
int aggregateObsId() const
Aggregate meta info.
virtual void reference(const Array< T > &other)
Create a reference to "other", which must be of dimension one.
const casacore::Vector< casacore::Double > & time() const
const casacore::Vector< casacore::Float > & feedPa() const
The feedPa.
void initFromVB(const vi::VisBuffer2 &vb)
Handle copy from the input VB2.
const casacore::Array< casacore::Complex > & diffResiduals() const
const casacore::Cube< casacore::Bool > & const_workingFlagCube() const
virtual const casacore::Cube< casacore::Float > & weightSpectrum() const =0
virtual const casacore::Matrix<casacore::Float> & weightMat () const = 0; // [nC,nR] virtual void set...
virtual const casacore::Vector< casacore::Double > & time() const =0
virtual const casacore::Vector< casacore::Int > & spectralWindows() const =0
Returns the spectral window ID for the specified row.
casacore::Cube< casacore::Float > & workingWtSpec()
Working weights and flags const versions return infocus versions if working versions are empty! ...