casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TsysGainCal.h
Go to the documentation of this file.
00001 //# TsysGainCal.h: Declaration of Tsys calibration
00002 //# Copyright (C) 1996,1997,2000,2001,2002,2003
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 
00028 #ifndef SYNTHESIS_TSYSGAINCAL_H
00029 #define SYNTHESIS_TSYSGAINCAL_H
00030 
00031 #include <casa/aips.h>
00032 #include <casa/Containers/Record.h>
00033 #include <casa/BasicSL/Complex.h>
00034 #include <synthesis/MeasurementComponents/VisCal.h>
00035 #include <synthesis/MeasurementComponents/SolvableVisCal.h>
00036 #include <synthesis/MeasurementComponents/StandardVisCal.h>
00037 // not yet:#include <synthesis/MeasurementComponents/CalCorruptor.h>
00038 
00039 namespace casa { //# NAMESPACE CASA - BEGIN
00040 
00041 // Forward declarations
00042 class VisEquation;
00043 //not yet: class TJonesCorruptor;
00044 
00045 
00046 // **********************************************************
00047 //  Standard Tsys Spectrum from SYSCAL table
00048 //
00049 
00050 class StandardTsys : public BJones {
00051 public:
00052 
00053   // Constructor
00054   StandardTsys(VisSet& vs);
00055   StandardTsys(const Int& nAnt);
00056 
00057   virtual ~StandardTsys();
00058 
00059   // Return the type enum (for now, pretend we are B)
00060   virtual Type type() { return VisCal::B; };
00061 
00062   // Return type name as string (ditto)
00063   virtual String typeName()     { return "B TSYS"; };
00064   virtual String longTypeName() { return "B TSYS (freq-dep Tsys)"; };
00065 
00066   // Tsys are Float parameters
00067   virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; };
00068 
00069   // Local setSpecify
00070   using BJones::setSpecify;
00071   virtual void setSpecify(const Record& specify);
00072 
00073   // Specific specify() that reads the SYSCAL subtable
00074   virtual void specify(const Record& specify);
00075 
00076   // In general, we are freq-dep
00077   virtual Bool freqDepPar() { return True; };
00078 
00079 
00080 protected:
00081 
00082   // The Jones matrix elements are not the parameters
00083   //  ( j = sqrt(p) )
00084   virtual Bool trivialJonesElem() { return False; };
00085 
00086   // Specialized calcPar that does some sanity checking
00087   virtual void calcPar();
00088 
00089   // Invert doInv for Tsys corrections
00090   virtual void syncJones(const Bool& doInv) { BJones::syncJones(!doInv); };
00091   
00092   // Calculate Jones matrix elements from Tsys (j = sqrt(p) )
00093   virtual void calcAllJones();
00094 
00095   // Calculate weight scale
00096   //  For now, just call VisJones version (BJones version is experimental)
00097   virtual void syncWtScale() { VisJones::syncWtScale(); };
00098 
00099 private:
00100 
00101   // The name of the SYSCAL table
00102   String sysCalTabName_;
00103 
00104   // <nothing>
00105 
00106 
00107 };
00108 
00109 } //# NAMESPACE CASA - END
00110 
00111 #endif
00112