ImagePrimaryBeamCorrector.h

Go to the documentation of this file.
00001 //# tSubImage.cc: Test program for class SubImage
00002 //# Copyright (C) 1998,1999,2000,2001,2003
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This program is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU General Public License as published by the Free
00007 //# Software Foundation; either version 2 of the License, or (at your option)
00008 //# any later version.
00009 //#
00010 //# This program 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 General Public License for
00013 //# more details.
00014 //#
00015 //# You should have received a copy of the GNU General Public License along
00016 //# with this program; if not, write to the Free Software Foundation, Inc.,
00017 //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed 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 //# $Id: tSubImage.cc 20567 2009-04-09 23:12:39Z gervandiepen $
00027 
00028 #ifndef IMAGEANALYSIS_IMAGEPRIMARYBEAMCORRECTOR_H
00029 #define IMAGEANALYSIS_IMAGEPRIMARYBEAMCORRECTOR_H
00030 
00031 #include <imageanalysis/ImageAnalysis/ImageTask.h>
00032 #include <memory>
00033 
00034 #include <casa/namespace.h>
00035 
00036 namespace casa {
00037 
00038 class ImagePrimaryBeamCorrector : public ImageTask<Float> {
00039         // <summary>
00040         // Top level interface for primary beam correction.
00041         // </summary>
00042 
00043         // <reviewed reviewer="" date="" tests="" demos="">
00044         // </reviewed>
00045 
00046         // <prerequisite>
00047         // </prerequisite>
00048 
00049         // <etymology>
00050         // Collapses image.
00051         // </etymology>
00052 
00053         // <synopsis>
00054         // High level interface for primary beam correction.
00055         // </synopsis>
00056 
00057         // <example>
00058         // <srcblock>
00059         // ImagePrimaryBeamCorrector corrector(...);
00060         // corrector.correct();
00061         // </srcblock>
00062         // </example>
00063 
00064 public:
00065 
00066         enum Mode {
00067                 MULTIPLY,
00068                 DIVIDE
00069         };
00070 
00071         ImagePrimaryBeamCorrector() = delete;
00072 
00073         // if <src>outname</src> is empty, no image will be written
00074         // if <src>overwrite</src> is True, if image already exists it will be removed
00075         // if <src>overwrite</src> is False, if image already exists exception will be thrown
00076         // Only one of <src>regionPtr</src> or <src>region<src> should be specified.
00077         // <group>
00078 
00079         ImagePrimaryBeamCorrector(
00080                 const SPCIIF image,
00081                 const SPCIIF pbImage,
00082                 const Record * const &regionPtr,
00083                 const String& region, const String& box,
00084                 const String& chanInp, const String& stokes,
00085                 const String& maskInp,
00086                 const String& outname, const Bool overwrite,
00087                 const Float cutoff, const Bool useCutoff, const Mode mode
00088         );
00089 
00090         ImagePrimaryBeamCorrector(
00091                 const SPCIIF image,
00092                 const Array<Float>& pbArray,
00093                 const Record * const &regionPtr,
00094                 const String& region, const String& box,
00095                 const String& chanInp, const String& stokes,
00096                 const String& maskInp,
00097                 const String& outname, const Bool overwrite,
00098                 const Float cutoff, const Bool useCutoff, const Mode mode
00099         );
00100 
00101         // </group>
00102 
00103         // destructor
00104         ~ImagePrimaryBeamCorrector();
00105 
00106         // perform the correction. If <src>wantReturn</src> is True, return a pointer to the
00107         // collapsed image.
00108         SPIIF correct(const Bool wantReturn) const;
00109 
00110         String getClass() const;
00111 
00112 protected:
00113 
00114         vector<Coordinate::Type> _getNecessaryCoordinates() const;
00115 
00116         CasacRegionManager::StokesControl _getStokesControl() const;
00117 
00118 private:
00119         SPIIF _pbImage;
00120 
00121         Float _cutoff;
00122         Mode _mode;
00123         Bool _useCutoff;
00124         const static String _class;
00125 
00126         void _checkPBSanity();
00127 };
00128 
00129 }
00130 
00131 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1