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


Start of CalStats class definition

More...

#include <CalStats.h>

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

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. More...
 

Public Member Functions

 CalStats (const casacore::Cube< casacore::Double > &oValue, const casacore::Cube< casacore::Double > &oValueErr, const casacore::Cube< casacore::Bool > &oFlag, const casacore::Vector< casacore::String > &oFeed, const casacore::Vector< casacore::Double > &oFrequency, const casacore::Vector< casacore::Double > &oTime, const AXIS &eAxisIterUser)
 Generic constructor. More...
 
 CalStats (const CalStats &oCalStats)
 Copy constructor and operator=() function. More...
 
CalStatsoperator= (const CalStats &oCalStats)
 
virtual ~CalStats (void)
 Destructor. More...
 
casacore::IPosition axisIterID (void) const
 Axis ID states. More...
 
AXIS axisNonIterID (void) const
 
casacore::Vector
< casacore::String
axisIterFeed (void) const
 Axis value states. More...
 
casacore::Vector
< casacore::Double
axisIterUser (void) const
 
casacore::Vector
< casacore::Double
axisNonIter (void) const
 
casacore::IPosition statsShape (void) const
 Output statistics cube shape state. More...
 
casacore::Cube
< casacore::Double > & 
value (void) const
 casacore::Input data states More...
 
casacore::Cube
< casacore::Double > & 
valueErr (void) const
 
casacore::Cube< casacore::Bool > & flag (void) const
 
template<typename T >
casacore::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). More...
 
template<typename T >
statsWrap (const casacore::Vector< casacore::Double > &oAbs, const casacore::Vector< casacore::Double > &oValue, const casacore::Vector< casacore::Double > &oValueErr, casacore::Vector< casacore::Bool > &oFlag, const ARG< T > &oArg)
 

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

casacore::IPosition oAxisIterID
 The axis IDs. More...
 
AXIS eAxisNonIterID
 
casacore::Vector
< casacore::String
oAxisIterFeed
 Internal copies of the iteration and non-iteration axis values. More...
 
casacore::Vector
< casacore::Double
oAxisIterUser
 
casacore::Vector
< casacore::Double
oAxisNonIter
 
casacore::IPosition oStatsShape
 Shape of the output statistics cubes. More...
 
casacore::Cube
< casacore::Double > * 
poValue
 Internal copies of input parameter cubes. More...
 
casacore::Cube
< casacore::Double > * 
poValueErr
 
casacore::Cube< casacore::Bool > * poFlag
 
casacore::ArrayIterator
< casacore::Double > * 
poValueIter
 casacore::Input parameter cube iterators More...
 
casacore::ArrayIterator
< casacore::Double > * 
poValueErrIter
 
casacore::ArrayIterator
< casacore::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 casacore::Cube< casacore::Double > &  oValue,
const casacore::Cube< casacore::Double > &  oValueErr,
const casacore::Cube< casacore::Bool > &  oFlag,
const casacore::Vector< casacore::String > &  oFeed,
const casacore::Vector< casacore::Double > &  oFrequency,
const casacore::Vector< casacore::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

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

Axis value states.

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

Axis ID states.

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

The axis names.

casacore::Vector<casacore::Double> casa::CalStats::axisNonIter ( void  ) const
AXIS casa::CalStats::axisNonIterID ( void  ) const
casacore::Cube<casacore::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 >
casacore::Matrix< CalStats::OUT< T > > casa::CalStats::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).


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 casacore::Matrix<CalStats::OUT<T> > instance

Definition at line 473 of file CalStats.h.

References casacore::ArrayIterator< T >::array(), casacore::Array< T >::copy(), eAxisNonIterID, casacore::AipsError::getMesg(), casacore::log(), casacore::ArrayBase::nelements(), casacore::ArrayIterator< T >::next(), next(), oAxisIterFeed, oAxisIterID, oAxisIterUser, oAxisNonIter, oStatsShape, casacore::ArrayPositionIterator::pastEnd(), poFlagIter, casacore::ArrayPositionIterator::pos(), casacore::LogIO::POST, poValueErrIter, poValueIter, casacore::Array< T >::reform(), casacore::Array< T >::removeDegenerate(), reset(), casacore::LogIO::WARN, and WHERE.

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

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

Output statistics cube shape state.

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

casacore::Input data states

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

Member Data Documentation

AXIS casa::CalStats::eAxisNonIterID
protected

Definition at line 335 of file CalStats.h.

Referenced by stats().

casacore::Vector<casacore::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().

casacore::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().

casacore::Vector<casacore::Double> casa::CalStats::oAxisIterUser
protected

Definition at line 339 of file CalStats.h.

Referenced by stats().

casacore::Vector<casacore::Double> casa::CalStats::oAxisNonIter
protected

Definition at line 340 of file CalStats.h.

Referenced by stats().

casacore::IPosition casa::CalStats::oStatsShape
protected

Shape of the output statistics cubes.

Definition at line 343 of file CalStats.h.

Referenced by stats().

casacore::Cube<casacore::Bool>* casa::CalStats::poFlag
protected

Definition at line 348 of file CalStats.h.

casacore::ArrayIterator<casacore::Bool>* casa::CalStats::poFlagIter
protected

Definition at line 353 of file CalStats.h.

Referenced by stats().

casacore::Cube<casacore::Double>* casa::CalStats::poValue
protected

Internal copies of input parameter cubes.

Definition at line 346 of file CalStats.h.

casacore::Cube<casacore::Double>* casa::CalStats::poValueErr
protected

Definition at line 347 of file CalStats.h.

casacore::ArrayIterator<casacore::Double>* casa::CalStats::poValueErrIter
protected

Definition at line 352 of file CalStats.h.

Referenced by stats().

casacore::ArrayIterator<casacore::Double>* casa::CalStats::poValueIter
protected

casacore::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: