LCOV - code coverage report
Current view: top level - synthesis/MeasurementComponents - TsysGainCal.h (source / functions) Hit Total Coverage
Test: ctest_coverage.info Lines: 0 7 0.0 %
Date: 2023-11-02 14:27:30 Functions: 0 7 0.0 %

          Line data    Source code
       1             : //# TsysGainCal.h: Declaration of Tsys calibration
       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: aips2-request@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_TSYSGAINCAL_H
      29             : #define SYNTHESIS_TSYSGAINCAL_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/VisCal.h>
      35             : #include <synthesis/MeasurementComponents/SolvableVisCal.h>
      36             : #include <synthesis/MeasurementComponents/StandardVisCal.h>
      37             : // not yet:#include <synthesis/MeasurementComponents/CalCorruptor.h>
      38             : 
      39             : namespace casa { //# NAMESPACE CASA - BEGIN
      40             : 
      41             : // Forward declarations
      42             : class VisEquation;
      43             : //not yet: class TJonesCorruptor;
      44             : 
      45             : 
      46             : // **********************************************************
      47             : //  Standard Tsys Spectrum from SYSCAL table
      48             : //
      49             : 
      50             : class StandardTsys : public BJones {
      51             : public:
      52             : 
      53             :   // Constructor
      54             :   StandardTsys(VisSet& vs);
      55             :   StandardTsys(casacore::String msname,casacore::Int MSnAnt,casacore::Int MSnSpw);
      56             :   StandardTsys(const MSMetaInfoForCal& msmc);
      57             :   StandardTsys(const casacore::Int& nAnt);
      58             : 
      59             :   virtual ~StandardTsys();
      60             : 
      61             :   // Return the type enum (for now, pretend we are B)
      62           0 :   virtual Type type() { return VisCal::B; };
      63             : 
      64             :   // Return type name as string (ditto)
      65           0 :   virtual casacore::String typeName()     { return "B TSYS"; };
      66           0 :   virtual casacore::String longTypeName() { return "B TSYS (freq-dep Tsys)"; };
      67             : 
      68             :   // Tsys are casacore::Float parameters
      69           0 :   virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; };
      70             : 
      71             :   // Local setSpecify
      72             :   using BJones::setSpecify;
      73             :   virtual void setSpecify(const casacore::Record& specify);
      74             : 
      75             :   // Specific specify() that reads the SYSCAL subtable
      76             :   virtual void specify(const casacore::Record& specify);
      77             : 
      78             :   // In general, we are freq-dep
      79           0 :   virtual casacore::Bool freqDepPar() { return freqDepTsys_; };
      80             : 
      81             :   // Specialized to turn on spectral weight calibration
      82             :   virtual void correct2(vi::VisBuffer2& vb, casacore::Bool trial=false, 
      83             :                         casacore::Bool doWtSp=false, casacore::Bool dosync=true);
      84             : 
      85             : protected:
      86             : 
      87             :   // The Jones matrix elements are not the parameters
      88             :   //  ( j = sqrt(p) )
      89           0 :   virtual casacore::Bool trivialJonesElem() { return false; };
      90             : 
      91             :   // Specialized calcPar that does some sanity checking
      92             :   virtual void calcPar();
      93             : 
      94             :   // Invert doInv for Tsys corrections
      95           0 :   virtual void syncJones(const casacore::Bool& doInv) { BJones::syncJones(!doInv); };
      96             :   
      97             :   // Calculate Jones matrix elements from Tsys (j = sqrt(p) )
      98             :   virtual void calcAllJones();
      99             : 
     100             :   // Local version that arrange channelized correction
     101             :   virtual void syncWtScale();
     102             : 
     103             :   // Calculate weight scale
     104             :   virtual void calcWtScale();
     105             :   virtual void calcWtScale2();  // called by local syncWtScale only
     106             : 
     107             :   using BJones::keepNCT;
     108             :   virtual void keepNCT(const casacore::Vector<casacore::Int>& ants);
     109             : 
     110             : private:
     111             : 
     112             :   // The name of the SYSCAL table
     113             :   casacore::String sysCalTabName_;
     114             : 
     115             :   // Signal formation of channelized weight calibration
     116             :   casacore::Bool freqDepCalWt_;
     117             : 
     118             :   // Signal presence of channelized Tsys data
     119             :   casacore::Bool freqDepTsys_;
     120             : 
     121             :   // <nothing>
     122             : 
     123             : 
     124             : };
     125             : 
     126             : } //# NAMESPACE CASA - END
     127             : 
     128             : #endif
     129             : 

Generated by: LCOV version 1.16