casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CalTableDesc.h
Go to the documentation of this file.
00001 //# CalTableDesc.h: Define the format of calibration tables
00002 //# Copyright (C) 1996,1997,1998,2002
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 adressed 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$
00028 
00029 #ifndef CALIBRATION_CALTABLEDESC_H
00030 #define CALIBRATION_CALTABLEDESC_H
00031 
00032 #include <casa/aips.h>
00033 #include <tables/Tables/Table.h>
00034 #include <tables/Tables/TableDesc.h>
00035 
00036 namespace casa { //# NAMESPACE CASA - BEGIN
00037 
00038 // <summary> 
00039 // CalTableDesc: Define the format of calibration tables
00040 // </summary>
00041 
00042 // <use visibility=export>
00043 
00044 // <reviewed reviewer="" date="" tests="" demos="">
00045 
00046 // <prerequisite>
00047 //   <li> <linkto class="CalTable">CalTable</linkto> module
00048 // </prerequisite>
00049 //
00050 // <etymology>
00051 // From "Calibration table" and "descriptor".
00052 // </etymology>
00053 //
00054 // <synopsis>
00055 // CalTableDesc defines the format of calibration tables in terms
00056 // of table descriptors <linkto class="TableDesc">TableDesc</linkto>, as
00057 // defined in the Table system. This is a base class and defines the
00058 // overall calibration table structure. Specializations for both
00059 // antenna-based (ViJones and SkyJones) and baseline-based (MJones)
00060 // calibration tables are provided through inheritance. At present this 
00061 // set of classes returns the default calibration table descriptors for a 
00062 // given calibration table type.
00063 // </etymology>
00064 //
00065 // <example>
00066 // <srcblock>
00067 // </srcblock>
00068 // </example>
00069 //
00070 // <motivation>
00071 // This inheritance tree defines the format of all calibration
00072 // table types, both antenna- and baseline-based, to provide
00073 // a unified and consistent interface to their representation
00074 // as aips++ tables. An overall structure common to all calibration
00075 // tables is maintained as far as possible, with common column
00076 // names throughout. This class tree is primarily used by
00077 // the <linkto class="CalTable"> CalTable</linkto> classes.
00078 // </motivation>
00079 //
00080 // <todo asof="98/01/01">
00081 // Generate the calibration table descriptors from a VisSet or VisBuffer object
00082 // </todo>
00083 
00084 class CalTableDesc 
00085 {
00086  public:
00087    // Default null constructor, and destructor
00088    CalTableDesc();
00089    virtual ~CalTableDesc() {};
00090 
00091    // Construct from the Jones table type
00092    CalTableDesc (const String& type);
00093 
00094    // Return the table descriptors for the main calibration table
00095    // and the cal_history and cal_desc sub-tables
00096    virtual TableDesc calMainDesc();
00097    virtual TableDesc calHistoryDesc();
00098    virtual TableDesc calDescDesc();
00099 
00100  protected:
00101    // Generate the default table descriptor for fit parameters
00102    TableDesc defaultFitDesc();
00103 
00104    // Generate the default table descriptor for general polynomial parameters
00105    TableDesc defaultPolyDesc();
00106 
00107    // Generate the default table descriptor for spline polynomial parameters
00108    TableDesc defaultSplineDesc();
00109 
00110    // Method to insert one table descriptor into another after
00111    // a specified column name.
00112    TableDesc insertDesc (const TableDesc& tableDesc, const TableDesc& insert,
00113                          const String& insertAfter);
00114 
00115  private:
00116    // Generate the default sub-table descriptors
00117    TableDesc defaultCalMain (const String& type);
00118    TableDesc defaultCalDesc();
00119    TableDesc defaultCalHistory();
00120 
00121    // Table descriptors
00122    TableDesc itsCalMainDesc;
00123    TableDesc itsCalHistoryDesc;
00124    TableDesc itsCalDescDesc;
00125 
00126  };
00127 
00128 
00129 } //# NAMESPACE CASA - END
00130 
00131 #endif
00132    
00133   
00134 
00135 
00136