casacore
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: aips2-request@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//# $Id$
27
28#ifndef LATTICES_LATTSTATSSPECIALIZE_H
29#define LATTICES_LATTSTATSSPECIALIZE_H
30
31
32//# Includes
33#include <casacore/casa/aips.h>
34#include <casacore/casa/Arrays/ArrayFwd.h>
35#include <casacore/casa/BasicSL/Complex.h>
36namespace casacore { //# NAMESPACE CASACORE - BEGIN
37
38template <class T> class Lattice;
39template <class T> class MaskedLattice;
40class LatticeExprNode;
41class String;
42class IPosition;
43
44
45
46// <summary> </summary>
47// <use visibility=export>
48//
49// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
50// </reviewed>
51//
52// <prerequisite>
53// </prerequisite>
54//
55// <etymology>
56// </etymology>
57//
58// <synopsis>
59// </synopsis>
60//
61// <motivation>
62// </motivation>
63//
64// <todo asof="1998/01/10">
65// </todo>
66
67
69{
70public:
71 static Bool hasSomePoints (Double npts);
73//
74 static void setUseItTrue (Float& useIt);
75 static void setUseItTrue (Complex& useIt);
76//
77 static Float usePixelInc (Float dMin, Float dMax, Float datum);
78 static Complex usePixelInc (Complex dMin, Complex dMax, Complex datum);
79//
80 static Float usePixelExc (Float dMin, Float dMax, Float datum);
81 static Complex usePixelExc (Complex dMin, Complex dMax, Complex datum);
82//
85//
88//
89 static Double getSigma (Double sum, Double sumsq, Double n);
91//
92 static Double getSigma (Double var);
94//
95 static Double getRms (Double sumsq, Double n);
96 static DComplex getRms (DComplex sumsq, DComplex n);
97//
98 static Float min(Float v1, Float v2);
99 static Complex min(Complex v1, Complex v2);
100//
101 static Float max(Float v1, Float v2);
102 static Complex max(Complex v1, Complex v2);
103//
106
107 template <class T> static Bool setIncludeExclude (String& errorMessage,
108 Vector<T>& range,
109 Bool& noInclude, Bool& noExclude,
110 const Vector<T>& include,
111 const Vector<T>& exclude);
112 static Bool setIncludeExclude (String& errorMessage,
113 Vector<Complex>& range,
114 Bool& noInclude, Bool& noExclude,
115 const Vector<Complex>& include,
116 const Vector<Complex>& exclude);
117//
118 static Bool minMax (Float& dataMin, Float& dataMax, const MaskedLattice<Float>* pLattice,
119 const Vector<Float>& range, Bool noInclude, Bool noExclude);
120 static Bool minMax (Complex& dataMin, Complex& dataMax, const MaskedLattice<Complex>* pLattice,
121 const Vector<Complex>& range, Bool noInclude, Bool noExclude);
122};
123
124
125} //# NAMESPACE CASACORE - END
126
127#ifndef CASACORE_NO_AUTO_TEMPLATES
128#include <casacore/lattices/LatticeMath/LattStatsSpecialize2.tcc>
129#endif //# CASACORE_NO_AUTO_TEMPLATES
130
131#endif
132
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:225
this file contains all the compiler specific defines
Definition: mainpage.dox:28
LatticeExprNode sum(const LatticeExprNode &expr)
float Float
Definition: aipstype.h:54
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
double Double
Definition: aipstype.h:55