Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/MeasComet_8h_source.html
Дата изменения: Unknown Дата индексирования: Mon Feb 14 20:18:14 2011 Кодировка: Поисковые слова: mdi |
00001 //# MeasComet.h: To define position for comets and other solar system bodies 00002 //# Copyright (C) 1999,2000,2002,2007 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: MeasComet.h 20299 2008-04-03 05:56:44Z gervandiepen $ 00028 00029 #ifndef MEASURES_MEASCOMET_H 00030 #define MEASURES_MEASCOMET_H 00031 00032 //# Includes 00033 #include <casa/aips.h> 00034 #include <tables/Tables/Table.h> 00035 #include <tables/Tables/TableRow.h> 00036 #include <casa/Containers/RecordField.h> 00037 #include <casa/BasicSL/String.h> 00038 #include <casa/Quanta/MVPosition.h> 00039 #include <measures/Measures/MDirection.h> 00040 00041 namespace casa { //# NAMESPACE CASA - BEGIN 00042 00043 //# Forward Declarations 00044 class MVRadialVelocity; 00045 class MVDirection; 00046 template <class T> class Vector; 00047 00048 // <summary>Position for comets and other solar system bodies</summary> 00049 00050 // <use visibility=local> 00051 00052 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="tMeasComet" demos=""> 00053 // </reviewed> 00054 00055 // <prerequisite> 00056 // <li> <linkto class=MeasTable>MeasTable</linkto> 00057 // </prerequisite> 00058 // 00059 // <etymology> 00060 // From Measure and Comet 00061 // </etymology> 00062 // 00063 // <synopsis> 00064 // MeasComet is the interface class between generated Comet position 00065 // tables and the Direction conversion machinery. 00066 // Tables are found using the aipsrc 00067 // (using <src>measures.<table>.directory</src>) 00068 // mechanism. If not provided they are assumed to reside in standard places 00069 // Tables are assumed to have the 00070 // VS_VERSION, VS_DATE, VS_CREATE and VS_TYPE keywords, and be of type IERS, 00071 // else an exception will be thrown.<br> 00072 // The <src>get()</src> method will obtain data from the cometary 00073 // tables. The data obtained will be in the specified frame. 00074 // Note that the normal usage of these tables is through the Measures system. 00075 // 00076 // <note> 00077 // A message is logged (once) if a date outside the range in 00078 // the Tables is asked for. 00079 // </note> 00080 // <thrown> 00081 // <li> AipsError if table opened has wrong format or otherwise corrupted. 00082 // </thrown> 00083 // </synopsis> 00084 // 00085 // <example> 00086 // <srcblock> 00087 // tbd 00088 // </srcblock> 00089 // </example> 00090 // 00091 // <motivation> 00092 // To use the JPL data for positions of solar system bodies 00093 // </motivation> 00094 // 00095 // <todo asof="2000/01/20"> 00096 // </todo> 00097 00098 class MeasComet { 00099 00100 public: 00101 //# Constants 00102 00103 //# Enumerations 00104 // Types of known data 00105 enum Types { 00106 // MJD (must be first in list) 00107 MJD, 00108 // Columns with data 00109 RA, 00110 DEC, 00111 RHO, 00112 RADVEL, 00113 DISKLONG, 00114 DISKLAT, 00115 // Number of columns 00116 N_Columns, 00117 N_Types }; 00118 00119 //# Constructors 00120 // Construct using the aipsrc value (measures.comet.file) 00121 MeasComet(); 00122 // Construct a table from the named path. 00123 explicit MeasComet(const String &path); 00124 // Construct a table from the name and the input table 00125 MeasComet(const Table &tabin, const String &path); 00126 // Copy constructor 00127 MeasComet(const MeasComet &other); 00128 // Copy assign 00129 MeasComet &operator=(const MeasComet &other); 00130 00131 //# Destructor 00132 ~MeasComet(); 00133 00134 //# General Member Functions 00135 // Is it a valid comet class (i.e. can it be used) 00136 Bool ok() const {return measured_p;} ; 00137 // Get the name of the comet 00138 const String &getName() const; 00139 // Get the topo position 00140 const MVPosition &getTopo() const; 00141 // Get the direction type 00142 MDirection::Types getType() const; 00143 // Get the start of the table (in MJD) 00144 Double getStart() const; 00145 // Get the end of the table (in MJD) 00146 Double getEnd() const; 00147 // Get number of entries 00148 Int nelements() const; 00149 // Get a comet position 00150 Bool get(MVPosition &returnValue, Double date) const; 00151 // Get the local on-disk direction 00152 Bool getDisk(MVDirection &returnValue, Double date) const; 00153 // Get the velocity from a comet table, interpolated for date(in MJD(TDB)). 00154 Bool getRadVel(MVRadialVelocity &returnValue, Double date) const; 00155 // Create a clone 00156 MeasComet *clone() const; 00157 00158 // Close the Comet tabls only 00159 void closeMeas(); 00160 00161 private: 00162 00163 //# General member functions 00164 // Initialise table from the name given 00165 Bool initMeas(const String &which, const Table *tabin=0); 00166 // Fill Table lines 00167 Bool fillMeas(Double utf) const; 00168 00169 //# Data members 00170 // Actual table 00171 Table tab_p; 00172 // Measured data readable 00173 Bool measFlag_p; 00174 // Measured data present 00175 Bool measured_p; 00176 // Row descriptions 00177 ROTableRow row_p; 00178 // Field pointers 00179 RORecordFieldPtr<Double> rfp_p[MeasComet::N_Columns]; 00180 // First (-1) MJD in list 00181 Double mjd0_p; 00182 // Last MJD in list 00183 Double mjdl_p; 00184 // Increment in rows 00185 Double dmjd_p; 00186 // Number of rows 00187 Int nrow_p; 00188 // Name of comet 00189 String name_p; 00190 // Position on Earth 00191 MVPosition topo_p; 00192 // Type of ccordinates 00193 MDirection::Types mtype_p; 00194 // Lines in memory 00195 mutable Int lnr_p[2]; 00196 // Last read data (measlow - meashigh) 00197 mutable Double ldat_p[2][N_Columns]; 00198 // Message given 00199 Bool msgDone_p; 00200 // File names 00201 String tp_p; 00202 00203 }; 00204 00205 //# Inline Implementations 00206 00207 00208 } //# NAMESPACE CASA - END 00209 00210 #endif