casa::CalStats Class Reference

----------------------------------------------------------------------------- Start of CalStats class definition ----------------------------------------------------------------------------- More...

#include <CalStats.h>

Inheritance diagram for casa::CalStats:
casa::CalStatsAmp casa::CalStatsPhase casa::CalStatsReal

List of all members.

Classes

class  ARG
 Statistics ARG nested class (allowed T: CalStats::NONE, CalStatsFitter::FIT, or CalStatsHist::HIST), used as an input to stats<T>() and statsWrap<T>(). More...
class  ARG< CalStats::NONE >
 ----------------------------------------------------------------------------- End of CalStats class definition ----------------------------------------------------------------------------- More...
class  ARG< CalStatsFitter::FIT >
 Specialization for the CalStatsFitter::FIT() class. More...
class  AXES
 AXES nested class. More...
class  DATA
 DATA nested class. More...
class  NONE
 NONE nested class. More...
class  OUT
 Statistics OUT nested class (allowed T: CalStats::NONE, CalStatsFitter::FIT, or CalStatsHist::HIST), used to hold the output of statsWrap<T>(). More...

Public Types

enum  AXIS {
  INIT,
  FEED,
  FREQUENCY,
  TIME
}
 

Axis enums.

More...
typedef enum casa::CalStats::AXIS AXIS
 Axis enums.

Public Member Functions

 CalStats (const Cube< Double > &oValue, const Cube< Double > &oValueErr, const Cube< Bool > &oFlag, const Vector< String > &oFeed, const Vector< Double > &oFrequency, const Vector< Double > &oTime, const AXIS &eAxisIterUser)
 Generic constructor.
 CalStats (const CalStats &oCalStats)
 Copy constructor and operator=() function.
CalStatsoperator= (const CalStats &oCalStats)
virtual ~CalStats (void)
 Destructor.
IPosition & axisIterID (void) const
 Axis ID states.
AXISaxisNonIterID (void) const
Vector< String > & axisIterFeed (void) const
 Axis value states.
Vector< Double > & axisIterUser (void) const
Vector< Double > & axisNonIter (void) const
IPosition & statsShape (void) const
 Output statistics cube shape state.
Cube< Double > & value (void) const
 Input data states.
Cube< Double > & valueErr (void) const
Cube< Bool > & flag (void) const
template<typename T >
Matrix< OUT< T > > & stats (const ARG< T > &oArg)
 Calculate statistics (allowed T: CalStats::NONE gets data without calculating statistics, CalStatsFitter::FIT calculates fits, and CalStatsHist::HIST calculates histogram statistics).
template<typename T >
T & statsWrap (const Vector< Double > &oAbs, const Vector< Double > &oValue, const Vector< Double > &oValueErr, Vector< Bool > &oFlag, const ARG< T > &oArg)

Static Public Member Functions

static String & axisName (const AXIS &eAxis)
 The axis names.

Protected Member Functions

 CalStats (void)
 Unused constructor.
void next (void)
 Simultaneously increment and reset all input parameter cube iterators.
void reset (void)

Protected Attributes

IPosition oAxisIterID
 The axis IDs.
AXIS eAxisNonIterID
Vector< String > oAxisIterFeed
 Internal copies of the iteration and non-iteration axis values.
Vector< Double > oAxisIterUser
Vector< Double > oAxisNonIter
IPosition oStatsShape
 Shape of the output statistics cubes.
Cube< Double > * poValue
 Internal copies of input parameter cubes.
Cube< Double > * poValueErr
Cube< Bool > * poFlag
ArrayIterator< Double > * poValueIter
 Input parameter cube iterators.
ArrayIterator< Double > * poValueErrIter
ArrayIterator< Bool > * poFlagIter

Detailed Description

----------------------------------------------------------------------------- Start of CalStats class definition -----------------------------------------------------------------------------

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

Definition at line 221 of file CalStats.h.


Member Typedef Documentation

Axis enums.

There are always two iteration axes. The FEED axis is always the first interation axis. Either the FREQUENCY or TIME axis is the other (user-defined) iteration axis. The remaining axis (TIME or FREQUENCY) is therefore the non-iteration axis. NB: If additional enums are added, additional names must be added to the axisName() static private member function.


Member Enumeration Documentation

Axis enums.

There are always two iteration axes. The FEED axis is always the first interation axis. Either the FREQUENCY or TIME axis is the other (user-defined) iteration axis. The remaining axis (TIME or FREQUENCY) is therefore the non-iteration axis. NB: If additional enums are added, additional names must be added to the axisName() static private member function.

Enumerator:
INIT 
FEED 
FREQUENCY 
TIME 

Definition at line 231 of file CalStats.h.


Constructor & Destructor Documentation

casa::CalStats::CalStats ( const Cube< Double > &  oValue,
const Cube< Double > &  oValueErr,
const Cube< Bool > &  oFlag,
const Vector< String > &  oFeed,
const Vector< Double > &  oFrequency,
const Vector< Double > &  oTime,
const AXIS eAxisIterUser 
)

Generic constructor.

casa::CalStats::CalStats ( const CalStats oCalStats  ) 

Copy constructor and operator=() function.

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

Destructor.

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

Unused constructor.


Member Function Documentation

Vector<String>& casa::CalStats::axisIterFeed ( void   )  const

Axis value states.

IPosition& casa::CalStats::axisIterID ( void   )  const

Axis ID states.

Vector<Double>& casa::CalStats::axisIterUser ( void   )  const
static String& casa::CalStats::axisName ( const AXIS eAxis  )  [static]

The axis names.

Vector<Double>& casa::CalStats::axisNonIter ( void   )  const
AXIS& casa::CalStats::axisNonIterID ( void   )  const
Cube<Bool>& casa::CalStats::flag ( void   )  const
void casa::CalStats::next ( void   )  [protected]

Simultaneously increment and reset all input parameter cube iterators.

Referenced by stats().

CalStats& casa::CalStats::operator= ( const CalStats oCalStats  ) 
void casa::CalStats::reset ( void   )  [protected]

Referenced by stats().

template<typename T >
Matrix< CalStats::OUT< T > > & casa::CalStats::stats ( const ARG< T > &  oArg  )  [inline]

Calculate statistics (allowed T: CalStats::NONE gets data without calculating statistics, CalStatsFitter::FIT calculates fits, and CalStatsHist::HIST calculates histogram statistics).

----------------------------------------------------------------------------- End of OUT<T> specialized class template public member functions -----------------------------------------------------------------------------

Member function stats() is the main user interface and statsWrap() is the supporting wrapper.

----------------------------------------------------------------------------- Start of CalStats::stats<T> template public statistics member function ----------------------------------------------------------------------------- -----------------------------------------------------------------------------

Initialize the CalStats::OUT<T> array and its iterator

For each iteration, convert the resulting arrays to vectors and feed them to the CalStatsFitter::fit() function

The flag output vector is set here because robust fitting can change them

Reset the input parameter iterators

Return the reference to the Matrix<CalStats::OUT<T> > instance

Definition at line 475 of file CalStats.h.

References eAxisNonIterID, casacore::False, casacore::log(), next(), oAxisIterFeed, oAxisIterID, oAxisIterUser, oAxisNonIter, oStatsShape, poFlagIter, poValueErrIter, poValueIter, reset(), String, and WHERE.

Referenced by casa::CalAnalysis::stats().

IPosition& casa::CalStats::statsShape ( void   )  const

Output statistics cube shape state.

template<typename T >
T& casa::CalStats::statsWrap ( const Vector< Double > &  oAbs,
const Vector< Double > &  oValue,
const Vector< Double > &  oValueErr,
Vector< Bool > &  oFlag,
const ARG< T > &  oArg 
) [inline]
Cube<Double>& casa::CalStats::value ( void   )  const

Input data states.

Cube<Double>& casa::CalStats::valueErr ( void   )  const

Member Data Documentation

Definition at line 335 of file CalStats.h.

Referenced by stats().

Vector<String> casa::CalStats::oAxisIterFeed [protected]

Internal copies of the iteration and non-iteration axis values.

Definition at line 338 of file CalStats.h.

Referenced by stats().

IPosition casa::CalStats::oAxisIterID [protected]

The axis IDs.

The two iteration axes are FEED (always) and either TIME or FREQUENCY (user defined). The non-iteration axis is either FREQUENCY or TIME (the opposite of the user-defined iteration axis).

Definition at line 334 of file CalStats.h.

Referenced by stats().

Vector<Double> casa::CalStats::oAxisIterUser [protected]

Definition at line 339 of file CalStats.h.

Referenced by stats().

Vector<Double> casa::CalStats::oAxisNonIter [protected]

Definition at line 340 of file CalStats.h.

Referenced by stats().

IPosition casa::CalStats::oStatsShape [protected]

Shape of the output statistics cubes.

Definition at line 343 of file CalStats.h.

Referenced by stats().

Cube<Bool>* casa::CalStats::poFlag [protected]

Definition at line 348 of file CalStats.h.

ArrayIterator<Bool>* casa::CalStats::poFlagIter [protected]

Definition at line 353 of file CalStats.h.

Referenced by stats().

Cube<Double>* casa::CalStats::poValue [protected]

Internal copies of input parameter cubes.

Definition at line 346 of file CalStats.h.

Cube<Double>* casa::CalStats::poValueErr [protected]

Definition at line 347 of file CalStats.h.

ArrayIterator<Double>* casa::CalStats::poValueErrIter [protected]

Definition at line 352 of file CalStats.h.

Referenced by stats().

ArrayIterator<Double>* casa::CalStats::poValueIter [protected]

Input parameter cube iterators.

Definition at line 351 of file CalStats.h.

Referenced by stats().


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