casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CalTableDesc2.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_CALTABLEDESC2_H
00030 #define CALIBRATION_CALTABLEDESC2_H
00031 
00032 #include <casa/aips.h>
00033 #include <tables/Tables/Table.h>
00034 #include <tables/Tables/TableDesc.h>
00035 #include <synthesis/CalTables/VisCalEnum.h>
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 CalTableDesc2
00085 {
00086 public:
00087   //  enum {REAL=0, COMPLEX};
00088   // Default null constructor, and destructor
00089   CalTableDesc2();
00090   virtual ~CalTableDesc2() {};
00091   
00092   // Construct from the Jones table type
00093   CalTableDesc2 (const String& jonesType, const Int& parType=VisCalEnum::COMPLEX);
00094   
00095   // Return the table descriptors for the main calibration table
00096   // and the cal_history and cal_desc sub-tables
00097   virtual TableDesc& calMainDesc();
00098   virtual TableDesc calHistoryDesc();
00099   virtual TableDesc calDescDesc();
00100   const Int parType() {return parType_;}
00101   // Generate the default table descriptor for fit parameters
00102   TableDesc defaultFitDesc();
00103   void addDesc (const TableDesc& sourceTableDesc, TableDesc& targetTableDesc);
00104   void init(const String& jonesType, const Int& parType);
00105 protected:
00106   
00107   // Generate the default table descriptor for general polynomial parameters
00108   TableDesc defaultPolyDesc();
00109   
00110   // Generate the default table descriptor for spline polynomial parameters
00111   TableDesc defaultSplineDesc();
00112   
00113   // Method to insert one table descriptor into another after
00114   // a specified column name.
00115   TableDesc insertDesc (const TableDesc& tableDesc, const TableDesc& insert,
00116                         const String& insertAfter);
00117 
00118 private:
00119   // Generate the default sub-table descriptors
00120   TableDesc defaultCalMain (const String& jonesType, const Int& parType);
00121   TableDesc defaultCalDesc();
00122   TableDesc defaultCalHistory();
00123   
00124   // Table descriptors
00125   TableDesc itsCalMainDesc;
00126   TableDesc itsCalHistoryDesc;
00127   TableDesc itsCalDescDesc;
00128   Int parType_;
00129 };
00130   
00131   
00132 } //# NAMESPACE CASA - END
00133 
00134 #endif
00135 
00136 
00137 
00138 
00139