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::vi::CalibratingVi2Factory Class Reference

A top level class defining the data handling interface for the CalibratingTvi2 module. More...

#include <CalibratingVi2Factory.h>

Inheritance diagram for casa::vi::CalibratingVi2Factory:
casa::vi::CalibratingVi2FactoryI casa::vi::ViFactory

Public Member Functions

 CalibratingVi2Factory (casacore::MeasurementSet *ms, const CalibratingParameters &calpar, const IteratingParameters &iterpar=IteratingParameters())
 
 CalibratingVi2Factory ()
 
 CalibratingVi2Factory (casacore::MeasurementSet *ms, const casacore::Record &calrec, const IteratingParameters &iterpar=IteratingParameters())
 
 CalibratingVi2Factory (casacore::MeasurementSet *ms, const casacore::String &callib, const IteratingParameters &iterpar=IteratingParameters())
 
virtual ~CalibratingVi2Factory ()
 
virtual void initialize (casacore::MeasurementSet *ms, const casacore::Record &calrec, const IteratingParameters &iterpar)
 Public functions to initialize a generic CVi2F. More...
 
virtual void initialize (casacore::MeasurementSet *ms, const casacore::String &callib, const IteratingParameters &iterpar)
 
- Public Member Functions inherited from casa::vi::CalibratingVi2FactoryI
 CalibratingVi2FactoryI ()
 
virtual ~CalibratingVi2FactoryI ()
 
- Public Member Functions inherited from casa::vi::ViFactory
virtual ~ViFactory ()
 

Protected Member Functions

virtual vi::ViImplementation2createVi () const
 Create CalibratingVi2 implementation If vii=NULL, create underlying vii internally. More...
 
virtual vi::ViImplementation2createVi (vi::ViImplementation2 *vii) const
 If vii not NULL, then use it as the underlying one. More...
 

Private Attributes

casacore::Bool valid_p
 
casacore::MeasurementSetms_p
 
CalibratingParameters calpar_p
 
IteratingParameters iterpar_p
 

Additional Inherited Members

- Public Types inherited from casa::vi::CalibratingVi2FactoryI
typedef CalibratingVi2FactoryI *(* CalViFacGenerator )()
 
typedef CalibratingVi2FactoryI *(* CalViFac_byRec_Generator )(casacore::MeasurementSet *, const casacore::Record &, const IteratingParameters &)
 
- Static Public Member Functions inherited from casa::vi::CalibratingVi2FactoryI
static casacore::Bool setGenerator (CalViFacGenerator)
 
static casacore::Bool set_byRec_Generator (CalViFac_byRec_Generator)
 
static CalibratingVi2FactoryIgenerate ()
 Public function to generate myself via static generator_p implemented in synthesis. More...
 
static CalibratingVi2FactoryIgenerate (casacore::MeasurementSet *ms, const casacore::Record &calrec, const IteratingParameters &iterpar)
 Public function to generate myself via static byRec_generator_p. More...
 

Detailed Description

A top level class defining the data handling interface for the CalibratingTvi2 module.

Intended use:

Public interface

Prerequisite

Etymology

CalibratingVi2Factory is a class that generates a Visibility Iterator implementation that can calibrate data

Synopsis

CalibratingVi2Factory generates a Visibility Iterator implementation (ViImplementation2) object that can be plugged into a Visibility Iterator (VisibilityIterator2) object, so that the user can access corrected data (and related) using the VisibilityIterator2 interface.

Motivation

This class makes calibration application portable, and available for all VisibilityIterator2 users

Example

External usage is quite simple, and compliant with the 'normal' VI/VB framework.

The user first makes objects describing the data iteration and calibration parameters:

IteratingParameters iterpar;
iterpar.setChunkInterval(60.0);
CalibratingParameters calpar(10.0); // a simple factor of 10.0 to multiply the data
// (in leiu of full VisEquation functionality (TBD)

Then these parameter objects, along with a casacore::MeasurementSet pointer, are used to make a factory suitable for the generic VisibilityIterator2 ctor, which is then invoked

CalibratingVi2Factory factory(ms,calpar,iterpar);
vi::VisibilityIterator2 *visIter = new vi::VisibilityIterator2 (factory);
vi::VisBuffer2 *visBuffer = visIter->getVisBuffer();

Once this is done one can normally iterate and access OTF calibrated data:

while (visIter->moreChunks())
{
visIter->origin();
while (visIter->more())
{
casacore::Vector<casacore::Int> ddi = visBuffer->dataDescriptionIds();
casacore::Vector<casacore::Int> antenna1 = visBuffer->antenna1();
casacore::Vector<casacore::Int> antenna2 = visBuffer->antenna2();
casacore::Cube<casacore::Complex> cvis = visBuffer->visCubeCorrected();
visIter->next();
}
visIter->nextChunk();
}

casacore::Notice that it is the responsibility of the application layer to delete the VisibilityIterator2 pointer returned by the factory method. However the life cycle of the VisBuffer2 object is responsibility of the VisibilityIterator2 object.

delete visIter;

Definition at line 124 of file CalibratingVi2Factory.h.

Constructor & Destructor Documentation

casa::vi::CalibratingVi2Factory::CalibratingVi2Factory ( casacore::MeasurementSet ms,
const CalibratingParameters calpar,
const IteratingParameters iterpar = IteratingParameters() 
)
casa::vi::CalibratingVi2Factory::CalibratingVi2Factory ( )
casa::vi::CalibratingVi2Factory::CalibratingVi2Factory ( casacore::MeasurementSet ms,
const casacore::Record calrec,
const IteratingParameters iterpar = IteratingParameters() 
)
casa::vi::CalibratingVi2Factory::CalibratingVi2Factory ( casacore::MeasurementSet ms,
const casacore::String callib,
const IteratingParameters iterpar = IteratingParameters() 
)
virtual casa::vi::CalibratingVi2Factory::~CalibratingVi2Factory ( )
virtual

Member Function Documentation

virtual vi::ViImplementation2* casa::vi::CalibratingVi2Factory::createVi ( ) const
protectedvirtual

Create CalibratingVi2 implementation If vii=NULL, create underlying vii internally.

Implements casa::vi::CalibratingVi2FactoryI.

virtual vi::ViImplementation2* casa::vi::CalibratingVi2Factory::createVi ( vi::ViImplementation2 vii) const
protectedvirtual

If vii not NULL, then use it as the underlying one.

Implements casa::vi::CalibratingVi2FactoryI.

virtual void casa::vi::CalibratingVi2Factory::initialize ( casacore::MeasurementSet ms,
const casacore::Record calrec,
const IteratingParameters iterpar 
)
virtual

Public functions to initialize a generic CVi2F.

Implements casa::vi::CalibratingVi2FactoryI.

virtual void casa::vi::CalibratingVi2Factory::initialize ( casacore::MeasurementSet ms,
const casacore::String callib,
const IteratingParameters iterpar 
)
virtual

Member Data Documentation

CalibratingParameters casa::vi::CalibratingVi2Factory::calpar_p
private

Definition at line 166 of file CalibratingVi2Factory.h.

IteratingParameters casa::vi::CalibratingVi2Factory::iterpar_p
private

Definition at line 167 of file CalibratingVi2Factory.h.

casacore::MeasurementSet* casa::vi::CalibratingVi2Factory::ms_p
private

Definition at line 165 of file CalibratingVi2Factory.h.

casacore::Bool casa::vi::CalibratingVi2Factory::valid_p
private

Definition at line 164 of file CalibratingVi2Factory.h.


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