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// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/casa/Arrays/ArrayFwd.h>
32#include <casacore/casa/BasicSL/Complex.h>
33namespace casacore { // # NAMESPACE CASACORE - BEGIN
34
35template <class T>
36class Lattice;
37template <class T>
38class MaskedLattice;
39class LatticeExprNode;
40class String;
41class IPosition;
42
43// <summary> </summary>
44// <use visibility=export>
45//
46// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
47// </reviewed>
48//
49// <prerequisite>
50// </prerequisite>
51//
52// <etymology>
53// </etymology>
54//
55// <synopsis>
56// </synopsis>
57//
58// <motivation>
59// </motivation>
60//
61// <todo asof="1998/01/10">
62// </todo>
63
65 public:
67 static Bool hasSomePoints(DComplex npts);
68 //
69 static void setUseItTrue(Float& useIt);
70 static void setUseItTrue(Complex& useIt);
71 //
72 static Float usePixelInc(Float dMin, Float dMax, Float datum);
73 static Complex usePixelInc(Complex dMin, Complex dMax, Complex datum);
74 //
75 static Float usePixelExc(Float dMin, Float dMax, Float datum);
76 static Complex usePixelExc(Complex dMin, Complex dMax, Complex datum);
77 //
79 static DComplex getMean(DComplex sum, DComplex n);
80 //
82 static DComplex getVariance(DComplex sum, DComplex sumsq, DComplex n);
83 //
85 static DComplex getSigma(DComplex sum, DComplex sumsq, DComplex n);
86 //
87 static Double getSigma(Double var);
88 static DComplex getSigma(DComplex var);
89 //
90 static Double getRms(Double sumsq, Double n);
91 static DComplex getRms(DComplex sumsq, DComplex n);
92 //
93 static Float min(Float v1, Float v2);
94 static Complex min(Complex v1, Complex v2);
95 //
96 static Float max(Float v1, Float v2);
97 static Complex max(Complex v1, Complex v2);
98 //
100 static Complex getNodeScalarValue(const LatticeExprNode& node, Complex);
101
102 template <class T>
103 static Bool setIncludeExclude(String& errorMessage, Vector<T>& range, Bool& noInclude,
104 Bool& noExclude, const Vector<T>& include,
105 const Vector<T>& exclude);
106 static Bool setIncludeExclude(String& errorMessage, Vector<Complex>& range, Bool& noInclude,
107 Bool& noExclude, const Vector<Complex>& include,
108 const Vector<Complex>& exclude);
109 //
110 static Bool minMax(Float& dataMin, Float& dataMax, const MaskedLattice<Float>* pLattice,
111 const Vector<Float>& range, Bool noInclude, Bool noExclude);
112 static Bool minMax(Complex& dataMin, Complex& dataMax, const MaskedLattice<Complex>* pLattice,
113 const Vector<Complex>& range, Bool noInclude, Bool noExclude);
114};
115
116} // namespace casacore
117
118#ifndef CASACORE_NO_AUTO_TEMPLATES
119#include <casacore/lattices/LatticeMath/LattStatsSpecialize2.tcc>
120#endif // # CASACORE_NO_AUTO_TEMPLATES
121
122#endif
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:355
For temporary backward namespace compatibility, use casa as alias for casacore.
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