casacore
Loading...
Searching...
No Matches
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: casa-feedback@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#ifndef MEASURES_TABLEMEASURES_H
27#define MEASURES_TABLEMEASURES_H
28
29#include <casacore/casa/aips.h>
30#include <casacore/measures/TableMeasures/ArrayMeasColumn.h>
31#include <casacore/measures/TableMeasures/ArrayQuantColumn.h>
32#include <casacore/measures/TableMeasures/ScalarMeasColumn.h>
33#include <casacore/measures/TableMeasures/ScalarQuantColumn.h>
34#include <casacore/measures/TableMeasures/TableMeasDesc.h>
35#include <casacore/measures/TableMeasures/TableMeasOffsetDesc.h>
36#include <casacore/measures/TableMeasures/TableMeasRefDesc.h>
37#include <casacore/measures/TableMeasures/TableMeasValueDesc.h>
38#include <casacore/measures/TableMeasures/TableQuantumDesc.h>
39
40namespace casacore { //# NAMESPACE CASACORE - BEGIN
41
42// <module>
43
44// <summary>
45// Create and use scalar and array columns of Quanta and Measures in Tables.
46// </summary>
47
48// <prerequisite>
49// <li> <linkto module=Measures>Measures</linkto>
50// <li> <linkto module=Tables>Tables</linkto>
51// </prerequisite>
52
53// <reviewed reviewer="Bob Garwood" date="1999/12/23">
54// </reviewed>
55
56// <etymology>
57// Table columns containing Measures and Quanta
58// </etymology>
59
60// <synopsis>
61
62// The TableMeasures system exists to provide a way of creating (defining)
63// Measure and Quantum Table columns thus enabling the direct storage of
64// Quanta and Measures in Casacore Tables.
65// <p>
66// Defining Quantum and Measure columns is a once only operation (for each
67// column). It can be seen as an extension to the existing Column Descriptor
68// mechanism which adds a column of a specified type to a table. The
69// <linkto><class=TableMeasDesc>TableMeasDesc</linkto> and
70// <linkto><class=TableQuantumDesc>TableQuantumDesc</linkto> class
71// hierarchies are used to define Measure and Quantum columns.
72// <p>
73// Once defined, Measure and Quantum column objects are used to access a
74// column for reading and writing of Measures and Quanta. For Quantum
75// column objects see the class
76// <linkto><class=ScalarQuantColumn>ScalarQuantColumn</linkto> and
77// <linkto><class=ArrayQuantColumn>ArrayQuantColumn</linkto>. For
78// Measure column objects see
79// <linkto><class=ScalarMeasColumn>ScalarMeasColumn</linkto> and
80// <linkto><class=ArrayMeasColumn>ArrayMeasColumn</linkto>.
81//
82// <h3>Conversions</h3>
83// The classes accessing the data use the underlying
84// <linkto module=Quanta>Quanta</linkto> or
85// <linkto module=Measures>Measures</linkto> classes to convert
86// the units or references of the measures or quanta.
87// The TableMeasures classes do not test if a conversion is possible.
88// <br>In general one can say that about every unit conversion is possible.
89// The <linkto class=Unit>Unit</linkto> class adjusts units as needed.
90// <br>Conversions of Measures are only possible if enough information
91// is supplied for the measure's reference.
92// <br>Take a look at the abovementioned modules to find out about conversions.
93//
94// <h3>Performance</h3>
95// Using the TableMeasures classes makes it easier to deal with
96// measures in tables. However, there is a performance penalty
97// compared to handling the values directly in the table using
98// the Tables classes <linkto class=ScalarColumn>ScalarColumn</linkto>
99// and <linkto class=ArrayColumn>ArrayColumn</linkto>.
100//
101// The performance of the TableMeasures classes depends on how the
102// measures are stored; thus if a fixed or variable offset and reference
103// are used.
104// Of course, it also depends on whether the measures have to be
105// converted before they can be stored.
106// <br>The TableMeasures classes are always slower than the Tables classes,
107// but they offer more convenience.
108// In general one can say that for large tables it is better to use
109// the Tables classes directly to put/get the data.
110// However, even when putting directly using the Tables classes, the
111// column itself should be defined as a TableMeasure. In that way there
112// is one standard way of defining columns as table measures.
113// <br>For example, the TIME column in a MeasurementSet should be handled
114// directly uisng the Tables classes (because it is so large).
115// On the other hand, the FIELD table is very small and it may make life
116// easier to handle its columns through the TableMeasures classes.
117//
118// In a test putting an array of quanta using class
119// <linkto class=ArrayQuantColumn>ArrayQuantColumn</linkto> took
120// about 5 times as long as doing it directly using class
121// <linkto class=ArrayColumn>ArrayColumn</linkto>. The quantum column
122// had variable units. so for each row the unit had to be written as well.
123// Reading it back took about 3 times as long.
124// <br>When using a qunatum column with fixed units, putting took about
125// 2.5 times as long as using <src>ArrayColumn</src> directly.
126// Each put involved a unit conversion.
127// Reading it back took only 10% more than when using <src>ArrayColumn</src>.
128//
129// </synopsis>
130
131// <motivation>
132// The standard Casacore Table system does not directly support Quantum and
133// Measure columns. These classes overcome this limitation.
134// </motivation>
135
136//# <todo asof="">
137//# </todo>
138
139// </module>
140
141
142} //# NAMESPACE CASACORE - END
143
144#endif
this file contains all the compiler specific defines
Definition mainpage.dox:28