casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FluxCalcQS.h
Go to the documentation of this file.
1 //# FluxCalcQS.h: Base class for flux standard calculations which do not
2 //# explicitly depend on time.
3 //# Copyright (C) 2010
4 //# Associated Universities, Inc. Washington DC, USA.
5 //#
6 //# This library is free software; you can redistribute it and/or modify it
7 //# under the terms of the GNU Library General Public License as published by
8 //# the Free Software Foundation; either version 2 of the License, or (at your
9 //# option) any later version.
10 //#
11 //# This library is distributed in the hope that it will be useful, but WITHOUT
12 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 //# License for more details.
15 //#
16 //# You should have received a copy of the GNU Library General Public License
17 //# along with this library; if not, write to the Free Software Foundation,
18 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
19 //#
20 //# Correspondence concerning AIPS++ should be adressed as follows:
21 //# Internet email: aips2-request@nrao.edu.
22 //# Postal address: AIPS++ Project Office
23 //# National Radio Astronomy Observatory
24 //# 520 Edgemont Road
25 //# Charlottesville, VA 22903-2475 USA
26 //#
27 //#
28 #ifndef COMPONENTS_FLUXCALCQS_H
29 #define COMPONENTS_FLUXCALCQS_H
30 
32 #include <casa/BasicSL/String.h>
34 
35 //# Handy for passing anonymous arrays to functions.
37 
38 #include <map>
39 
40 
41 namespace casacore{
42 
43 class MFrequency;
44 //class Vector;
45 }
46 
47 namespace casa { //# NAMESPACE CASA - BEGIN
48 
49 //class Flux;
50 
51 // <summary>
52 // FluxCalcQS: Base class for flux standard calculations which do not
53 // explicitly depend on time.
54 // </summary>
55 
56 // <use visibility=export>
57 
58 // <reviewed reviewer="" date="" tests="" demos="">
59 
60 // <prerequisite>
61 // <li><linkto class="FluxStandard">FluxStandard</linkto> module
62 // </prerequisite>
63 //
64 // <etymology>
65 // From "flux density", "calculator", and "quasistatic".
66 // </etymology>
67 //
68 // <synopsis>
69 // The FluxCalcQS class provides an interface and a small amount of machinery
70 // for computing total flux densities of nominally non-variable sources.
71 // "Nominally non-variable" means that the sources do not vary quickly, but
72 // they are remeasured, and new standards published, every few years. See
73 // FluxStdsQS for actual definitions of the standards.
74 // </synopsis>
75 //
76 // <example>
77 // <srcblock>
78 // </srcblock>
79 // </example>
80 //
81 // <motivation>
82 // Provide a base time-independent interface for calculating standard flux
83 // densities, and include any common functions.
84 // </motivation>
85 
87 {
88 public:
89  typedef FluxCalcQS FCQS;
92 
93  // Source identifiers.
94  enum Source {
95  THREEC286 = 0, // 3C286
99  NINETEEN34M638, // 1934-638
103  // The number of standards in this enumerator.
106  };
107 
108  virtual ~FluxCalcQS();
109 
111  const casacore::MFrequency& mfreq) = 0;
115 
116  // If a FS::Source enum matches srcName, returns the enum.
117  // Otherwise, FCQS::UNKNOWN_SOURCE.
118  FCQS::Source srcNameToEnum(const casacore::String& srcName) const;
119 
120  // Sets srcEnum_p = srcNameToEnum(sourceName), and returns
121  // srcEnum_p != FCQS::UNKNOWN_SOURCE
122  virtual casacore::Bool setSource(const casacore::String& sourceName);
123 
125 
127 
128 protected:
129  FluxCalcQS(); // Initializes names_p.
130 
131 private:
132  FCQS::Source srcEnum_p; // The source identifier.
133 
134  // A map from an FS::Source enum to a list of recognized names for it.
135  std::map<FCQS::Source, casacore::Vector<casacore::String> > names_p;
136 
137  // A map from an FS::Source enum to its J2000 direction.
138  std::map<FCQS::Source, casacore::MDirection> directions_p;
139 };
140 
141 } //# NAMESPACE CASA - END
142 
143 #endif /* COMPONENTS_FLUXCALCQS_H */
A Measure: astronomical direction.
Definition: MDirection.h:174
A 1-D Specialization of the Array class.
Source
Source identifiers.
Definition: FluxCalcQS.h:94
The number of standards in this enumerator.
Definition: FluxCalcQS.h:104
std::map< FCQS::Source, casacore::MDirection > directions_p
A map from an FS::Source enum to its J2000 direction.
Definition: FluxCalcQS.h:138
FCQS::Source srcNameToEnum(const casacore::String &srcName) const
If a FS::Source enum matches srcName, returns the enum.
A Measure: wave characteristics.
Definition: MFrequency.h:161
Fast Vector classes with fixed (templated) length.
virtual casacore::Bool operator()(Flux< casacore::Double > &value, Flux< casacore::Double > &error, const casacore::MFrequency &mfreq)=0
FluxCalcQS FCQS
Definition: FluxCalcQS.h:89
FCQS::Source srcEnum_p
Definition: FluxCalcQS.h:132
virtual ~FluxCalcQS()
casacore::RigidVector< casacore::String, 4 > RVS4
Definition: FluxCalcQS.h:90
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual casacore::Bool setSource(const casacore::String &sourceName)
Sets srcEnum_p = srcNameToEnum(sourceName), and returns srcEnum_p != FCQS::UNKNOWN_SOURCE.
casacore::RigidVector< casacore::String, 5 > RVS5
Definition: FluxCalcQS.h:91
std::map< FCQS::Source, casacore::Vector< casacore::String > > names_p
A map from an FS::Source enum to a list of recognized names for it.
Definition: FluxCalcQS.h:135
FCQS::Source getSrcEnum()
String: the storage and methods of handling collections of characters.
Definition: String.h:223
class Flux;
Definition: FluxCalcQS.h:86
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
casacore::MDirection getDirection()
Definition: FluxCalcQS.h:126
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42