00001 //# TableMeasures.h: Create Measure and Quantum columns Tables. 00002 //# Copyright (C) 1996,1997,1998,1999,2000,2001 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 //# $Id$ 00027 00028 #ifndef MEASURES_TABLEMEASURES_H 00029 #define MEASURES_TABLEMEASURES_H 00030 00031 #include <casacore/casa/aips.h> 00032 #include <casacore/measures/TableMeasures/ArrayMeasColumn.h> 00033 #include <casacore/measures/TableMeasures/ArrayQuantColumn.h> 00034 #include <casacore/measures/TableMeasures/ScalarMeasColumn.h> 00035 #include <casacore/measures/TableMeasures/ScalarQuantColumn.h> 00036 #include <casacore/measures/TableMeasures/TableMeasDesc.h> 00037 #include <casacore/measures/TableMeasures/TableMeasOffsetDesc.h> 00038 #include <casacore/measures/TableMeasures/TableMeasRefDesc.h> 00039 #include <casacore/measures/TableMeasures/TableMeasValueDesc.h> 00040 #include <casacore/measures/TableMeasures/TableQuantumDesc.h> 00041 00042 namespace casacore { //# NAMESPACE CASACORE - BEGIN 00043 00044 // <module> 00045 00046 // <summary> 00047 // Create and use scalar and array columns of Quanta and Measures in Tables. 00048 // </summary> 00049 00050 // <prerequisite> 00051 // <li> <linkto module=Measures>Measures</linkto> 00052 // <li> <linkto module=Tables>Tables</linkto> 00053 // </prerequisite> 00054 00055 // <reviewed reviewer="Bob Garwood" date="1999/12/23"> 00056 // </reviewed> 00057 00058 // <etymology> 00059 // Table columns containing Measures and Quanta 00060 // </etymology> 00061 00062 // <synopsis> 00063 00064 // The TableMeasures system exists to provide a way of creating (defining) 00065 // Measure and Quantum Table columns thus enabling the direct storage of 00066 // Quanta and Measures in Casacore Tables. 00067 // <p> 00068 // Defining Quantum and Measure columns is a once only operation (for each 00069 // column). It can be seen as an extension to the existing Column Descriptor 00070 // mechanism which adds a column of a specified type to a table. The 00071 // <linkto><class=TableMeasDesc>TableMeasDesc</linkto> and 00072 // <linkto><class=TableQuantumDesc>TableQuantumDesc</linkto> class 00073 // hierarchies are used to define Measure and Quantum columns. 00074 // <p> 00075 // Once defined, Measure and Quantum column objects are used to access a 00076 // column for reading and writing of Measures and Quanta. For Quantum 00077 // column objects see the class 00078 // <linkto><class=ScalarQuantColumn>ScalarQuantColumn</linkto> and 00079 // <linkto><class=ArrayQuantColumn>ArrayQuantColumn</linkto>. For 00080 // Measure column objects see 00081 // <linkto><class=ScalarMeasColumn>ScalarMeasColumn</linkto> and 00082 // <linkto><class=ArrayMeasColumn>ArrayMeasColumn</linkto>. 00083 // 00084 // <h3>Conversions</h3> 00085 // The classes accessing the data use the underlying 00086 // <linkto module=Quanta>Quanta</linkto> or 00087 // <linkto module=Measures>Measures</linkto> classes to convert 00088 // the units or references of the measures or quanta. 00089 // The TableMeasures classes do not test if a conversion is possible. 00090 // <br>In general one can say that about every unit conversion is possible. 00091 // The <linkto class=Unit>Unit</linkto> class adjusts units as needed. 00092 // <br>Conversions of Measures are only possible if enough information 00093 // is supplied for the measure's reference. 00094 // <br>Take a look at the abovementioned modules to find out about conversions. 00095 // 00096 // <h3>Performance</h3> 00097 // Using the TableMeasures classes makes it easier to deal with 00098 // measures in tables. However, there is a performance penalty 00099 // compared to handling the values directly in the table using 00100 // the Tables classes <linkto class=ScalarColumn>ScalarColumn</linkto> 00101 // and <linkto class=ArrayColumn>ArrayColumn</linkto>. 00102 // 00103 // The performance of the TableMeasures classes depends on how the 00104 // measures are stored; thus if a fixed or variable offset and reference 00105 // are used. 00106 // Of course, it also depends on whether the measures have to be 00107 // converted before they can be stored. 00108 // <br>The TableMeasures classes are always slower than the Tables classes, 00109 // but they offer more convenience. 00110 // In general one can say that for large tables it is better to use 00111 // the Tables classes directly to put/get the data. 00112 // However, even when putting directly using the Tables classes, the 00113 // column itself should be defined as a TableMeasure. In that way there 00114 // is one standard way of defining columns as table measures. 00115 // <br>For example, the TIME column in a MeasurementSet should be handled 00116 // directly uisng the Tables classes (because it is so large). 00117 // On the other hand, the FIELD table is very small and it may make life 00118 // easier to handle its columns through the TableMeasures classes. 00119 // 00120 // In a test putting an array of quanta using class 00121 // <linkto class=ArrayQuantColumn>ArrayQuantColumn</linkto> took 00122 // about 5 times as long as doing it directly using class 00123 // <linkto class=ArrayColumn>ArrayColumn</linkto>. The quantum column 00124 // had variable units. so for each row the unit had to be written as well. 00125 // Reading it back took about 3 times as long. 00126 // <br>When using a qunatum column with fixed units, putting took about 00127 // 2.5 times as long as using <src>ArrayColumn</src> directly. 00128 // Each put involved a unit conversion. 00129 // Reading it back took only 10% more than when using <src>ArrayColumn</src>. 00130 // 00131 // </synopsis> 00132 00133 // <motivation> 00134 // The standard Casacore Table system does not directly support Quantum and 00135 // Measure columns. These classes overcome this limitation. 00136 // </motivation> 00137 00138 //# <todo asof=""> 00139 //# </todo> 00140 00141 // </module> 00142 00143 00144 } //# NAMESPACE CASACORE - END 00145 00146 #endif