ImageFitterResults.h

Go to the documentation of this file.
00001 //# Copyright (C) 1998,1999,2000,2001,2003
00002 //# Associated Universities, Inc. Washington DC, USA.
00003 //#
00004 //# This program is free software; you can redistribute it and/or modify it
00005 //# under the terms of the GNU General Public License as published by the Free
00006 //# Software Foundation; either version 2 of the License, or (at your option)
00007 //# any later version.
00008 //#
00009 //# This program is distributed in the hope that it will be useful, but WITHOUT
00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
00012 //# more details.
00013 //#
00014 //# You should have received a copy of the GNU General Public License along
00015 //# with this program; if not, write to the Free Software Foundation, Inc.,
00016 //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00017 //#
00018 //# Correspondence concerning AIPS++ should be addressed as follows:
00019 //#        Internet email: aips2-request@nrao.edu.
00020 //#        Postal address: AIPS++ Project Office
00021 //#                        National Radio Astronomy Observatory
00022 //#                        520 Edgemont Road
00023 //#                        Charlottesville, VA 22903-2475 USA
00024 //#
00025 
00026 #ifndef IMAGEANALYSIS_IMAGEFITTERRESULTS_H
00027 #define IMAGEANALYSIS_IMAGEFITTERRESULTS_H
00028 
00029 #include <casa/Quanta/Quantum.h>
00030 #include <components/ComponentModels/ComponentList.h>
00031 
00032 #include <imageanalysis/ImageTypedefs.h>
00033 
00034 namespace casa {
00035 
00036 template<class T> class Vector;
00037 
00038 class ImageFitterResults {
00039         // <summary>
00040     // Used exclusively by ImageFitter. Unless you are modifying that class,
00041     // you should have no reason to use this class.
00042         // </summary>
00043 
00044         // <reviewed reviewer="" date="" tests="" demos="">
00045         // </reviewed>
00046 
00047         // <prerequisite>
00048         // </prerequisite>
00049 
00050         // <etymology>
00051         // </etymology>
00052 
00053         // <synopsis>
00054         // </synopsis>
00055 
00056         // <example>
00057         // <srcblock>
00058         // </srcblock>
00059         // </example>
00060 
00061 public:
00062 
00063         enum CompListWriteControl {
00064                 NO_WRITE,
00065                 WRITE_NO_REPLACE,
00066                 OVERWRITE
00067         };
00068 
00069         ImageFitterResults() = delete;
00070 
00071         ImageFitterResults(SPCIIF image, SHARED_PTR<LogIO> log);
00072 
00073         ~ImageFitterResults();
00074 
00075         void setChannels(Vector<uInt> chans) { _channels = chans; }
00076 
00077         void setConvolvedList(const ComponentList& list) {
00078                 _convolvedList = list;
00079         }
00080 
00081         void setDeconvolvedList(const ComponentList& list) {
00082             _deconvolvedList = list;
00083         }
00084 
00085         void setPeakIntensities(const Vector<Quantity>& p) {
00086                 _peakIntensities.assign(p);
00087         }
00088 
00089         void setPeakIntensityErrors(const Vector<Quantity>& m) {
00090                 _peakIntensityErrors.assign(m);
00091         }
00092         void setMajorAxes(const Vector<Quantity>& m) {
00093                 _majorAxes = m;
00094         }
00095 
00096         void setMinorAxes(const Vector<Quantity>& m) {
00097                 _minorAxes = m;
00098         }
00099 
00100         void setPositionAngles(const Vector<Quantity>& m) {
00101                 _positionAngles = m;
00102         }
00103 
00104         void setFluxDensities(const Vector<Quantity>& m) {
00105                 _fluxDensities.assign(m);
00106         }
00107 
00108         void setFluxDensityErrors(const Vector<Quantity>& m) {
00109                 _fluxDensityErrors.assign(m);
00110         }
00111 
00112         void writeNewEstimatesFile(const String& filename) const;
00113 
00114         void writeCompList(
00115                 ComponentList& list, const String& compListName,
00116                 CompListWriteControl writeControl
00117         ) const;
00118 
00119         String resultsHeader(
00120                 const String& chans, const Vector<uInt>& chanVec,
00121                 const String& region, const String& mask,
00122                 SHARED_PTR<std::pair<Float, Float> > includePixelRange,
00123                 SHARED_PTR<std::pair<Float, Float> > excludePixelRange,
00124                 const String& estimates
00125         ) const;
00126 
00127         static vector<String> unitPrefixes(Bool includeC);
00128 
00129         void setStokes(const String& s) { _stokes = s; }
00130 
00131         String fluxToString(uInt compNumber, Bool hasBeam) const;
00132 
00133         void setFixed(const Vector<String>& s) { _fixed = s; }
00134 
00135         void writeSummaryFile(const String& filename, const CoordinateSystem& csys) const;
00136 
00137 private:
00138         SPCIIF _image;
00139         SHARED_PTR<LogIO> _log;
00140         ComponentList _convolvedList{}, _deconvolvedList{};
00141         Vector<Quantity> _peakIntensities, _peakIntensityErrors,
00142                 _majorAxes, _minorAxes,
00143                 _positionAngles, _fluxDensities, _fluxDensityErrors;
00144         String _bUnit, _stokes;
00145         Vector<String> _fixed;
00146         Vector<uInt> _channels{};
00147         const static String _class;
00148         static std::vector<String> _prefixes, _prefixesWithCenti;
00149 };
00150 }
00151 
00152 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1