casacore
Loading...
Searching...
No Matches
MSSelUtil.h
Go to the documentation of this file.
1//# MSSelUtil.h: this defines MSSelUtil, a helper class for MSSelector
2//# Copyright (C) 1998,1999,2000,2001
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//#
27//# $Id$
28
29#ifndef MS_MSSELUTIL_H
30#define MS_MSSELUTIL_H
31
32#include <casacore/casa/aips.h>
33#include <casacore/casa/Arrays/Matrix.h>
34#include <casacore/casa/BasicSL/Complex.h>
35
36namespace casacore { //# NAMESPACE CASACORE - BEGIN
37
38// <summary>
39// Helper class for MSFlagger with templated static function
40// </summary>
41// <use visibility=local>
42// <synopsis>
43// Helper class for MSFlagger/DOms with templated static function to difference
44// data in one of two directions.
45// </synopsis>
46
47template <class T> class MSSelUtil
48{
49public:
50 // Compute the absolute difference of the data, subtracting
51 // either the previous value (window==2) or the average over
52 // the window (window>2). If doMedian==True is specified, the
53 // median difference over the window is returned for window>2.
54 // Takes flagging into account.
55 // diffAxis==2,3: row or time, diffAxis==1: channel
56 // Handles 3d and 4d data arrays.
57 static Array<Float> diffData(const Array<T>& data,
58 const Array<Bool>& flag,
59 const Array<Bool>& flagRow,
60 Int diffAxis,
61 Int window,
62 Bool doMedian=False);
63};
64
65} //# NAMESPACE CASACORE - END
66
67#ifndef CASACORE_NO_AUTO_TEMPLATES
68#include <casacore/ms/MSSel/MSSelUtil.tcc>
69#endif //# CASACORE_NO_AUTO_TEMPLATES
70#endif
static Array< Float > diffData(const Array< T > &data, const Array< Bool > &flag, const Array< Bool > &flagRow, Int diffAxis, Int window, Bool doMedian=False)
Compute the absolute difference of the data, subtracting either the previous value (window==2) or the...
this file contains all the compiler specific defines
Definition mainpage.dox:28
const Bool False
Definition aipstype.h:44
int Int
Definition aipstype.h:50
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:42