casa
$Rev:20696$
|
00001 //# GBTGOFile.h: GBTGOFile serves up the information from a GBT GO FITS file 00002 //# Copyright (C) 2001,2002 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 addressed 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 //# $Id$ 00028 00029 #ifndef NRAO_GBTGOFILE_H 00030 #define NRAO_GBTGOFILE_H 00031 00032 //#! Includes go here 00033 00034 #include <nrao/FITS/GBTFITSBase.h> 00035 00036 #include <measures/Measures/MDirection.h> 00037 #include <measures/Measures/MeasFrame.h> 00038 #include <measures/Measures/MRadialVelocity.h> 00039 #include <casa/Quanta/MVFrequency.h> 00040 #include <casa/BasicSL/String.h> 00041 00042 //# Forward Declarations 00043 00044 // <summary> 00045 // GBTGOFile serves up the information from a GBT GO FITS file. 00046 // </summary> 00047 00048 // <use visibility=export> 00049 00050 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos=""> 00051 // </reviewed> 00052 00053 // <prerequisite> 00054 // </prerequisite> 00055 // 00056 // <etymology> 00057 // </etymology> 00058 // 00059 // <synopsis> 00060 // </synopsis> 00061 // 00062 // <example> 00063 // </example> 00064 // 00065 // <motivation> 00066 // </motivation> 00067 // 00068 // 00069 // <thrown> 00070 //#! A list of exceptions thrown if errors are discovered in the function. 00071 //#! This tag will appear in the body of the header file, preceding the 00072 //#! declaration of each function which throws an exception. 00073 // <li> 00074 // <li> 00075 // </thrown> 00076 // 00077 // <todo asof="yyyy/mm/dd"> 00078 // </todo> 00079 00080 class GBTGOFile : public GBTFITSBase 00081 { 00082 public: 00083 // initialize with default values, no primary keywords 00084 GBTGOFile(); 00085 00086 // initialize with the indicated GO file. 00087 GBTGOFile(const String &gofile); 00088 00089 ~GBTGOFile() {;} 00090 00091 // attach this object to a new FITS file. If there are problems with 00092 // the file, the return value is Falso and appropriate warnings are 00093 // sent to the logger. The resulting object is not attached to any file. 00094 Bool attach(const String &gofile); 00095 00096 // the file name used at construction or most recent reopen 00097 const String &file() const {return itsName;} 00098 00099 // is this a valid GO file (only consists of a null array PDA 00100 // with no extensions). 00101 Bool isValid() const {return itsValid;} 00102 00103 // is this attached to a FITS file 00104 Bool isAttached() const {return itsAttached;} 00105 00106 // standard fields - these are NOT marked as handled. handleKeyword 00107 // must be used for that. 00108 // <group> 00109 const String &observer() const {return itsObserver;} 00110 const String &procname() const {return itsProcname;} 00111 const String &proctype() const {return itsProctype;} 00112 Int procseqn() const {return itsProcseqn;} 00113 Int procsize() const {return itsProcsize;} 00114 const String obstype() const {return itsObstype;} 00115 const String &swtchsig() const {return itsSwtchsig;} 00116 const String &swstate() const {return itsSwstate;} 00117 Int laston() const {return itsLaston;} 00118 Int lastoff() const {return itsLastoff;} 00119 // reference direction - this includes the RADESYS, RA, DEC and 00120 // COORDSYS keywords. 00121 const MDirection &refdir() const {return itsCmddir;} 00122 const Double &equinox() const {return itsEquinox;} 00123 // rest frequency - incorporates RESTFRQ and VELDEF values. 00124 const MVFrequency &restfrq() const {return itsRestfrq;} 00125 // Velocity of line being tracked - incorporates VELOCITY and VELDEF values. 00126 const MRadialVelocity &velocity() const {return itsVelocity;} 00127 // </group> 00128 00129 // intended sky frequency 00130 const MVFrequency &skyfreq() const {return itsSkyfrq;} 00131 00132 // the raw keyword values as found in the GO file 00133 // <group> 00134 const String &coordsys() const {return itsCoordsys;} 00135 const String &radesys() const {return itsRadesys;} 00136 const Double &majorCoord() const {return itsMajor;} 00137 const Double &minorCoord() const {return itsMinor;} 00138 const Double &velocityKW() const {return itsVelocityKW;} 00139 const String &veldef() const {return itsVeldef;} 00140 // </group> 00141 00142 // Does this have the doppler keywords, otherwise it will 00143 // have the SKYFREQ keyword 00144 Bool isDoppler() const {return itsDoppler;} 00145 00146 // Does this use the OTHER coordinate system? If so, the refdir 00147 // direction is not useful. 00148 Bool isOtherCoordsys() const {return itsOtherCoordsys;} 00149 private: 00150 Bool itsValid, itsAttached; 00151 00152 Int itsProcseqn, itsProcsize, itsLaston, itsLastoff; 00153 00154 String itsObserver, itsProcname, itsProctype, itsSwtchsig, itsName, 00155 itsObstype, itsSwstate, itsCoordsys, itsRadesys, itsVeldef; 00156 00157 MDirection itsCmddir; 00158 00159 Double itsEquinox, itsMajor, itsMinor, itsVelocityKW; 00160 00161 MRadialVelocity itsVelocity; 00162 MVFrequency itsRestfrq, itsSkyfrq; 00163 00164 Bool itsDoppler, itsOtherCoordsys; 00165 00166 MeasFrame itsFrame; 00167 00168 void init(); 00169 00170 // unavailable 00171 GBTGOFile(const GBTGOFile &other); 00172 GBTGOFile &operator=(const GBTGOFile &other); 00173 }; 00174 00175 #endif 00176 00177