casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PeakIntensityFluxDensityConverter.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_PEAKINTENSITYFLUXDENSITYCONVERTER_H
27 #define IMAGEANALYSIS_PEAKINTENSITYFLUXDENSITYCONVERTER_H
28 
30 
33 
34 #include <casa/namespace.h>
35 
36 namespace casa {
37 
38 template <class T> class PeakIntensityFluxDensityConverter
39  : public ImageTask<T> {
40  // <summary>
41  // Class for converting between peak intensity and flux density of a source
42  // of specified shape.
43  // </summary>
44 
45  // <reviewed reviewer="" date="" tests="" demos="">
46  // </reviewed>
47 
48  // <prerequisite>
49  // </prerequisite>
50 
51  // <etymology>
52  // Collapses image.
53  // </etymology>
54 
55  // <synopsis>
56  // </synopsis>
57 
58  // <example>
59  // <srcblock>
60  // </srcblock>
61  // </example>
62 
63 public:
65 
66  // Specify image to get beam and coordinate info from
68 
69  // destructor
71 
72  // set the source size using a GaussianShape object. Note that this in itself,
73  // does not constrain the shape to be Gaussian, it is just used to set the size
74  // (and puts the burden on the caller to do sanity checking by first constructing
75  // a GaussianSource object). The position angle is not used.
76  void setSize(const Angular2DGaussian& size) { _size = size; }
77 
78  // set the component shape
79 
81 
83 
84  // Given the channel and polarization, determine which beam in the
85  // image to use for the resolution area.
86  void setBeam(casacore::Int channel, casacore::Int polarization);
87 
89  casacore::Bool& hadToMakeFakeBeam, const casacore::Quantity& fluxDensity
90  ) const;
91 
93  casacore::Bool& hadToMakeFakeBeam, const casacore::Quantity& fluxDensity
94  ) const;
95 
97  static const casacore::String s = "PeakIntensityFluxDensityConverter";
98  return s;
99  }
100 
101 protected:
104  }
105 
106  inline std::vector<casacore::Coordinate::Type> _getNecessaryCoordinates() const {
107  return std::vector<casacore::Coordinate::Type>(1, casacore::Coordinate::DIRECTION);
108  }
109 
110 private:
111 
115 
116 };
117 
118 }
119 
120 #ifndef AIPS_NO_TEMPLATE_SRC
121 #include <imageanalysis/ImageAnalysis/PeakIntensityFluxDensityConverter.tcc>
122 #endif
123 
124 #endif
int Int
Definition: aipstype.h:50
casacore::Quantity peakIntensityToFluxDensity(casacore::Bool &hadToMakeFakeBeam, const casacore::Quantity &fluxDensity) const
Shape
The shapes of all the components.
void setSize(const Angular2DGaussian &size)
set the source size using a GaussianShape object.
size_t size() const
std::vector< casacore::Coordinate::Type > _getNecessaryCoordinates() const
Represents the minimum set of coordinates necessary for the task to function.
Represents a Gaussian restoring beam associated with an image.
Definition: GaussianBeam.h:68
static ComponentType::Shape shape(const casacore::String &shapeName)
Convert a given casacore::String to a Shape enumerator (min match active)
casacore::Quantity fluxDensityToPeakIntensity(casacore::Bool &hadToMakeFakeBeam, const casacore::Quantity &fluxDensity) const
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
#define SPCIIT
Definition: ImageTypedefs.h:35
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
Definition: ExprNode.h:1944
CasacRegionManager::StokesControl _getStokesControl() const
PeakIntensityFluxDensityConverter(const SPCIIT image)
Specify image to get beam and coordinate info from.
void setShape(const casacore::String &shape)
set the component shape
String: the storage and methods of handling collections of characters.
Definition: String.h:223
void setBeam(casacore::Int channel, casacore::Int polarization)
Given the channel and polarization, determine which beam in the image to use for the resolution area...