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