EVLASwPow.h

Go to the documentation of this file.
00001 //# EVLASwPow.h: Declaration of EVLA Switched Power 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_EVLASWPOW_H
00029 #define SYNTHESIS_EVLASWPOW_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 
00038 namespace casa { //# NAMESPACE CASA - BEGIN
00039 
00040 // Forward declarations
00041 class VisEquation;
00042 
00043 
00044 // **********************************************************
00045 //  EVLA switched power Gain and Tsys
00046 //
00047 
00048 
00049 class EVLASwPow : public GJones {
00050 public:
00051 
00052   enum SPType{SWPOW,EVLAGAIN=SWPOW,RQ,SWPOVERRQ,NONE};
00053   
00054   static SPType sptype(String name);
00055   static String sptype(SPType sptype);
00056 
00057   // Constructor
00058   EVLASwPow(VisSet& vs);
00059   EVLASwPow(String msname,Int MSnAnt,Int MSnSpw);
00060   EVLASwPow(const MSMetaInfoForCal& msmc);
00061   EVLASwPow(const Int& nAnt);
00062 
00063   virtual ~EVLASwPow();
00064 
00065   // Return the type enum (for now, pretend we are G)
00066   virtual Type type() { return VisCal::G; };
00067 
00068   // EVLA Gain and Tsys are Float parameters
00069   virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; };
00070 
00071   // Return type name as string (ditto)
00072   virtual String typeName()     { return "G EVLASWPOW"; };
00073   virtual String longTypeName() { return "G EVLASWPOW (Switched-power gain)"; };
00074 
00075   // Local setSpecify
00076   using GJones::setSpecify;
00077   virtual void setSpecify(const Record& specify);
00078 
00079   // Specific specify() that reads the SYSCAL subtable
00080   virtual void specify(const Record& specify);
00081 
00082   // In general, we are freq-dep
00083   virtual Bool freqDepPar() { return False; };
00084 
00085 
00086 protected:
00087 
00088   // There are 4 parameters (Gain and Tsys for each pol)
00089   virtual Int nPar() { return 4; };  
00090 
00091   // The parameter array is not (just) the Jones matrix element array
00092   virtual Bool trivialJonesElem() { return False; };
00093 
00094   // Calculate Jones matrix elements (slice out the gains)
00095   virtual void calcAllJones();
00096 
00097   // Synchronize the weight-scaling factors
00098   //  Weights are multiplied by 1/Tsys(K) per antenna
00099   virtual void syncWtScale();
00100 
00101   // Experimenting with updateWt
00102   //virtual void updateWt(Matrix<Float>& wt,const Int& a1,const Int& a2);
00103 
00104 private:
00105 
00106   // Fill the Tcals from the CALDEVICE table
00107   void fillTcals();
00108 
00109   // The name of the SYSCAL table
00110   String sysPowTabName_,calDevTabName_;
00111 
00112   // Tcal storage
00113   Cube<Float> tcals_;
00114 
00115   // Digital factors for the EVLA
00116   Float correff_;      // net corr efficiency (lossy)
00117   Float frgrotscale_;  // fringe rotation scale (lossless)
00118   Float nyquist_;      // 2*dt*dv
00119 
00120   // Effective per-chan BW, per spw for weight calculation
00121   Vector<Double> effChBW_;
00122 
00123 };
00124 
00125 
00126 
00127 
00128 } //# NAMESPACE CASA - END
00129 
00130 #endif
00131 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1