Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/MCDoppler_8h_source.html
Дата изменения: Unknown
Дата индексирования: Mon Feb 14 20:16:34 2011
Кодировка:
casacore: measures/Measures/MCDoppler.h Source File

MCDoppler.h

Go to the documentation of this file.
00001 //# MCDoppler.h: MDoppler conversion routines 
00002 //# Copyright (C) 1995,1996,1997,1998,1999,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: MCDoppler.h 18093 2004-11-30 17:51:10Z ddebonis $
00028 
00029 #ifndef MEASURES_MCDOPPLER_H
00030 #define MEASURES_MCDOPPLER_H
00031 
00032 //# Includes
00033 #include <casa/aips.h>
00034 #include <measures/Measures/MeasBase.h>
00035 #include <measures/Measures/MeasRef.h>
00036 #include <measures/Measures/MCBase.h>
00037 #include <measures/Measures/MConvertBase.h>
00038 #include <measures/Measures/MDoppler.h>
00039 
00040 namespace casa { //# NAMESPACE CASA - BEGIN
00041 
00042 //# Forward Declarations
00043 class MCDoppler;
00044 class String;
00045 
00046 //# Typedefs
00047 
00048 // <summary> MDoppler conversion routines  </summary>
00049 
00050 // <use visibility=local>
00051 
00052 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tMeasure" demos="">
00053 // </reviewed>
00054 
00055 // <prerequisite>
00056 //   <li> <linkto class=Measure>Measure</linkto> class 
00057 //   <li> <linkto class=MCBase>MCBase</linkto> base class
00058 //   <li> <linkto class=MConvertBase>overall conversion</linkto>  class
00059 // </prerequisite>
00060 //
00061 // <etymology>
00062 // Measure, Convert and Doppler
00063 // </etymology>
00064 //
00065 // <synopsis>
00066 // Contains state machinery and caching for actual conversions
00067 // </synopsis>
00068 //
00069 // <example>
00070 // Conversion of a radio Doppler to an optical
00071 // <srcblock>
00072 //      #include <measures/Measures.h>
00073 //      #include <measures/Measures/MDoppler.h>
00074 //      MDoppler radio(0.01);           // A radio Doppler value
00075 //      cout << "Doppler radio = " << radio << "; optical = " <<
00076 //              MDoppler::Convert(radio, MDoppler::OPTICAL)() << // Convert 
00077 //              endl;
00078 // </srcblock>
00079 // Setting up a conversion
00080 // <srcblock>
00081 //      MDoppler::Convert to_opt(MDoppler::RADIO, MDoppler::OPTICAL);
00082 //      for (Double d=0; d<0.1; d += 0.005) {
00083 //              cout << "radio = " << d << " to optical = " <<
00084 //                      to_opt(d) << endl;
00085 // </srcblock>
00086 // </example>
00087 //
00088 // <motivation>
00089 // </motivation>
00090 //
00091 // <todo asof="1996/05/04">
00092 // </todo>
00093 
00094 class MCDoppler : public MCBase {
00095 
00096 public:
00097 
00098   //# Friends
00099   // Conversion of data
00100   friend class MeasConvert<MDoppler>;
00101   
00102   //# Constructors
00103   // Default constructor
00104   MCDoppler();
00105   
00106   //# Destructor
00107   ~MCDoppler();
00108 
00109   //# Member functions
00110   // Show the state of the conversion engine (mainly for debugging purposes)
00111   static String showState();
00112 
00113 private:
00114 
00115   //# Enumerations
00116   // The list of actual routines provided.
00117   // <note role=warning> Each <src>AA_BB</src> in the list points to routine
00118   // that can be used in the FromTo list in the getConvert routine.
00119   // In addition the type to which each is converted should be in the
00120   // ToRef array, again in the proper order. </note>
00121   enum Routes {
00122     RADIO_RATIO, 
00123     Z_RATIO,
00124     BETA_RATIO,
00125     GAMMA_RATIO,
00126     RATIO_RADIO, 
00127     RATIO_Z,
00128     RATIO_BETA,
00129     RATIO_GAMMA,
00130     N_Routes };
00131   
00132   //# Typedefs
00133   
00134   //# Operators
00135   
00136   //# General Member Functions
00137   
00138   //# Enumerations
00139   
00140   //# Cached Data
00141 
00142   //# State machine data
00143   // Has state matrix been made
00144   static Bool stateMade_p;
00145   // Transition list
00146   static uInt ToRef_p[N_Routes][3];
00147   // Transition matrix
00148   static uInt FromTo_p[MDoppler::N_Types][MDoppler::N_Types];
00149   
00150   //# Member functions
00151   
00152   // Create conversion function pointer
00153   virtual void getConvert(MConvertBase &mc,
00154                           const MRBase &inref,
00155                           const MRBase &outref);
00156   
00157   // Create help structures for Measure conversion routines
00158   virtual void initConvert(uInt which, MConvertBase &mc);
00159   
00160   // Delete the pointers used in the MeasConvert help structure cache
00161   virtual void clearConvert();
00162   
00163   // Routine to convert Doppler from one reference frame to another
00164   virtual void doConvert(MeasValue &in,
00165                          MRBase &inref,
00166                          MRBase &outref,
00167                          const MConvertBase &mc);
00168   // Conversion routine to cater for inheritance question
00169   void doConvert(MVDoppler &in,
00170                  MRBase &inref,
00171                  MRBase &outref,
00172                  const MConvertBase &mc);
00173   
00174 };
00175 
00176 
00177 } //# NAMESPACE CASA - END
00178 
00179 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines