casacore
Loading...
Searching...
No Matches
LattStatsSpecialize.h
Go to the documentation of this file.
1//# LattStatsSpecialize.h: specialized functions for LatticeStatistics
2//# Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
3//# Associated Universities, Inc. Washington DC, USA.
4//#
5//# This library is free software; you can redistribute it and/or modify it
6//# under the terms of the GNU Library General Public License as published by
7//# the Free Software Foundation; either version 2 of the License, or (at your
8//# option) any later version.
9//#
10//# This library is distributed in the hope that it will be useful, but WITHOUT
11//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13//# License for more details.
14//#
15//# You should have received a copy of the GNU Library General Public License
16//# along with this library; if not, write to the Free Software Foundation,
17//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18//#
19//# Correspondence concerning AIPS++ should be addressed as follows:
20//# Internet email: casa-feedback@nrao.edu.
21//# Postal address: AIPS++ Project Office
22//# National Radio Astronomy Observatory
23//# 520 Edgemont Road
24//# Charlottesville, VA 22903-2475 USA
25
26#ifndef LATTICES_LATTSTATSSPECIALIZE_H
27#define LATTICES_LATTSTATSSPECIALIZE_H
28
29
30//# Includes
31#include <casacore/casa/aips.h>
32#include <casacore/casa/Arrays/ArrayFwd.h>
33#include <casacore/casa/BasicSL/Complex.h>
34namespace casacore { //# NAMESPACE CASACORE - BEGIN
35
36template <class T> class Lattice;
37template <class T> class MaskedLattice;
38class LatticeExprNode;
39class String;
40class IPosition;
41
42
43
44// <summary> </summary>
45// <use visibility=export>
46//
47// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
48// </reviewed>
49//
50// <prerequisite>
51// </prerequisite>
52//
53// <etymology>
54// </etymology>
55//
56// <synopsis>
57// </synopsis>
58//
59// <motivation>
60// </motivation>
61//
62// <todo asof="1998/01/10">
63// </todo>
64
65
67{
68public:
69 static Bool hasSomePoints (Double npts);
70 static Bool hasSomePoints (DComplex npts);
71//
72 static void setUseItTrue (Float& useIt);
73 static void setUseItTrue (Complex& useIt);
74//
75 static Float usePixelInc (Float dMin, Float dMax, Float datum);
76 static Complex usePixelInc (Complex dMin, Complex dMax, Complex datum);
77//
78 static Float usePixelExc (Float dMin, Float dMax, Float datum);
79 static Complex usePixelExc (Complex dMin, Complex dMax, Complex datum);
80//
82 static DComplex getMean (DComplex sum, DComplex n);
83//
85 static DComplex getVariance (DComplex sum, DComplex sumsq, DComplex n);
86//
87 static Double getSigma (Double sum, Double sumsq, Double n);
88 static DComplex getSigma (DComplex sum, DComplex sumsq, DComplex n);
89//
90 static Double getSigma (Double var);
91 static DComplex getSigma (DComplex var);
92//
93 static Double getRms (Double sumsq, Double n);
94 static DComplex getRms (DComplex sumsq, DComplex n);
95//
96 static Float min(Float v1, Float v2);
97 static Complex min(Complex v1, Complex v2);
98//
99 static Float max(Float v1, Float v2);
100 static Complex max(Complex v1, Complex v2);
101//
103 static Complex getNodeScalarValue(const LatticeExprNode& node, Complex);
104
105 template <class T> static Bool setIncludeExclude (String& errorMessage,
106 Vector<T>& range,
107 Bool& noInclude, Bool& noExclude,
108 const Vector<T>& include,
109 const Vector<T>& exclude);
110 static Bool setIncludeExclude (String& errorMessage,
111 Vector<Complex>& range,
112 Bool& noInclude, Bool& noExclude,
113 const Vector<Complex>& include,
114 const Vector<Complex>& exclude);
115//
116 static Bool minMax (Float& dataMin, Float& dataMax, const MaskedLattice<Float>* pLattice,
117 const Vector<Float>& range, Bool noInclude, Bool noExclude);
118 static Bool minMax (Complex& dataMin, Complex& dataMax, const MaskedLattice<Complex>* pLattice,
119 const Vector<Complex>& range, Bool noInclude, Bool noExclude);
120};
121
122
123} //# NAMESPACE CASACORE - END
124
125#ifndef CASACORE_NO_AUTO_TEMPLATES
126#include <casacore/lattices/LatticeMath/LattStatsSpecialize2.tcc>
127#endif //# CASACORE_NO_AUTO_TEMPLATES
128
129#endif
130
static Float usePixelInc(Float dMin, Float dMax, Float datum)
static DComplex getMean(DComplex sum, DComplex n)
static DComplex getVariance(DComplex sum, DComplex sumsq, DComplex n)
static Complex getNodeScalarValue(const LatticeExprNode &node, Complex)
static void setUseItTrue(Complex &useIt)
static Bool hasSomePoints(DComplex npts)
static Double getVariance(Double sum, Double sumsq, Double n)
static Float usePixelExc(Float dMin, Float dMax, Float datum)
static Complex usePixelExc(Complex dMin, Complex dMax, Complex datum)
static Bool hasSomePoints(Double npts)
static Double getRms(Double sumsq, Double n)
static DComplex getSigma(DComplex sum, DComplex sumsq, DComplex n)
static Double getMean(Double sum, Double n)
static void setUseItTrue(Float &useIt)
static Double getSigma(Double sum, Double sumsq, Double n)
static Complex max(Complex v1, Complex v2)
static Bool minMax(Float &dataMin, Float &dataMax, const MaskedLattice< Float > *pLattice, const Vector< Float > &range, Bool noInclude, Bool noExclude)
static DComplex getSigma(DComplex var)
static Float max(Float v1, Float v2)
static Float getNodeScalarValue(const LatticeExprNode &node, Float)
static DComplex getRms(DComplex sumsq, DComplex n)
static Double getSigma(Double var)
static Complex usePixelInc(Complex dMin, Complex dMax, Complex datum)
static Bool minMax(Complex &dataMin, Complex &dataMax, const MaskedLattice< Complex > *pLattice, const Vector< Complex > &range, Bool noInclude, Bool noExclude)
static Bool setIncludeExclude(String &errorMessage, Vector< Complex > &range, Bool &noInclude, Bool &noExclude, const Vector< Complex > &include, const Vector< Complex > &exclude)
static Float min(Float v1, Float v2)
static Complex min(Complex v1, Complex v2)
static Bool setIncludeExclude(String &errorMessage, Vector< T > &range, Bool &noInclude, Bool &noExclude, const Vector< T > &include, const Vector< T > &exclude)
String: the storage and methods of handling collections of characters.
Definition String.h:223
this file contains all the compiler specific defines
Definition mainpage.dox:28
LatticeExprNode sum(const LatticeExprNode &expr)
float Float
Definition aipstype.h:52
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
double Double
Definition aipstype.h:53