00001 //# FluxStdSrcs.h: flux standard source enum 00002 //# Copyright (C) 2013 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be adressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# 00027 #ifndef COMPONENTS_FLUXSTDSRCS_H 00028 #define COMPONENTS_FLUXSTDSRCS_H 00029 00030 #include <casa/BasicSL/String.h> 00031 #include <casa/Arrays/Vector.h> 00032 #include <measures/Measures/MDirection.h> 00033 #include <scimath/Mathematics/RigidVector.h> 00034 #include <map> 00035 namespace casa { //# NAMESPACE CASA - BEGIN 00036 00037 // <summary> 00038 // Basic calibrator data used in the flux standards. 00039 // </summary> 00040 00041 // <use visibility=export> 00042 00043 // <reviewed reviewer="" date="" tests="" demos=""> 00044 00045 // <prerequisite> 00046 // <li><linkto class="FluxStandard">FluxStandard</linkto> module 00047 // </prerequisite> 00048 // 00049 // <etymology> 00050 // Flux standard sources 00051 // </etymology> 00052 // 00053 // <synopsis> 00054 // FluxStdSrcs encapsulates an enum of the source names and lists of the directions and 00055 // alternate names for the flux standards. The utility methods to translate between the enum 00056 // and String name are also defined. 00057 // </synopsis> 00058 // 00059 // <example> 00060 // <srcblock> 00061 // </srcblock> 00062 // </example> 00063 // 00064 // <motivation> 00065 // Encapsulate data on flux standards 00066 // </motivation> 00067 00068 class FluxStdSrcs 00069 { 00070 public: 00071 00072 typedef FluxStdSrcs FSS; 00073 typedef RigidVector<String, 6> RVS6; 00074 00075 // Source identifiers. 00076 enum Source { 00077 THREEC286 = 0, // 3C286 00078 THREEC48, 00079 THREEC147, 00080 THREEC138, 00081 NINETEEN34M638, // 1934-638 00082 THREEC295, 00083 THREEC196, 00084 THREEC123, 00085 THREEC380, 00086 // The number of standards in this enumerator. 00087 NUMBER_SOURCES, 00088 UNKNOWN_SOURCE = NUMBER_SOURCES 00089 }; 00090 00091 // Returns an enum of srcName 00092 FSS::Source srcNameToEnum(const String& srcName, const MDirection& dir) const; 00093 00094 // Returns srcName string of the srcEnum 00095 String EnumToSrcName(const FSS::Source srcEnum) const; 00096 00097 // Get source direction of srcEnum 00098 MDirection getDirection(const FSS::Source srcEnum) const; 00099 00100 ~FluxStdSrcs(); 00101 00102 protected: 00103 FluxStdSrcs(); 00104 00105 private: 00106 // A map form an FSS::Source enum to known names 00107 std::map<FSS::Source, Vector<String> > names_p; 00108 // A map from an FSS::Source enum to its J2000 direction. 00109 std::map<FSS::Source, MDirection> directions_p; 00110 }; 00111 00112 } //# NAMESPACE CASA - END 00113 00114 #endif /* COMPONENTS_FLUXSTDSRCS_H */