LCOV - code coverage report
Current view: top level - synthesis/MeasurementComponents - EJones.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 12 0.0 %
Date: 2024-10-10 11:40:37 Functions: 0 12 0.0 %

          Line data    Source code
       1             : //# EJones.h: Antenna-pattern related calibration term: E Jones
       2             : //# Copyright (C) 1996,1997,2000,2001,2002,2003
       3             : //# Associated Universities, Inc. Washington DC, USA.
       4             : //#
       5             : //# This library is free software; you can redistribute it and/or modify it
       6             : //# under the terms of the GNU Library General Public License as published by
       7             : //# the Free Software Foundation; either version 2 of the License, or (at your
       8             : //# option) any later version.
       9             : //#
      10             : //# This library is distributed in the hope that it will be useful, but WITHOUT
      11             : //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
      12             : //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
      13             : //# License for more details.
      14             : //#
      15             : //# You should have received a copy of the GNU Library General Public License
      16             : //# along with this library; if not, write to the Free Software Foundation,
      17             : //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
      18             : //#
      19             : //# Correspondence concerning AIPS++ should be adressed as follows:
      20             : //#        Internet email: casa-feedback@nrao.edu.
      21             : //#        Postal address: AIPS++ Project Office
      22             : //#                        National Radio Astronomy Observatory
      23             : //#                        520 Edgemont Road
      24             : //#                        Charlottesville, VA 22903-2475 USA
      25             : //#
      26             : //#
      27             : 
      28             : #ifndef SYNTHESIS_EJONES_H
      29             : #define SYNTHESIS_EJONES_H
      30             : 
      31             : #include <casacore/casa/aips.h>
      32             : #include <casacore/casa/Containers/Record.h>
      33             : #include <casacore/casa/BasicSL/Complex.h>
      34             : #include <synthesis/MeasurementComponents/SolvableVisCal.h>
      35             : 
      36             : namespace casa { //# NAMESPACE CASA - BEGIN
      37             : 
      38             : // Forward declaration
      39             : class VisEquation;
      40             : 
      41             : // **********************************************************
      42             : //  EGainCurve
      43             : //
      44             : 
      45             : class EGainCurve : public SolvableVisJones {
      46             : public:
      47             : 
      48             :   // Constructor
      49             :   EGainCurve(VisSet& vs);
      50             :   EGainCurve(casacore::String msname,casacore::Int MSnAnt,casacore::Int MSnSpw);
      51             :   EGainCurve(const MSMetaInfoForCal& msmc);
      52             : 
      53             :   virtual ~EGainCurve();
      54             : 
      55             :   // Return the type enum
      56           0 :   virtual Type type() { return VisCal::E; };
      57             : 
      58             :   // Return type name as string
      59           0 :   virtual casacore::String typeName()     { return "EGainCurve"; };
      60           0 :   virtual casacore::String longTypeName() { return "EGainCurve (Gain(elev) corrections)"; };
      61             : 
      62             :   // Gain curve coeffs are casacore::Float parameters
      63           0 :   virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; };
      64             : 
      65             :   // Type of Jones matrix (
      66           0 :   Jones::JonesType jonesType() { return Jones::Diagonal; };
      67             : 
      68             :   // Local specialization of setApply to extract gain curves from table
      69             :   void setApply(const casacore::Record& applypar);
      70             : 
      71             :   // Cal Library version
      72             :   void setCallib(const casacore::Record& applypar,const casacore::MeasurementSet& selms);
      73             : 
      74             :   // Generate gain curves caltable via specify
      75             :   void setSpecify(const casacore::Record& specify);
      76             :   void specify(const casacore::Record& specify);
      77             : 
      78             :   // Guess (throws error because we don't yet solve for this)
      79             :   virtual void guessPar(VisBuffer& vb);
      80             : 
      81             : protected:
      82             : 
      83             :   // EGainCurve has eight casacore::Float pars per ant (4 per pol)
      84           0 :   virtual casacore::Int nPar() { return 8; };
      85             : 
      86             :   // Jones matrix elements are NOT trivial
      87           0 :   virtual casacore::Bool trivialJonesElem() { return false; };
      88             : 
      89             :   // Access to z.a. data
      90           0 :   casacore::Vector<casacore::Double>& za() { return za_; };
      91             : 
      92             :   // Detect zenith angle for this vb
      93             :   virtual void syncMeta(const VisBuffer& vb);
      94             :   virtual void syncMeta2(const vi::VisBuffer2& vb);
      95             : 
      96             :   // Calculate parameters (in this case, the z.a.)
      97             :   virtual void calcPar();
      98             : 
      99             :   // Calculate the EGainCurve matrix for all ants
     100             :   virtual void calcAllJones();
     101             : 
     102             : private:
     103             : 
     104             :   // avoid compiler warnings
     105             :   using SolvableVisJones::setApply;  
     106             : 
     107             :   // Name of the gain curve source table
     108             :   casacore::String gainCurveSrc_;
     109             : 
     110             :   // The observation start time (for selecting gain curves)
     111             :   casacore::Double obstime_;
     112             : 
     113             :   // The ant name list (for selecting gain curves)
     114             :   casacore::Vector<casacore::String> antnames_;
     115             : 
     116             :   // The spw ref frequencies (for selecting gain curves)
     117             :   casacore::Vector<casacore::Double> spwfreqs_;
     118             : 
     119             :   // The spw band names (for selecting gain curves)
     120             :   casacore::Vector<casacore::String> spwbands_;
     121             : 
     122             :   // Zenith angles
     123             :   casacore::Vector<casacore::Double> za_;
     124             : 
     125             :   // Effeciency samples
     126             :   casacore::Vector<casacore::Double> eff_;
     127             : };
     128             : 
     129             : class EPowerCurve : public EGainCurve {
     130             : public:
     131             : 
     132             :   // Constructor
     133             :   EPowerCurve(VisSet& vs);
     134             :   EPowerCurve(casacore::String msname,casacore::Int MSnAnt,casacore::Int MSnSpw);
     135             :   EPowerCurve(const MSMetaInfoForCal& msmc);
     136             : 
     137             :   virtual ~EPowerCurve();
     138             : 
     139             :   // Return type name as string
     140           0 :   virtual casacore::String typeName()     { return "EPowerCurve"; };
     141           0 :   virtual casacore::String longTypeName() { return "EPowerCurve (Gain(elev) corrections)"; };
     142             : 
     143             :   // Generate gain curves caltable via specify
     144             :   void setSpecify(const casacore::Record& specify);
     145             :   void specify(const casacore::Record& specify);
     146             : 
     147             : protected:
     148             : 
     149             :   // EPowerCurve has 16 casacore::Float pars per ant (8 per pol)
     150           0 :   virtual casacore::Int nPar() { return 16; };
     151             : 
     152             :   // Calculate the EPowerCurve matrix for all ants
     153             :   virtual void calcAllJones();
     154             : 
     155           0 :   casacore::String& gainCurveTabName() { return gainCurveTabName_; };
     156             : 
     157             : private:
     158             : 
     159             :   // Gain curve table name
     160             :   casacore::String gainCurveTabName_;
     161             : };
     162             : 
     163             : } //# NAMESPACE CASA - END
     164             : 
     165             : #endif
     166             : 

Generated by: LCOV version 1.16