VisSetUtil.h

Go to the documentation of this file.
00001 //# VisSetUtil.h: Definitions for Stokes Image utilities
00002 //# Copyright (C) 1996,1997,1998
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be adressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //#
00027 //# $Id$
00028 
00029 #ifndef MSVIS_VISSETUTIL_H
00030 #define MSVIS_VISSETUTIL_H
00031 
00032 #include <casa/aips.h>
00033 #include <casa/BasicSL/Complex.h>
00034 #include <casa/Quanta/Quantum.h>
00035 #include <ms/MeasurementSets/MeasurementSet.h>
00036 #include <msvis/MSVis/VisibilityIterator.h>
00037 
00038 namespace casa { //# NAMESPACE CASA - BEGIN
00039 
00040   class VisSet;
00041 
00042 // <summary> 
00043 // Utilities for operating on VisSets.
00044 // </summary>
00045 
00046 // <reviewed reviewer="" date="" tests="" demos="">
00047 
00048 // <prerequisite>
00049 // </prerequisite>
00050 //
00051 // <etymology>
00052 // </etymology>
00053 //
00054 // <synopsis> 
00055 // </synopsis> 
00056 //
00057 // <example>
00058 // <srcblock>
00059 // </srcblock>
00060 // </example>
00061 //
00062 // <motivation>
00063 // </motivation>
00064 //
00065 // <todo asof="">
00066 // </todo>
00067 
00068 
00069 class VisSetUtil {
00070   
00071 public:
00072   // Calculate sensitivity
00073   static void Sensitivity(VisSet &vs, Matrix<Double>& mssFreqSel,Matrix<Int>& mssChanSel,
00074                           Quantity& pointsourcesens, Double& relativesens,
00075                           Double& sumwt,
00076                           Double& effectiveBandwidth,
00077                           Double& effectiveIntegration,
00078                           Int& nBaselines,
00079                           Vector<Vector<Int> >& nData,
00080                           Vector<Vector<Double> >& sumwtChan,
00081                           Vector<Vector<Double> >& sumwtsqChan,
00082                           Vector<Vector<Double> >& sumInverseVarianceChan);
00083   static void Sensitivity(ROVisibilityIterator &vi, 
00084                           Matrix<Double>& mssFreqSel,
00085                           Matrix<Int>& mssChanSel,
00086                           Quantity& pointsourcesens, 
00087                           Double& relativesens,
00088                           Double& sumwt,
00089                           Double& effectiveBandwidth,
00090                           Double& effectiveIntegration,
00091                           Int& nBaselines,
00092                           Vector<Vector<Int> >& nData,
00093                           Vector<Vector<Double> >& sumwtChan,
00094                           Vector<Vector<Double> >& sumwtsqChan,
00095                           Vector<Vector<Double> >& sumInverseVarianceChan);
00096   // Hanning smoothing of spectral channels
00097   static void HanningSmooth(VisSet &vs, const String& dataCol="corrected", 
00098                             const Bool& doFlagAndWeight=True);
00099   static void HanningSmooth(VisibilityIterator &vi, const String& dataCol="corrected",
00100                             const Bool& doFlagAndWeight=True);
00101   // Subtract/add model from/to corrected visibility data
00102   static void UVSub(VisSet &vs, Bool reverse=False);
00103   static void UVSub(VisibilityIterator &vs, Bool reverse=False);
00104 
00105 
00106   // Add and (optionally) initialize scratch columns
00107   static void addScrCols(MeasurementSet& ms, Bool addModel, Bool addCorr, 
00108                          Bool init, Bool compress);
00109 
00110   // Initialize scr cols
00111   static void initScrCols(MeasurementSet& ms, Bool initModel, Bool initCorr);
00112   static void initScrCols(VisibilityIterator& ms, Bool initModel, Bool initCorr);
00113 
00114   // Remove OTF model keywords
00115   static void remOTFModel(MeasurementSet& ms);
00116 
00117   // Remove physical scrcols
00118   static void remScrCols(MeasurementSet& ms, Bool remModel, Bool remCorr);
00119 
00120    // Remove an existing cal set (a CORRECTED_DATA and MODEL_DATA 
00121   // column set and, optionally, any associated compression columns)
00122   //if removeModel=True...any model for OTF model vis saved in the header is removed
00123   static void removeCalSet(MeasurementSet& ms, Bool removeModel=False);
00124 
00125 };
00126 
00127 } //# NAMESPACE CASA - END
00128 
00129 #endif
00130 
00131 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1