Source
xxxxxxxxxx
N sets of statistical information, one for each index in the array
//
// Get statistics on table/ms columns
//
namespace casac {
template <class T>
class Statistics {
public :
/*
Converts data to casacore::Float, computes statistics
v: data
flags: flagged data is not used, shape must be
compatible with v's shape
column: column name
supported: set to true if column type is supported
return: output dictionary
*/
static casacore::Record
get_stats(const casacore::Vector<T> v,
const casacore::Vector<casacore::Bool> flags,
const std::string &column,
bool &supported);
/*
As above, but all values are considered unflagged
*/
static casacore::Record
get_stats(const casacore::Vector<T> v,
const std::string &column,
bool &supported);
/*
As get_stats().
The conversion from complex to casacore::Float depends on the parameter
complex_value. Eg complex_value="imag" picks out the imaginary part.
*/
static casacore::Record
get_stats_complex(const casacore::Vector<casacore::Complex> v,
const casacore::Vector<casacore::Bool> flags,
const std::string &column,
bool &supported,
const std::string complex_value);
/*
As above, but all values are considered unflagged
*/
static casacore::Record
get_stats_complex(const casacore::Vector<casacore::Complex> v,
const std::string &column,