casa::CalAnalysis Class Reference

----------------------------------------------------------------------------- Start of CalAnalysis class definition ----------------------------------------------------------------------------- More...

#include <CalAnalysis.h>

List of all members.

Classes

class  INPUT
 INPUT nested class (allowed T: CalStats::NONE, CalStatsFitter::FIT, or CalStatsHist::HIST), used to hold the vector output of stats<T>(). More...
class  OUTPUT
 OUTPUT nested class (allowed T: CalStats::NONE, CalStatsFitter::FIT, or CalStatsHist::HIST), used to hold the vector output of stats<T>(). More...
class  SPW_INFO
 SPW_INFO nested class. More...

Public Types

enum  RAP {
  INIT,
  REAL,
  AMPLITUDE,
  PHASE
}
 

Real/Amplitude/Phase enums.

More...
typedef enum casa::CalAnalysis::RAP RAP
 Real/Amplitude/Phase enums.

Public Member Functions

 CalAnalysis (const String &oTableName)
 Generic constructor.
virtual ~CalAnalysis (void)
 Destructor.
String & calName (void) const
 Return the calibration table name and keyword private variables.
String & msName (void) const
String & visCal (void) const
String & parType (void) const
String & polBasis (void) const
Vector< uInt > & field (void) const
 Get the fields, antennas, times, and feeds spectral windows.
Vector< uInt > & antenna (void) const
Vector< uInt > & antenna1 (void) const
Vector< Int > & antenna2 (void) const
Vector< Double > & time (void) const
Vector< String > & feed (void) const
uInt & numspw (void) const
 Get the number of spectral windows, spectral windows, number of channels for each spectral window, and frequencies for each spectral window.
Vector< uInt > & spw (void) const
Vector< uInt > & numChannel (void) const
Vector< Vector< Double > > & freq (void) const
template<typename T >
Vector< OUTPUT< T > > & stats (const INPUT &oInput, const CalStats::ARG< T > &oArg)
 Calculate statistics for the specified fields, antennas, time range, feeds, spectral windows, and channels (allowed T: CalStats::NONE gets data without calculating statistics, CalStatsFitter::FIT calculates fits, and CalStatsHist::HIST calculates histogram statistics).

Static Public Member Functions

template<typename T >
static Bool & exists (const T &tValue, const Vector< T > &oValue)
 Function to determine whether a value is present in an array.
template<typename T >
static Bool & where (const T &tValue, const Vector< T > &oInput, uInt &uiIndex)
 Function to determine the index of a value present in an array.
template<typename T >
static Vector< T > & unique (const Vector< T > &oVector)
 Function to return sorted unique values of a vector.

Protected Member Functions

 CalAnalysis (void)
 Unused constructors.
 CalAnalysis (const CalAnalysis &oCalAnalysis)
CalAnalysisoperator= (const CalAnalysis &oCalAnalysis)
 Unused operator=() function.

Private Member Functions

String & calNameGet (const String &oTableName)
void calNameSet (const String &oCalNameIn)
String & msNameGet (const String &oTableName)
void msNameSet (const String &oMSNameIn)
String & visCalGet (const String &oTableName)
void visCalSet (const String &oVisCalIn)
String & parTypeGet (const String &oTableName)
void parTypeSet (const String &oParTypeIn)
String & polBasisGet (const String &oTableName)
void polBasisSet (const String &oPolBasisIn)
Vector< uInt > & fieldGet (const String &oTableName)
void fieldSet (const Vector< uInt > &oFieldIn)
Bool & fieldCheck (const Vector< uInt > &oFieldIn, Vector< uInt > &oFieldOut) const
Vector< uInt > & antennaGet (const String &oTableName)
void antennaSet (const Vector< uInt > &oAntennaIn)
Vector< uInt > & antenna1Get (const String &oTableName)
void antenna1Set (const Vector< uInt > &oAntenna1In)
Bool & antenna1Check (const Vector< uInt > &oAntenna1In, Vector< uInt > &oAntenna1Out) const
Vector< Int > & antenna2Get (const String &oTableName)
void antenna2Set (const Vector< Int > &oAntenna2In)
Bool & antenna2Check (const Vector< Int > &oAntenna2In, Vector< Int > &oAntenna2Out) const
Vector< Double > & timeGet (const String &oTableName)
void timeSet (const Vector< Double > &oTimeIn)
Bool & timeCheck (const Double &dStartTimeIn, const Double &dStopTimeIn, Double &dStartTimeOut, Double &dStopTimeOut, Vector< Double > &oTimeOut) const
Vector< String > & feedGet (const String &oTableName)
void feedSet (const Vector< String > &oFeedIn)
Bool & feedCheck (const Vector< String > &oFeedIn, Vector< String > &oFeedOut) const
SPW_INFOspwInfoGet (const String &oTableName)
void spwInfoSet (const SPW_INFO &oSPWInfoIn)
Bool & statsCheckInput (const CalAnalysis::INPUT &oInputIn, CalAnalysis::INPUT &oInputOut)
 Check and possibly fix the inputs to the stats<T>() member function.
Bool & getGroup (const NewCalTable &oNCT, const CalAnalysis::INPUT &oInput, Vector< uInt > &oFieldGroup, Vector< uInt > &oAntenna1Group, Vector< Int > &oAntenna2Group, Vector< Vector< Double > > &oTimeUniqueGroup, Vector< Vector< Double > > &oFreqGroup, Vector< Cube< DComplex > > &oCParamGroup, Vector< Cube< Double > > &oFParamGroup, Vector< Cube< Double > > &oParamErrGroup, Vector< Cube< Bool > > &oFlagGroup) const
 Gets the data from the new format calibration table grouped according to unique combinations of (field,antenna1,antenna2).
Bool & rowSelect (const NewCalTable &oNCT, const CalAnalysis::INPUT &oInput, Vector< uInt > &oRowSelect) const
 Select the rows based on the inputs.
Bool & rowGroup (const NewCalTable &oNCT, const Vector< uInt > &oRowSelect, Vector< Vector< uInt > > &oRowGroup, Vector< uInt > &oFieldGroup, Vector< uInt > &oAntenna1Group, Vector< Int > &oAntenna2Group, Vector< Vector< uInt > > &oSPWGroup, Vector< Vector< uInt > > &oSPWUniqueGroup, Vector< Vector< Double > > &oTimeGroup, Vector< Vector< Double > > &oTimeUniqueGroup) const
 Return rows and other quantities for each group.
Bool & chanSPW (const Vector< uInt > &oSPW, const INPUT &oInput, Vector< uInt > &oSPWMap, Vector< uInt > &oChanStart) const
 Map the spectral windows and determine the start channels (for concatenating frequencies from different spectral windows).
Bool & freqGroup (const INPUT &oInput, const Vector< Vector< uInt > > &oSPWUniqueGroup, Vector< Vector< Double > > &oFreqGroup) const
 Get the frequencies for each goup.
Bool & cubeGroup (const NewCalTable &oNCT, const INPUT &oInput, const Vector< Vector< uInt > > &oRowGroup, const Vector< Vector< uInt > > &oSPWGroup, const Vector< Vector< uInt > > &oSPWUniqueGroup, const Vector< Vector< Double > > &oTimeGroup, const Vector< Vector< Double > > &oTimeUniqueGroup, const Vector< Vector< Double > > &oFreqGroup, Vector< Cube< DComplex > > &oCParamGroup, Vector< Cube< Double > > &oFParamGroup, Vector< Cube< Double > > &oParamErrGroup, Vector< Cube< Bool > > &oFlagGroup) const
 Get the data cubes for each group.

Private Attributes

String oCalName
 Get the calibration table name and set the private variable.
String oMSName
 Get the associated MS name and set the private variable.
String oVisCal
 Get the visibility calibration type and set the private variable.
String oParType
 Get the parameter column type and set the private variable.
String oPolBasis
 Get the polarization basis and set the private variable.
uInt uiNumField
 Get the field numbers and set the private variables.
Vector< uInt > oField
uInt uiNumAntenna
 Get the antenna numbers and set the private variables.
Vector< uInt > oAntenna
uInt uiNumAntenna1
 Get the antenna 1 numbers and set the private variables.
Vector< uInt > oAntenna1
uInt uiNumAntenna2
 Get the antenna 2 numbers and set the private variables.
Vector< Int > oAntenna2
uInt uiNumTime
 Get the times and set the private variables.
Vector< Double > oTime
uInt uiNumFeed
 Get the feeds and set the private variables.
Vector< String > oFeed
SPW_INFO oSPWInfo
 Get the spectral window information and set the private variables.

Detailed Description

----------------------------------------------------------------------------- Start of CalAnalysis class definition -----------------------------------------------------------------------------

-----------------------------------------------------------------------------

Definition at line 312 of file CalAnalysis.h.


Member Typedef Documentation

Real/Amplitude/Phase enums.


Member Enumeration Documentation

Real/Amplitude/Phase enums.

Enumerator:
INIT 
REAL 
AMPLITUDE 
PHASE 

Definition at line 317 of file CalAnalysis.h.


Constructor & Destructor Documentation

casa::CalAnalysis::CalAnalysis ( const String &  oTableName  ) 

Generic constructor.

virtual casa::CalAnalysis::~CalAnalysis ( void   )  [virtual]

Destructor.

casa::CalAnalysis::CalAnalysis ( void   )  [protected]

Unused constructors.

casa::CalAnalysis::CalAnalysis ( const CalAnalysis oCalAnalysis  )  [protected]

Member Function Documentation

Vector<uInt>& casa::CalAnalysis::antenna ( void   )  const
Vector<uInt>& casa::CalAnalysis::antenna1 ( void   )  const
Bool& casa::CalAnalysis::antenna1Check ( const Vector< uInt > &  oAntenna1In,
Vector< uInt > &  oAntenna1Out 
) const [private]
Vector<uInt>& casa::CalAnalysis::antenna1Get ( const String &  oTableName  )  [private]
void casa::CalAnalysis::antenna1Set ( const Vector< uInt > &  oAntenna1In  )  [private]
Vector<Int>& casa::CalAnalysis::antenna2 ( void   )  const
Bool& casa::CalAnalysis::antenna2Check ( const Vector< Int > &  oAntenna2In,
Vector< Int > &  oAntenna2Out 
) const [private]
Vector<Int>& casa::CalAnalysis::antenna2Get ( const String &  oTableName  )  [private]
void casa::CalAnalysis::antenna2Set ( const Vector< Int > &  oAntenna2In  )  [private]
Vector<uInt>& casa::CalAnalysis::antennaGet ( const String &  oTableName  )  [private]
void casa::CalAnalysis::antennaSet ( const Vector< uInt > &  oAntennaIn  )  [private]
String& casa::CalAnalysis::calName ( void   )  const

Return the calibration table name and keyword private variables.

String& casa::CalAnalysis::calNameGet ( const String &  oTableName  )  [private]
void casa::CalAnalysis::calNameSet ( const String &  oCalNameIn  )  [private]
Bool& casa::CalAnalysis::chanSPW ( const Vector< uInt > &  oSPW,
const INPUT oInput,
Vector< uInt > &  oSPWMap,
Vector< uInt > &  oChanStart 
) const [private]

Map the spectral windows and determine the start channels (for concatenating frequencies from different spectral windows).

Bool& casa::CalAnalysis::cubeGroup ( const NewCalTable oNCT,
const INPUT oInput,
const Vector< Vector< uInt > > &  oRowGroup,
const Vector< Vector< uInt > > &  oSPWGroup,
const Vector< Vector< uInt > > &  oSPWUniqueGroup,
const Vector< Vector< Double > > &  oTimeGroup,
const Vector< Vector< Double > > &  oTimeUniqueGroup,
const Vector< Vector< Double > > &  oFreqGroup,
Vector< Cube< DComplex > > &  oCParamGroup,
Vector< Cube< Double > > &  oFParamGroup,
Vector< Cube< Double > > &  oParamErrGroup,
Vector< Cube< Bool > > &  oFlagGroup 
) const [private]

Get the data cubes for each group.

template<typename T >
Bool & casa::CalAnalysis::exists ( const T &  tValue,
const Vector< T > &  oValue 
) [inline, static]

Function to determine whether a value is present in an array.

----------------------------------------------------------------------------- End of CalAnalysis template public member functions -----------------------------------------------------------------------------

----------------------------------------------------------------------------- Start of CalAnalysis template static public member functions ----------------------------------------------------------------------------- -----------------------------------------------------------------------------

Determine whether the value is present in an array and return the boolean

Definition at line 797 of file CalAnalysis.h.

References casacore::False, and casacore::True.

Vector<String>& casa::CalAnalysis::feed ( void   )  const
Bool& casa::CalAnalysis::feedCheck ( const Vector< String > &  oFeedIn,
Vector< String > &  oFeedOut 
) const [private]
Vector<String>& casa::CalAnalysis::feedGet ( const String &  oTableName  )  [private]
void casa::CalAnalysis::feedSet ( const Vector< String > &  oFeedIn  )  [private]
Vector<uInt>& casa::CalAnalysis::field ( void   )  const

Get the fields, antennas, times, and feeds spectral windows.

Bool& casa::CalAnalysis::fieldCheck ( const Vector< uInt > &  oFieldIn,
Vector< uInt > &  oFieldOut 
) const [private]
Vector<uInt>& casa::CalAnalysis::fieldGet ( const String &  oTableName  )  [private]
void casa::CalAnalysis::fieldSet ( const Vector< uInt > &  oFieldIn  )  [private]
Vector<Vector<Double> >& casa::CalAnalysis::freq ( void   )  const
Bool& casa::CalAnalysis::freqGroup ( const INPUT oInput,
const Vector< Vector< uInt > > &  oSPWUniqueGroup,
Vector< Vector< Double > > &  oFreqGroup 
) const [private]

Get the frequencies for each goup.

Bool& casa::CalAnalysis::getGroup ( const NewCalTable oNCT,
const CalAnalysis::INPUT oInput,
Vector< uInt > &  oFieldGroup,
Vector< uInt > &  oAntenna1Group,
Vector< Int > &  oAntenna2Group,
Vector< Vector< Double > > &  oTimeUniqueGroup,
Vector< Vector< Double > > &  oFreqGroup,
Vector< Cube< DComplex > > &  oCParamGroup,
Vector< Cube< Double > > &  oFParamGroup,
Vector< Cube< Double > > &  oParamErrGroup,
Vector< Cube< Bool > > &  oFlagGroup 
) const [private]

Gets the data from the new format calibration table grouped according to unique combinations of (field,antenna1,antenna2).

Referenced by stats().

String& casa::CalAnalysis::msName ( void   )  const
String& casa::CalAnalysis::msNameGet ( const String &  oTableName  )  [private]
void casa::CalAnalysis::msNameSet ( const String &  oMSNameIn  )  [private]
Vector<uInt>& casa::CalAnalysis::numChannel ( void   )  const
uInt& casa::CalAnalysis::numspw ( void   )  const

Get the number of spectral windows, spectral windows, number of channels for each spectral window, and frequencies for each spectral window.

CalAnalysis& casa::CalAnalysis::operator= ( const CalAnalysis oCalAnalysis  )  [protected]

Unused operator=() function.

String& casa::CalAnalysis::parType ( void   )  const
String& casa::CalAnalysis::parTypeGet ( const String &  oTableName  )  [private]
void casa::CalAnalysis::parTypeSet ( const String &  oParTypeIn  )  [private]
String& casa::CalAnalysis::polBasis ( void   )  const
String& casa::CalAnalysis::polBasisGet ( const String &  oTableName  )  [private]
void casa::CalAnalysis::polBasisSet ( const String &  oPolBasisIn  )  [private]
Bool& casa::CalAnalysis::rowGroup ( const NewCalTable oNCT,
const Vector< uInt > &  oRowSelect,
Vector< Vector< uInt > > &  oRowGroup,
Vector< uInt > &  oFieldGroup,
Vector< uInt > &  oAntenna1Group,
Vector< Int > &  oAntenna2Group,
Vector< Vector< uInt > > &  oSPWGroup,
Vector< Vector< uInt > > &  oSPWUniqueGroup,
Vector< Vector< Double > > &  oTimeGroup,
Vector< Vector< Double > > &  oTimeUniqueGroup 
) const [private]

Return rows and other quantities for each group.

Bool& casa::CalAnalysis::rowSelect ( const NewCalTable oNCT,
const CalAnalysis::INPUT oInput,
Vector< uInt > &  oRowSelect 
) const [private]

Select the rows based on the inputs.

Vector<uInt>& casa::CalAnalysis::spw ( void   )  const
SPW_INFO& casa::CalAnalysis::spwInfoGet ( const String &  oTableName  )  [private]
void casa::CalAnalysis::spwInfoSet ( const SPW_INFO oSPWInfoIn  )  [private]
template<typename T >
Vector< CalAnalysis::OUTPUT< T > > & casa::CalAnalysis::stats ( const INPUT oInput,
const CalStats::ARG< T > &  oArg 
) [inline]

Calculate statistics for the specified fields, antennas, time range, feeds, spectral windows, and channels (allowed T: CalStats::NONE gets data without calculating statistics, CalStatsFitter::FIT calculates fits, and CalStatsHist::HIST calculates histogram statistics).

----------------------------------------------------------------------------- End of CalAnalysis class definition -----------------------------------------------------------------------------

----------------------------------------------------------------------------- Start of CalAnalysis template public member functions ----------------------------------------------------------------------------- -----------------------------------------------------------------------------

Initialize the output vector containing statistics for each field ID, antenna 1, and antenna 2

Check and fix the inputs

Create an instance of the new format calibration table class Use createCT to enforce backward compatibility

Get the cubes for each group

Resize the output vector (each group corresponds to an element of Vector<OUTPUT<T> >())

Send each group to CalStats<T>() and perform the desired operation

Return the reference to the Vector<CalAnalysis::OUTPUT<T> > instance

Definition at line 640 of file CalAnalysis.h.

References AMPLITUDE, casa::NewCalTable::createCT(), casacore::False, getGroup(), casacore::log(), oCalName, PHASE, REAL, casa::CalStats::stats(), statsCheckInput(), and WHERE.

Bool& casa::CalAnalysis::statsCheckInput ( const CalAnalysis::INPUT oInputIn,
CalAnalysis::INPUT oInputOut 
) [private]

Check and possibly fix the inputs to the stats<T>() member function.

Referenced by stats().

Vector<Double>& casa::CalAnalysis::time ( void   )  const
Bool& casa::CalAnalysis::timeCheck ( const Double &  dStartTimeIn,
const Double &  dStopTimeIn,
Double &  dStartTimeOut,
Double &  dStopTimeOut,
Vector< Double > &  oTimeOut 
) const [private]
Vector<Double>& casa::CalAnalysis::timeGet ( const String &  oTableName  )  [private]
void casa::CalAnalysis::timeSet ( const Vector< Double > &  oTimeIn  )  [private]
template<typename T >
Vector< T > & casa::CalAnalysis::unique ( const Vector< T > &  oVector  )  [inline, static]

Function to return sorted unique values of a vector.

-----------------------------------------------------------------------------

Initialize the unique vector

Form the unique vector

Sort the unique vector

Return the unique sorted vector

Definition at line 899 of file CalAnalysis.h.

References casacore::False, and casacore::True.

String& casa::CalAnalysis::visCal ( void   )  const
String& casa::CalAnalysis::visCalGet ( const String &  oTableName  )  [private]
void casa::CalAnalysis::visCalSet ( const String &  oVisCalIn  )  [private]
template<typename T >
Bool & casa::CalAnalysis::where ( const T &  tValue,
const Vector< T > &  oInput,
uInt &  uiIndex 
) [inline, static]

Function to determine the index of a value present in an array.

-----------------------------------------------------------------------------

Find the index in the input vector

If the value was found return True, otherwise return False

Definition at line 843 of file CalAnalysis.h.

References casacore::False, and casacore::True.


Member Data Documentation

Vector<uInt> casa::CalAnalysis::oAntenna [private]

Definition at line 462 of file CalAnalysis.h.

Vector<uInt> casa::CalAnalysis::oAntenna1 [private]

Definition at line 467 of file CalAnalysis.h.

Vector<Int> casa::CalAnalysis::oAntenna2 [private]

Definition at line 474 of file CalAnalysis.h.

String casa::CalAnalysis::oCalName [private]

Get the calibration table name and set the private variable.

Definition at line 430 of file CalAnalysis.h.

Referenced by stats().

Vector<String> casa::CalAnalysis::oFeed [private]

Definition at line 489 of file CalAnalysis.h.

Vector<uInt> casa::CalAnalysis::oField [private]

Definition at line 455 of file CalAnalysis.h.

String casa::CalAnalysis::oMSName [private]

Get the associated MS name and set the private variable.

Definition at line 435 of file CalAnalysis.h.

String casa::CalAnalysis::oParType [private]

Get the parameter column type and set the private variable.

Definition at line 445 of file CalAnalysis.h.

String casa::CalAnalysis::oPolBasis [private]

Get the polarization basis and set the private variable.

Definition at line 450 of file CalAnalysis.h.

Get the spectral window information and set the private variables.

Definition at line 496 of file CalAnalysis.h.

Vector<Double> casa::CalAnalysis::oTime [private]

Definition at line 481 of file CalAnalysis.h.

String casa::CalAnalysis::oVisCal [private]

Get the visibility calibration type and set the private variable.

Definition at line 440 of file CalAnalysis.h.

Get the antenna numbers and set the private variables.

Definition at line 462 of file CalAnalysis.h.

Get the antenna 1 numbers and set the private variables.

Definition at line 467 of file CalAnalysis.h.

Get the antenna 2 numbers and set the private variables.

Definition at line 474 of file CalAnalysis.h.

Get the feeds and set the private variables.

Definition at line 489 of file CalAnalysis.h.

Get the field numbers and set the private variables.

Definition at line 455 of file CalAnalysis.h.

Get the times and set the private variables.

Definition at line 481 of file CalAnalysis.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1