26#ifndef IMAGES_IMAGESTATISTICS_H
27#define IMAGES_IMAGESTATISTICS_H
30#include <casacore/casa/aips.h>
31#include <casacore/casa/BasicSL/String.h>
32#include <casacore/casa/Utilities/DataType.h>
33#include <casacore/casa/Logging/LogIO.h>
34#include <casacore/lattices/LatticeMath/LatticeStatistics.h>
35#include <casacore/scimath/Mathematics/NumericTraits.h>
36#include <casacore/casa/iosstrfwd.h>
190 virtual void listMinMax(std::ostringstream& osMin, std::ostringstream& osMax,
Int oWidth,
243#ifndef CASACORE_NO_AUTO_TEMPLATES
244#include <casacore/images/Images/ImageStatistics.tcc>
ImageStatistics(const ImageInterface< T > &image, LogIO &os, Bool showProgress=True, Bool forceDisk=False, Bool clone=True)
Constructor takes the image and a LogIO object for logging.
vector< String > _messages
void recordMessages(const Bool rm)
virtual Bool _getBeamArea(Array< Double > &beamArea, String &msg) const
Get beam area in pixels if possible.
ImageStatistics(const ImageStatistics< T > &other)
Copy constructor.
virtual ~ImageStatistics()
Destructor.
Quantum< AccumType > _flux(Bool &isFluxDensity, AccumType sum, Double beamAreaInPixels) const
If isFluxDensity is False, then the computed value is a flux (ie flux density integrated over a spect...
virtual void displayStats(AccumType nPts, AccumType sum, AccumType median, AccumType medAbsDevMed, AccumType quartile, AccumType sumSq, AccumType mean, AccumType var, AccumType rms, AccumType sigma, AccumType dMin, AccumType dMax, AccumType q1, AccumType q3)
const ImageInterface< T > * pInImage_p
void setBlc(const IPosition &blc)
virtual Bool listStats(Bool hasBeam, const IPosition &dPos, const Matrix< AccumType > &ord)
List the statistics.
ImageStatistics(const ImageInterface< T > &image, Bool showProgress=True, Bool forceDisk=False, Bool clone=True)
Constructor takes the image only.
Bool setNewImage(const ImageInterface< T > &image, Bool clone=True)
Set a new ImageInterface object.
virtual Bool _canDoFlux() const
Virtual Functions.
void setPrecision(Int precision)
Bool _computeFlux(Quantum< AccumType > &flux, AccumType sum, const IPosition &pos, Bool posInLattice)
void setListStats(Bool b)
Bool _computeFlux(Array< AccumType > &flux, const Array< AccumType > &npts, const Array< AccumType > &sum)
NumericTraits< T >::PrecisionType AccumType
vector< String > getMessages()
virtual void listMinMax(std::ostringstream &osMin, std::ostringstream &osMax, Int oWidth, DataType type)
List min and max with world coordinates.
std::shared_ptr< const ImageInterface< T > > _inImPtrMgr
ImageStatistics< T > & operator=(const ImageStatistics< T > &other)
Assignment operator.
virtual void getLabels(String &higherOrder, String &xAxis, const IPosition &dPos) const
Virtual functions.
void showRobust(const Bool show)
list robust statistics?
Bool goodParameterStatus_p
Vector< Int > displayAxes_p
Bool doRobust_p
doRobust means that when the storage lattice is generated, the robust statistics are generated as wel...
Vector< Int > cursorAxes_p
void setStream(std::ostream &os, Int oPrec)
Non-virtual functions.
IPosition locInLattice(const IPosition &storagePosition, Bool relativeToParent=True) const
Given a location in the storage lattice, convert those locations on the non-statistics axis (the last...
LatticeStatistics(const MaskedLattice< T > &lattice, LogIO &os, Bool showProgress=True, Bool forceDisk=False, Bool clone=True)
Constructor takes the lattice and a LogIO object for logging.
@ NPTS
The number of points.
@ MEDIAN
The median - the robust stats does not fit well into storage lattice approach.
@ SIGMA
The standard deviation about the mean.
@ FLUX
The flux density (can't always compute this - needs the beam).
Char PrecisionType
Higher precision type (Float->Double).
String: the storage and methods of handling collections of characters.
For temporary backward namespace compatibility, use casa as alias for casacore.
LatticeExprNode mean(const LatticeExprNode &expr)
LatticeExprNode sum(const LatticeExprNode &expr)
bool Bool
Define the standard types used by Casacore.
LatticeExprNode median(const LatticeExprNode &expr)
RecordInterface * clone() const override
Make a copy of this object.
TableExprNode rms(const TableExprNode &array)