casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FluxStdSrcs.h
Go to the documentation of this file.
1 //# FluxStdSrcs.h: flux standard source enum
2 //# Copyright (C) 2013
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be adressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 #ifndef COMPONENTS_FLUXSTDSRCS_H
28 #define COMPONENTS_FLUXSTDSRCS_H
29 
30 #include <casa/BasicSL/String.h>
31 #include <casa/Arrays/Vector.h>
34 #include <map>
35 namespace casa { //# NAMESPACE CASA - BEGIN
36 
37 // <summary>
38 // Basic calibrator data used in the flux standards.
39 // </summary>
40 
41 // <use visibility=export>
42 
43 // <reviewed reviewer="" date="" tests="" demos="">
44 
45 // <prerequisite>
46 // <li><linkto class="FluxStandard">FluxStandard</linkto> module
47 // </prerequisite>
48 //
49 // <etymology>
50 // Flux standard sources
51 // </etymology>
52 //
53 // <synopsis>
54 // FluxStdSrcs encapsulates an enum of the source names and lists of the directions and
55 // alternate names for the flux standards. The utility methods to translate between the enum
56 // and casacore::String name are also defined.
57 // </synopsis>
58 //
59 // <example>
60 // <srcblock>
61 // </srcblock>
62 // </example>
63 //
64 // <motivation>
65 // Encapsulate data on flux standards
66 // </motivation>
67 
69 {
70 public:
71 
72  typedef FluxStdSrcs FSS;
74 
75  // Source identifiers.
76  enum Source {
77  THREEC286 = 0, // 3C286
81  NINETEEN34M638, // 1934-638
86  // new sources from Perley-Butler 2017
99  // The number of standards in this enumerator.
102  };
103 
104  // Returns an enum of srcName
105  FSS::Source srcNameToEnum(const casacore::String& srcName, const casacore::MDirection& dir) const;
106 
107  // Returns srcName string of the srcEnum
108  casacore::String EnumToSrcName(const FSS::Source srcEnum) const;
109 
110  // Get source direction of srcEnum
111  casacore::MDirection getDirection(const FSS::Source srcEnum) const;
112 
113  ~FluxStdSrcs();
114 
115 protected:
116  FluxStdSrcs();
117 
118 private:
119  // A map form an FSS::Source enum to known names
120  std::map<FSS::Source, casacore::Vector<casacore::String> > names_p;
121  // A map from an FSS::Source enum to its J2000 direction.
122  std::map<FSS::Source, casacore::MDirection> directions_p;
123 };
124 
125 } //# NAMESPACE CASA - END
126 
127 #endif /* COMPONENTS_FLUXSTDSRCS_H */
A Measure: astronomical direction.
Definition: MDirection.h:174
FluxStdSrcs FSS
Definition: FluxStdSrcs.h:72
casacore::String EnumToSrcName(const FSS::Source srcEnum) const
Returns srcName string of the srcEnum.
std::map< FSS::Source, casacore::Vector< casacore::String > > names_p
A map form an FSS::Source enum to known names.
Definition: FluxStdSrcs.h:120
casacore::MDirection getDirection(const FSS::Source srcEnum) const
Get source direction of srcEnum.
Fast Vector classes with fixed (templated) length.
Source
Source identifiers.
Definition: FluxStdSrcs.h:76
FSS::Source srcNameToEnum(const casacore::String &srcName, const casacore::MDirection &dir) const
Returns an enum of srcName.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Basic calibrator data used in the flux standards.
Definition: FluxStdSrcs.h:68
casacore::RigidVector< casacore::String, 6 > RVS6
Definition: FluxStdSrcs.h:73
std::map< FSS::Source, casacore::MDirection > directions_p
A map from an FSS::Source enum to its J2000 direction.
Definition: FluxStdSrcs.h:122
The number of standards in this enumerator.
Definition: FluxStdSrcs.h:100
new sources from Perley-Butler 2017
Definition: FluxStdSrcs.h:87