casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImageFitterResults.h
Go to the documentation of this file.
1 //# Copyright (C) 1998,1999,2000,2001,2003
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This program is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU General Public License as published by the Free
6 //# Software Foundation; either version 2 of the License, or (at your option)
7 //# any later version.
8 //#
9 //# This program is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 //# more details.
13 //#
14 //# You should have received a copy of the GNU General Public License along
15 //# with this program; if not, write to the Free Software Foundation, Inc.,
16 //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 
26 #ifndef IMAGEANALYSIS_IMAGEFITTERRESULTS_H
27 #define IMAGEANALYSIS_IMAGEFITTERRESULTS_H
28 
29 #include <casa/Quanta/Quantum.h>
31 
33 
34 namespace casacore{
35 
36 template<class T> class Vector;
37 }
38 
39 namespace casa {
40 
41 template <class T> class ImageFitterResults {
42  // <summary>
43  // Used exclusively by ImageFitter. Unless you are modifying that class,
44  // you should have no reason to use this class.
45  // </summary>
46 
47  // <reviewed reviewer="" date="" tests="" demos="">
48  // </reviewed>
49 
50  // <prerequisite>
51  // </prerequisite>
52 
53  // <etymology>
54  // </etymology>
55 
56  // <synopsis>
57  // </synopsis>
58 
59  // <example>
60  // <srcblock>
61  // </srcblock>
62  // </example>
63 
64 public:
65 
70  };
71 
72  ImageFitterResults() = delete;
73 
74  ImageFitterResults(SPCIIT image, std::shared_ptr<casacore::LogIO> log);
75 
77 
78  void setChannels(std::vector<casacore::uInt> chans) { _channels = chans; }
79 
80  void setConvolvedList(const ComponentList& list) {
81  _convolvedList = list;
82  }
83 
84  void setDeconvolvedList(const ComponentList& list) {
85  _deconvolvedList = list;
86  }
87 
88  void setPeakIntensities(const std::vector<casacore::Quantity>& p) {
89  _peakIntensities = p;
90  }
91 
92  void setPeakIntensityErrors(const std::vector<casacore::Quantity>& m) {
94  }
95  void setMajorAxes(const std::vector<casacore::Quantity>& m) {
96  _majorAxes = m;
97  }
98 
99  void setMinorAxes(const std::vector<casacore::Quantity>& m) {
100  _minorAxes = m;
101  }
102 
103  void setPositionAngles(const std::vector<casacore::Quantity>& m) {
104  _positionAngles = m;
105  }
106 
107  void setFluxDensities(const std::vector<casacore::Quantity>& m) {
108  _fluxDensities = m;
109  }
110 
111  void setFluxDensityErrors(const std::vector<casacore::Quantity>& m) {
112  _fluxDensityErrors = m;
113  }
114 
115  void writeNewEstimatesFile(const casacore::String& filename) const;
116 
117  void writeCompList(
118  ComponentList& list, const casacore::String& compListName,
119  CompListWriteControl writeControl
120  ) const;
121 
123  const casacore::String& chans, const casacore::Vector<casacore::uInt>& chanVec,
124  const casacore::String& region, const casacore::String& mask,
125  std::shared_ptr<std::pair<T, T>> includePixelRange,
126  std::shared_ptr<std::pair<T, T>> excludePixelRange,
127  const casacore::String& estimates
128  ) const;
129 
130  static std::vector<casacore::String> unitPrefixes(casacore::Bool includeC);
131 
132  void setStokes(const casacore::String& s) { _stokes = s; }
133 
134  casacore::String fluxToString(casacore::uInt compNumber, casacore::Bool hasBeam) const;
135 
137 
138  void writeSummaryFile(
139  const casacore::String& filename, const casacore::CoordinateSystem& csys
140  ) const;
141 
142 private:
144  std::shared_ptr<casacore::LogIO> _log;
146  std::vector<casacore::Quantity> _peakIntensities, _peakIntensityErrors,
150  std::vector<casacore::uInt> _channels{};
151  const static casacore::String _class;
152  static std::vector<casacore::String> _prefixes, _prefixesWithCenti;
153 };
154 
155 }
156 
157 #ifndef AIPS_NO_TEMPLATE_SRC
158 #include <imageanalysis/IO/ImageFitterResults.tcc>
159 #endif
160 
161 #endif
std::vector< casacore::Quantity > _majorAxes
void setPositionAngles(const std::vector< casacore::Quantity > &m)
static std::vector< casacore::String > _prefixesWithCenti
std::vector< double > Vector
Definition: ds9context.h:24
LatticeExprNode log(const LatticeExprNode &expr)
std::vector< casacore::Quantity > _peakIntensities
void writeNewEstimatesFile(const casacore::String &filename) const
static std::vector< casacore::String > unitPrefixes(casacore::Bool includeC)
void setDeconvolvedList(const ComponentList &list)
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
std::vector< casacore::Quantity > _positionAngles
std::vector< casacore::Quantity > _peakIntensityErrors
void writeSummaryFile(const casacore::String &filename, const casacore::CoordinateSystem &csys) const
std::vector< casacore::Quantity > _fluxDensityErrors
std::vector< casacore::uInt > _channels
void setFluxDensityErrors(const std::vector< casacore::Quantity > &m)
casacore::Vector< casacore::String > _fixed
std::vector< casacore::Quantity > _minorAxes
void setPeakIntensityErrors(const std::vector< casacore::Quantity > &m)
void setConvolvedList(const ComponentList &list)
casacore::String resultsHeader(const casacore::String &chans, const casacore::Vector< casacore::uInt > &chanVec, const casacore::String &region, const casacore::String &mask, std::shared_ptr< std::pair< T, T >> includePixelRange, std::shared_ptr< std::pair< T, T >> excludePixelRange, const casacore::String &estimates) const
void setStokes(const casacore::String &s)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
static const casacore::String _class
void setMajorAxes(const std::vector< casacore::Quantity > &m)
casacore::String fluxToString(casacore::uInt compNumber, casacore::Bool hasBeam) const
#define SPCIIT
Definition: ImageTypedefs.h:35
void setFluxDensities(const std::vector< casacore::Quantity > &m)
void setChannels(std::vector< casacore::uInt > chans)
void setPeakIntensities(const std::vector< casacore::Quantity > &p)
static std::vector< casacore::String > _prefixes
A class for manipulating groups of components.
void setMinorAxes(const std::vector< casacore::Quantity > &m)
void setFixed(const casacore::Vector< casacore::String > &s)
String: the storage and methods of handling collections of characters.
Definition: String.h:223
void writeCompList(ComponentList &list, const casacore::String &compListName, CompListWriteControl writeControl) const
std::shared_ptr< casacore::LogIO > _log
std::vector< casacore::Quantity > _fluxDensities
Interconvert pixel and world coordinates.
unsigned int uInt
Definition: aipstype.h:51
CompListWriteControl
Used exclusively by ImageFitter. Unless you are modifying that class, you should have no reason to us...
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42