casacore
TableMeasures.h
Go to the documentation of this file.
1 //# TableMeasures.h: Create Measure and Quantum columns Tables.
2 //# Copyright (C) 1996,1997,1998,1999,2000,2001
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef MEASURES_TABLEMEASURES_H
29 #define MEASURES_TABLEMEASURES_H
30 
31 #include <casacore/casa/aips.h>
32 #include <casacore/measures/TableMeasures/ArrayMeasColumn.h>
33 #include <casacore/measures/TableMeasures/ArrayQuantColumn.h>
34 #include <casacore/measures/TableMeasures/ScalarMeasColumn.h>
35 #include <casacore/measures/TableMeasures/ScalarQuantColumn.h>
36 #include <casacore/measures/TableMeasures/TableMeasDesc.h>
37 #include <casacore/measures/TableMeasures/TableMeasOffsetDesc.h>
38 #include <casacore/measures/TableMeasures/TableMeasRefDesc.h>
39 #include <casacore/measures/TableMeasures/TableMeasValueDesc.h>
40 #include <casacore/measures/TableMeasures/TableQuantumDesc.h>
41 
42 namespace casacore { //# NAMESPACE CASACORE - BEGIN
43 
44 // <module>
45 
46 // <summary>
47 // Create and use scalar and array columns of Quanta and Measures in Tables.
48 // </summary>
49 
50 // <prerequisite>
51 // <li> <linkto module=Measures>Measures</linkto>
52 // <li> <linkto module=Tables>Tables</linkto>
53 // </prerequisite>
54 
55 // <reviewed reviewer="Bob Garwood" date="1999/12/23">
56 // </reviewed>
57 
58 // <etymology>
59 // Table columns containing Measures and Quanta
60 // </etymology>
61 
62 // <synopsis>
63 
64 // The TableMeasures system exists to provide a way of creating (defining)
65 // Measure and Quantum Table columns thus enabling the direct storage of
66 // Quanta and Measures in Casacore Tables.
67 // <p>
68 // Defining Quantum and Measure columns is a once only operation (for each
69 // column). It can be seen as an extension to the existing Column Descriptor
70 // mechanism which adds a column of a specified type to a table. The
71 // <linkto><class=TableMeasDesc>TableMeasDesc</linkto> and
72 // <linkto><class=TableQuantumDesc>TableQuantumDesc</linkto> class
73 // hierarchies are used to define Measure and Quantum columns.
74 // <p>
75 // Once defined, Measure and Quantum column objects are used to access a
76 // column for reading and writing of Measures and Quanta. For Quantum
77 // column objects see the class
78 // <linkto><class=ScalarQuantColumn>ScalarQuantColumn</linkto> and
79 // <linkto><class=ArrayQuantColumn>ArrayQuantColumn</linkto>. For
80 // Measure column objects see
81 // <linkto><class=ScalarMeasColumn>ScalarMeasColumn</linkto> and
82 // <linkto><class=ArrayMeasColumn>ArrayMeasColumn</linkto>.
83 //
84 // <h3>Conversions</h3>
85 // The classes accessing the data use the underlying
86 // <linkto module=Quanta>Quanta</linkto> or
87 // <linkto module=Measures>Measures</linkto> classes to convert
88 // the units or references of the measures or quanta.
89 // The TableMeasures classes do not test if a conversion is possible.
90 // <br>In general one can say that about every unit conversion is possible.
91 // The <linkto class=Unit>Unit</linkto> class adjusts units as needed.
92 // <br>Conversions of Measures are only possible if enough information
93 // is supplied for the measure's reference.
94 // <br>Take a look at the abovementioned modules to find out about conversions.
95 //
96 // <h3>Performance</h3>
97 // Using the TableMeasures classes makes it easier to deal with
98 // measures in tables. However, there is a performance penalty
99 // compared to handling the values directly in the table using
100 // the Tables classes <linkto class=ScalarColumn>ScalarColumn</linkto>
101 // and <linkto class=ArrayColumn>ArrayColumn</linkto>.
102 //
103 // The performance of the TableMeasures classes depends on how the
104 // measures are stored; thus if a fixed or variable offset and reference
105 // are used.
106 // Of course, it also depends on whether the measures have to be
107 // converted before they can be stored.
108 // <br>The TableMeasures classes are always slower than the Tables classes,
109 // but they offer more convenience.
110 // In general one can say that for large tables it is better to use
111 // the Tables classes directly to put/get the data.
112 // However, even when putting directly using the Tables classes, the
113 // column itself should be defined as a TableMeasure. In that way there
114 // is one standard way of defining columns as table measures.
115 // <br>For example, the TIME column in a MeasurementSet should be handled
116 // directly uisng the Tables classes (because it is so large).
117 // On the other hand, the FIELD table is very small and it may make life
118 // easier to handle its columns through the TableMeasures classes.
119 //
120 // In a test putting an array of quanta using class
121 // <linkto class=ArrayQuantColumn>ArrayQuantColumn</linkto> took
122 // about 5 times as long as doing it directly using class
123 // <linkto class=ArrayColumn>ArrayColumn</linkto>. The quantum column
124 // had variable units. so for each row the unit had to be written as well.
125 // Reading it back took about 3 times as long.
126 // <br>When using a qunatum column with fixed units, putting took about
127 // 2.5 times as long as using <src>ArrayColumn</src> directly.
128 // Each put involved a unit conversion.
129 // Reading it back took only 10% more than when using <src>ArrayColumn</src>.
130 //
131 // </synopsis>
132 
133 // <motivation>
134 // The standard Casacore Table system does not directly support Quantum and
135 // Measure columns. These classes overcome this limitation.
136 // </motivation>
137 
138 //# <todo asof="">
139 //# </todo>
140 
141 // </module>
142 
143 
144 } //# NAMESPACE CASACORE - END
145 
146 #endif
this file contains all the compiler specific defines
Definition: mainpage.dox:28