EJones.h

Go to the documentation of this file.
00001 //# EJones.h: Antenna-pattern related calibration term: E Jones
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_EJONES_H
00029 #define SYNTHESIS_EJONES_H
00030 
00031 #include <casa/aips.h>
00032 #include <casa/Containers/Record.h>
00033 #include <casa/BasicSL/Complex.h>
00034 #include <synthesis/MeasurementComponents/SolvableVisCal.h>
00035 
00036 namespace casa { //# NAMESPACE CASA - BEGIN
00037 
00038 // Forward declaration
00039 class VisEquation;
00040 
00041 // **********************************************************
00042 //  EGainCurve
00043 //
00044 
00045 class EGainCurve : public SolvableVisJones {
00046 public:
00047 
00048   // Constructor
00049   EGainCurve(VisSet& vs);
00050   EGainCurve(String msname,Int MSnAnt,Int MSnSpw);
00051   EGainCurve(const MSMetaInfoForCal& msmc);
00052   //  EGainCurve(const Int& nAnt);  // NYI
00053 
00054   virtual ~EGainCurve();
00055 
00056   // Return the type enum
00057   virtual Type type() { return VisCal::E; };
00058 
00059   // Return type name as string
00060   virtual String typeName()     { return "EGainCurve"; };
00061   virtual String longTypeName() { return "EGainCurve (Gain(elev) corrections)"; };
00062 
00063   // Gain curve coeffs are Float parameters
00064   virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; };
00065 
00066   // Type of Jones matrix (
00067   Jones::JonesType jonesType() { return Jones::Diagonal; };
00068 
00069   // Local specialization of setApply to extract gain curves from table
00070   void setApply(const Record& applypar);
00071 
00072   // Cal Library version
00073   void setCallib(const Record& applypar,const MeasurementSet& selms);
00074 
00075   // Generate gain curves caltable via specify
00076   void setSpecify(const Record& specify);
00077   void specify(const Record& specify);
00078 
00079   // Guess (throws error because we don't yet solve for this)
00080   virtual void guessPar(VisBuffer& vb);
00081 
00082   // Local implementation of spwOK()
00083   virtual Vector<Bool> spwOK() { return spwOK_; };
00084 
00085 protected:
00086 
00087   // EGainCurve has eight Float pars per ant (4 per pol)
00088   virtual Int nPar() { return 8; };
00089 
00090   // Jones matrix elements are NOT trivial
00091   virtual Bool trivialJonesElem() { return False; };
00092 
00093   // Access to z.a. data
00094   Vector<Double>& za() { return za_; };
00095 
00096   // Detect zenith angle for this vb
00097   virtual void syncMeta(const VisBuffer& vb);
00098   virtual void syncMeta2(const vi::VisBuffer2& vb);
00099 
00100   // Calculate parameters (in this case, the z.a.)
00101   virtual void calcPar();
00102 
00103   // Calculate the EGainCurve matrix for all ants
00104   virtual void calcAllJones();
00105 
00106 private:
00107 
00108   // avoid compiler warnings
00109   using SolvableVisJones::setApply;  
00110 
00111   // Name of the gain curve source table
00112   String gainCurveSrc_;
00113 
00114   // The observation start time (for selecting gain curves)
00115   Double obstime_;
00116 
00117   // The ant name list (for selecting gain curves)
00118   Vector<String> antnames_;
00119 
00120   // The spw ref frequencies (for selecting gain curves)
00121   Vector<Double> spwfreqs_;
00122 
00123   // The spw band names (for selecting gain curves)
00124   Vector<String> spwbands_;
00125 
00126   // Zenith angles
00127   Vector<Double> za_;
00128 
00129   // Effeciency samples
00130   Vector<Double> eff_;
00131 
00132   // Local spwOK_
00133   Vector<Bool> spwOK_;
00134   
00135 };
00136 
00137 
00138 } //# NAMESPACE CASA - END
00139 
00140 #endif
00141 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1