casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StatWtColConfig.h
Go to the documentation of this file.
1 //# StatWt.h: Class which implements statistical reweighting
2 //#
3 //# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/)
4 //# Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All rights reserved.
5 //# Copyright (C) European Southern Observatory, 2011, All rights reserved.
6 //#
7 //# This library is free software; you can redistribute it and/or
8 //# modify it under the terms of the GNU Lesser General Public
9 //# License as published by the Free software Foundation; either
10 //# version 2.1 of the License, or (at your option) any later version.
11 //#
12 //# This library is distributed in the hope that it will be useful,
13 //# but WITHOUT ANY WARRANTY, without even the implied warranty of
14 //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 //# Lesser General Public License for more details.
16 //#
17 //# You should have received a copy of the GNU Lesser General Public
18 //# License along with this library; if not, write to the Free Software
19 //# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 //# MA 02111-1307 USA
21 //# $Id: $
22 
23 #ifndef STATWTCOLCONFIG_H_
24 #define STATWTCOLCONFIG_H_
25 
28 
29 namespace casacore {
30  class LogIO;
31 }
32 
33 namespace casac {
34  class variant;
35 }
36 
37 namespace casa {
38 
39 // This class is necessary to ensure partial initialization of SIGMA_SPECTRUM
40 // and WEIGHT_SPECTRUM in the MS is not done. It should be constructed using
41 // the entire MS (not an MS that has had a selection applied to it). This
42 // class will do the complete initialization of SIGMA_SPECTRUM and
43 // WEIGHT_SPECTRUM if necessary.
44 
46 
47 public:
48 
49  StatWtColConfig() = delete;
50 
51  // It is the caller's responsibility to ensure that the input
52  // ms represents the entire MS, and is not an MS that has had
53  // a selection applied to it.
56  const casacore::String& dataColumn, const casac::variant& chanbin
57  );
58 
60 
61  void getColWriteFlags(
62  casacore::Bool& mustWriteWt, casacore::Bool& mustWriteWtSp,
63  casacore::Bool& mustWriteSig, casacore::Bool& mustWriteSigSp
64  ) const;
65 
67 
68 private:
80 
81  // determine if the MS has a WEIGHT/SIGMA_SPECTRUM column, if it must
82  // be written, and/or if it must be initialized.
84  casacore::Bool& hasSpec, casacore::Bool& mustWriteSpec,
85  casacore::Bool& mustInitSpec, casacore::Bool mustWriteNonSpec,
86  const casacore::String& colName, const casacore::String& descName,
87  casacore::Bool specIsInitialized, const casacore::String& mgrName
88  );
89 
90  void _determineFlags();
91 
93  casacore::Bool& hasSpectrum, casacore::Bool& spectrumIsInitialzied,
95  ) const;
96 
98 
99 };
100 
101 }
102 
103 #endif
104 
void _hasSpectrumIsSpectrumInitialized(casacore::Bool &hasSpectrum, casacore::Bool &spectrumIsInitialzied, casacore::MS::PredefinedColumns col) const
casacore::Bool _mustInitSigSp
casacore::Bool _mustWriteWtSp
This class is necessary to ensure partial initialization of SIGMA_SPECTRUM and WEIGHT_SPECTRUM in the...
PredefinedColumns
The Main table colums with predefined meaning.
Definition: MSMainEnums.h:65
casacore::String _dataColumn
casacore::Bool _mustInitWtSp
casacore::Bool _possiblyWriteSigma
void getColWriteFlags(casacore::Bool &mustWriteWt, casacore::Bool &mustWriteWtSp, casacore::Bool &mustWriteSig, casacore::Bool &mustWriteSigSp) const
casacore::Bool _preview
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
A Table intended to hold astronomical data (a set of Measurements).
void _dealWithSpectrumColumn(casacore::Bool &hasSpec, casacore::Bool &mustWriteSpec, casacore::Bool &mustInitSpec, casacore::Bool mustWriteNonSpec, const casacore::String &colName, const casacore::String &descName, casacore::Bool specIsInitialized, const casacore::String &mgrName)
determine if the MS has a WEIGHT/SIGMA_SPECTRUM column, if it must be written, and/or if it must be i...
casacore::Bool _mustWriteSigSp
casacore::MeasurementSet * _ms
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::Bool _doChanBin
casacore::Bool _mustWriteWt
casacore::Bool _mustWriteSig
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42