casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VisSetUtil.h
Go to the documentation of this file.
1 //# VisSetUtil.h: Definitions for casacore::Stokes Image utilities
2 //# Copyright (C) 1996,1997,1998
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 adressed 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 MSVIS_VISSETUTIL_H
30 #define MSVIS_VISSETUTIL_H
31 
32 #include <casa/aips.h>
33 #include <casa/BasicSL/Complex.h>
34 #include <casa/Quanta/Quantum.h>
37 
38 namespace casa { //# NAMESPACE CASA - BEGIN
39 
40  class VisSet;
41 
42 // <summary>
43 // Utilities for operating on VisSets.
44 // </summary>
45 
46 // <reviewed reviewer="" date="" tests="" demos="">
47 
48 // <prerequisite>
49 // </prerequisite>
50 //
51 // <etymology>
52 // </etymology>
53 //
54 // <synopsis>
55 // </synopsis>
56 //
57 // <example>
58 // <srcblock>
59 // </srcblock>
60 // </example>
61 //
62 // <motivation>
63 // </motivation>
64 //
65 // <todo asof="">
66 // </todo>
67 
68 
69 class VisSetUtil {
70 
71 public:
72  // Calculate sensitivity
74  casacore::Quantity& pointsourcesens, casacore::Double& relativesens,
75  casacore::Double& sumwt,
76  casacore::Double& effectiveBandwidth,
77  casacore::Double& effectiveIntegration,
78  casacore::Int& nBaselines,
82  casacore::Vector<casacore::Vector<casacore::Double> >& sumInverseVarianceChan);
83  static void Sensitivity(ROVisibilityIterator &vi,
86  casacore::Quantity& pointsourcesens,
87  casacore::Double& relativesens,
88  casacore::Double& sumwt,
89  casacore::Double& effectiveBandwidth,
90  casacore::Double& effectiveIntegration,
91  casacore::Int& nBaselines,
95  casacore::Vector<casacore::Vector<casacore::Double> >& sumInverseVarianceChan);
96  // Hanning smoothing of spectral channels
97  static void HanningSmooth(VisSet &vs, const casacore::String& dataCol="corrected",
98  const casacore::Bool& doFlagAndWeight=true);
99  static void HanningSmooth(VisibilityIterator &vi, const casacore::String& dataCol="corrected",
100  const casacore::Bool& doFlagAndWeight=true);
101  // Subtract/add model from/to corrected visibility data
102  static void UVSub(VisSet &vs, casacore::Bool reverse=false);
103  static void UVSub(VisibilityIterator &vs, casacore::Bool reverse=false);
104 
105 
106  // Add and (optionally) initialize scratch columns
107  static void addScrCols(casacore::MeasurementSet& ms, casacore::Bool addModel, casacore::Bool addCorr,
108  casacore::Bool init, casacore::Bool compress);
109 
110  // Initialize scr cols
111  static void initScrCols(casacore::MeasurementSet& ms, casacore::Bool initModel, casacore::Bool initCorr);
112  static void initScrCols(VisibilityIterator& ms, casacore::Bool initModel, casacore::Bool initCorr);
113 
114  // Remove OTF model keywords
115  static void remOTFModel(casacore::MeasurementSet& ms);
116 
117  // Remove physical scrcols
118  static void remScrCols(casacore::MeasurementSet& ms, casacore::Bool remModel, casacore::Bool remCorr);
119 
120  // Remove an existing cal set (a CORRECTED_DATA and MODEL_DATA
121  // column set and, optionally, any associated compression columns)
122  //if removeModel=true...any model for OTF model vis saved in the header is removed
123  static void removeCalSet(casacore::MeasurementSet& ms, casacore::Bool removeModel=false);
124 
125 };
126 
127 } //# NAMESPACE CASA - END
128 
129 #endif
130 
131 
A 1-D Specialization of the Array class.
int Int
Definition: aipstype.h:50
static void HanningSmooth(VisSet &vs, const casacore::String &dataCol="corrected", const casacore::Bool &doFlagAndWeight=true)
Hanning smoothing of spectral channels.
static void remScrCols(casacore::MeasurementSet &ms, casacore::Bool remModel, casacore::Bool remCorr)
Remove physical scrcols.
static void initScrCols(casacore::MeasurementSet &ms, casacore::Bool initModel, casacore::Bool initCorr)
Initialize scr cols.
static void Sensitivity(VisSet &vs, casacore::Matrix< casacore::Double > &mssFreqSel, casacore::Matrix< casacore::Int > &mssChanSel, casacore::Quantity &pointsourcesens, casacore::Double &relativesens, casacore::Double &sumwt, casacore::Double &effectiveBandwidth, casacore::Double &effectiveIntegration, casacore::Int &nBaselines, casacore::Vector< casacore::Vector< casacore::Int > > &nData, casacore::Vector< casacore::Vector< casacore::Double > > &sumwtChan, casacore::Vector< casacore::Vector< casacore::Double > > &sumwtsqChan, casacore::Vector< casacore::Vector< casacore::Double > > &sumInverseVarianceChan)
Calculate sensitivity.
double Double
Definition: aipstype.h:55
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
static void UVSub(VisSet &vs, casacore::Bool reverse=false)
Subtract/add model from/to corrected visibility data.
Utilities for operating on VisSets.
Definition: VisSetUtil.h:69
A Table intended to hold astronomical data (a set of Measurements).
static void removeCalSet(casacore::MeasurementSet &ms, casacore::Bool removeModel=false)
Remove an existing cal set (a CORRECTED_DATA and MODEL_DATA column set and, optionally, any associated compression columns) if removeModel=true...any model for OTF model vis saved in the header is removed
String: the storage and methods of handling collections of characters.
Definition: String.h:223
static void remOTFModel(casacore::MeasurementSet &ms)
Remove OTF model keywords.
static void addScrCols(casacore::MeasurementSet &ms, casacore::Bool addModel, casacore::Bool addCorr, casacore::Bool init, casacore::Bool compress)
Add and (optionally) initialize scratch columns.
VisibilityIterator iterates through one or more writable MeasurementSets.
ROVisibilityIterator iterates through one or more readonly MeasurementSets.