[1757] | 1 | //#---------------------------------------------------------------------------
|
---|
| 2 | //# SrcType.h: Class to define source type.
|
---|
| 3 | //#---------------------------------------------------------------------------
|
---|
| 4 | //# Copyright (C) 2000-2008
|
---|
| 5 | //# Associated Universities, Inc. Washington DC, USA.
|
---|
| 6 | //#
|
---|
| 7 | //# This library is free software; you can redistribute it and/or modify it
|
---|
| 8 | //# under the terms of the GNU Library General Public License as published by
|
---|
| 9 | //# the Free Software Foundation; either version 2 of the License, or (at your
|
---|
| 10 | //# option) any later version.
|
---|
| 11 | //#
|
---|
| 12 | //# This library is distributed in the hope that it will be useful, but WITHOUT
|
---|
| 13 | //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
---|
| 14 | //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
|
---|
| 15 | //# License for more details.
|
---|
| 16 | //#
|
---|
| 17 | //# You should have received a copy of the GNU Library General Public License
|
---|
| 18 | //# along with this library; if not, write to the Free Software Foundation,
|
---|
| 19 | //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
|
---|
| 20 | //#
|
---|
| 21 | //# Correspondence concerning AIPS++ should be addressed as follows:
|
---|
| 22 | //# Internet email: aips2-request@nrao.edu.
|
---|
| 23 | //# Postal address: AIPS++ Project Office
|
---|
| 24 | //# National Radio Astronomy Observatory
|
---|
| 25 | //# 520 Edgemont Road
|
---|
| 26 | //# Charlottesville, VA 22903-2475 USA
|
---|
| 27 | //#
|
---|
| 28 | //# $Id$
|
---|
| 29 | //#---------------------------------------------------------------------------
|
---|
| 30 | //# Original: 2010/02/08, Takeshi Nakazato, NAOJ
|
---|
| 31 | //#---------------------------------------------------------------------------
|
---|
| 32 |
|
---|
| 33 | #ifndef ATNF_SRCTYPE_H
|
---|
| 34 | #define ATNF_SRCTYPE_H
|
---|
| 35 |
|
---|
[2005] | 36 | //# Includes
|
---|
| 37 | #include <casa/aips.h>
|
---|
| 38 | #include <casa/BasicSL/String.h>
|
---|
| 39 |
|
---|
| 40 | using namespace std ;
|
---|
| 41 | #include <casa/namespace.h>
|
---|
| 42 |
|
---|
[1757] | 43 | // <sumamry>
|
---|
| 44 | // enum to define source type (scan intent)
|
---|
| 45 | //</summary>
|
---|
| 46 | class SrcType {
|
---|
| 47 | public:
|
---|
| 48 | enum type { PSON = 0,
|
---|
| 49 | PSOFF = 1,
|
---|
| 50 | NOD = 2,
|
---|
| 51 | FSON = 3,
|
---|
| 52 | FSOFF = 4,
|
---|
| 53 | SKY = 6,
|
---|
| 54 | HOT = 7,
|
---|
| 55 | WARM = 8,
|
---|
| 56 | COLD = 9,
|
---|
| 57 | PONCAL = 10,
|
---|
| 58 | POFFCAL = 11,
|
---|
| 59 | NODCAL = 12,
|
---|
| 60 | FONCAL = 13,
|
---|
| 61 | FOFFCAL = 14,
|
---|
| 62 | FSLO = 20,
|
---|
| 63 | FLOOFF = 21,
|
---|
| 64 | FLOSKY = 26,
|
---|
| 65 | FLOHOT = 27,
|
---|
| 66 | FLOWARM = 28,
|
---|
| 67 | FLOCOLD = 29,
|
---|
| 68 | FSHI = 30,
|
---|
| 69 | FHIOFF = 31,
|
---|
| 70 | FHISKY = 36,
|
---|
| 71 | FHIHOT = 37,
|
---|
| 72 | FHIWARM = 38,
|
---|
| 73 | FHICOLD = 39,
|
---|
[1973] | 74 | SIG = 90,
|
---|
| 75 | REF = 91,
|
---|
[1985] | 76 | CAL = 92,
|
---|
[1757] | 77 | NOTYPE = 99 } ;
|
---|
[2005] | 78 |
|
---|
| 79 | static String getName(const Int srctype)
|
---|
| 80 | {
|
---|
| 81 | String obsType ;
|
---|
| 82 | switch( srctype ) {
|
---|
| 83 | case Int(SrcType::PSON):
|
---|
| 84 | obsType = "PSON" ;
|
---|
| 85 | break ;
|
---|
| 86 | case Int(SrcType::PSOFF):
|
---|
| 87 | obsType = "PSOFF" ;
|
---|
| 88 | break ;
|
---|
| 89 | case Int(SrcType::NOD):
|
---|
| 90 | obsType = "NOD" ;
|
---|
| 91 | break ;
|
---|
| 92 | case Int(SrcType::FSON):
|
---|
| 93 | obsType = "FSON" ;
|
---|
| 94 | break ;
|
---|
| 95 | case Int(SrcType::FSOFF):
|
---|
| 96 | obsType = "FSOFF" ;
|
---|
| 97 | break ;
|
---|
| 98 | case Int(SrcType::SKY):
|
---|
| 99 | obsType = "SKY" ;
|
---|
| 100 | break ;
|
---|
| 101 | case Int(SrcType::HOT):
|
---|
| 102 | obsType = "HOT" ;
|
---|
| 103 | break ;
|
---|
| 104 | case Int(SrcType::WARM):
|
---|
| 105 | obsType = "WARM" ;
|
---|
| 106 | break ;
|
---|
| 107 | case Int(SrcType::COLD):
|
---|
| 108 | obsType = "COLD" ;
|
---|
| 109 | break ;
|
---|
| 110 | case Int(SrcType::PONCAL):
|
---|
| 111 | obsType = "PSON:CALON" ;
|
---|
| 112 | break ;
|
---|
| 113 | case Int(SrcType::POFFCAL):
|
---|
| 114 | obsType = "PSOFF:CALON" ;
|
---|
| 115 | break ;
|
---|
| 116 | case Int(SrcType::NODCAL):
|
---|
| 117 | obsType = "NOD:CALON" ;
|
---|
| 118 | break ;
|
---|
| 119 | case Int(SrcType::FONCAL):
|
---|
| 120 | obsType = "FSON:CALON" ;
|
---|
| 121 | break ;
|
---|
| 122 | case Int(SrcType::FOFFCAL):
|
---|
| 123 | obsType = "FSOFF:CALOFF" ;
|
---|
| 124 | break ;
|
---|
| 125 | case Int(SrcType::FSLO):
|
---|
| 126 | obsType = "FSLO" ;
|
---|
| 127 | break ;
|
---|
| 128 | case Int(SrcType::FLOOFF):
|
---|
| 129 | obsType = "FS:LOWER:OFF" ;
|
---|
| 130 | break ;
|
---|
| 131 | case Int(SrcType::FLOSKY):
|
---|
| 132 | obsType = "FS:LOWER:SKY" ;
|
---|
| 133 | break ;
|
---|
| 134 | case Int(SrcType::FLOHOT):
|
---|
| 135 | obsType = "FS:LOWER:HOT" ;
|
---|
| 136 | break ;
|
---|
| 137 | case Int(SrcType::FLOWARM):
|
---|
| 138 | obsType = "FS:LOWER:WARM" ;
|
---|
| 139 | break ;
|
---|
| 140 | case Int(SrcType::FLOCOLD):
|
---|
| 141 | obsType = "FS:LOWER:COLD" ;
|
---|
| 142 | break ;
|
---|
| 143 | case Int(SrcType::FSHI):
|
---|
| 144 | obsType = "FSHI" ;
|
---|
| 145 | break ;
|
---|
| 146 | case Int(SrcType::FHIOFF):
|
---|
| 147 | obsType = "FS:HIGHER:OFF" ;
|
---|
| 148 | break ;
|
---|
| 149 | case Int(SrcType::FHISKY):
|
---|
| 150 | obsType = "FS:HIGHER:SKY" ;
|
---|
| 151 | break ;
|
---|
| 152 | case Int(SrcType::FHIHOT):
|
---|
| 153 | obsType = "FS:HIGHER:HOT" ;
|
---|
| 154 | break ;
|
---|
| 155 | case Int(SrcType::FHIWARM):
|
---|
| 156 | obsType = "FS:HIGHER:WARM" ;
|
---|
| 157 | break ;
|
---|
| 158 | case Int(SrcType::FHICOLD):
|
---|
| 159 | obsType = "FS:HIGHER:COLD" ;
|
---|
| 160 | break ;
|
---|
| 161 | default:
|
---|
| 162 | obsType = "NOTYPE" ;
|
---|
| 163 | }
|
---|
| 164 |
|
---|
| 165 | return obsType ;
|
---|
| 166 | } ;
|
---|
| 167 |
|
---|
[1757] | 168 | } ;
|
---|
| 169 |
|
---|
| 170 | #endif
|
---|