casa
5.7.0-16
|
#include <CalStats.h>
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 definitionMore... | |
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... | |
CalStats & | operator= (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 > | |
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 |
typedef enum casa::CalStats::AXIS casa::CalStats::AXIS |
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.
enum casa::CalStats::AXIS |
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.
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 |
Destructor.
|
protected |
Unused constructor.
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 |
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 |
|
protected |
Simultaneously increment and reset all input parameter cube iterators.
Referenced by stats().
|
protected |
Referenced by stats().
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).
Member function stats() is the main user interface and statsWrap() is the supporting wrapper.
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.
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 |
|
protected |
Definition at line 335 of file CalStats.h.
Referenced by stats().
|
protected |
Internal copies of the iteration and non-iteration axis values.
Definition at line 338 of file CalStats.h.
Referenced by stats().
|
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().
|
protected |
Definition at line 339 of file CalStats.h.
Referenced by stats().
|
protected |
Definition at line 340 of file CalStats.h.
Referenced by stats().
|
protected |
Shape of the output statistics cubes.
Definition at line 343 of file CalStats.h.
Referenced by stats().
|
protected |
Definition at line 348 of file CalStats.h.
|
protected |
Definition at line 353 of file CalStats.h.
Referenced by stats().
|
protected |
Internal copies of input parameter cubes.
Definition at line 346 of file CalStats.h.
|
protected |
Definition at line 347 of file CalStats.h.
|
protected |
Definition at line 352 of file CalStats.h.
Referenced by stats().
|
protected |
casacore::Input parameter cube iterators
Definition at line 351 of file CalStats.h.
Referenced by stats().