LCOV - code coverage report
Current view: top level - synthesis/CalTables - SolvableVJMBuf.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 6 0.0 %
Date: 2024-10-04 16:51:10 Functions: 0 3 0.0 %

          Line data    Source code
       1             : //# SolvableVJMBuf.h: SolvableVisJones calibration main table buffer
       2             : //# Copyright (C) 1996,1997,1998,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             : //# $Id$
      28             : 
      29             : #ifndef CALIBRATION_SOLVABLEVJMBUF_H
      30             : #define CALIBRATION_SOLVABLEVJMBUF_H
      31             : 
      32             : #include <synthesis/CalTables/TimeVarVJMBuf.h>
      33             : #include <synthesis/CalTables/SolvableVJMCol.h>
      34             : #include <synthesis/CalTables/SolvableVJTable.h>
      35             : 
      36             : namespace casa { //# NAMESPACE CASA - BEGIN
      37             : 
      38             : // <summary> 
      39             : // SolvableVisJonesMBuf: SolvableVisJones calibration main table buffer
      40             : // </summary>
      41             : 
      42             : // <use visibility=export>
      43             : 
      44             : // <reviewed reviewer="" date="" tests="" demos="">
      45             : 
      46             : // <prerequisite>
      47             : // <li> <linkto class="CalMainBuffer">CalMainBuffer</linkto> module
      48             : // <li> <linkto class="TimeVarVisJonesMBuf">TimeVarVisJonesMBuf</linkto> module
      49             : // </prerequisite>
      50             : //
      51             : // <etymology>
      52             : // From "solvable visibility Jones matrix", "cal main table" and "buffer"
      53             : // </etymology>
      54             : //
      55             : // <synopsis>
      56             : // The SolvableVisJonesMBuf class holds a buffer, optionally connected to a 
      57             : // SolvableVisJones calibration main table iterator (of base type 
      58             : // CalIterBase). Specializations for different solvable Jones matrix
      59             : // types are provided through inheritance.
      60             : // </synopsis>
      61             : //
      62             : // <example>
      63             : // <srcblock>
      64             : // </srcblock>
      65             : // </example>
      66             : //
      67             : // <motivation>
      68             : // Encapsulate SolvableVisJones calibration main table data buffers.
      69             : // </motivation>
      70             : //
      71             : // <todo asof="01/08/01">
      72             : // (i) Deal with non-standard columns.
      73             : // </todo>
      74             : 
      75             : class SolvableVisJonesMBuf : public TimeVarVisJonesMBuf
      76             : {
      77             :  public:
      78             :   // Default constructor. No connection to an underlying
      79             :   // calibration table iterator in this case.
      80             :   SolvableVisJonesMBuf();
      81             : 
      82             :   // Construct from a set of calibration buffer indices and
      83             :   // their specified values. Non-index columns will be set 
      84             :   // to default values, and there is no connection to an 
      85             :   // underlying calibration table iterator in this case.
      86             :   SolvableVisJonesMBuf (const casacore::Vector<casacore::Int>& calIndices, 
      87             :                         const casacore::Block<casacore::Vector<casacore::Int> >& indexValues);
      88             : 
      89             :   // Construct from a calibration table iterator. The calibration
      90             :   // buffer will remain synchronized with the iterator.
      91             :   SolvableVisJonesMBuf (CalIterBase& calIter);
      92             : 
      93             :   // Write the current buffer at the end of a specified cal table;
      94             :   // returns the number of rows appended
      95             :   virtual casacore::Int append (CalTable& calTable);
      96             : 
      97             :   // Maximum number of rows in the calibration buffer
      98             :   virtual casacore::Int nRow();
      99             : 
     100             :   // casacore::Data field accessors
     101             :   virtual casacore::Vector<casacore::Bool>& totalSolnOk();
     102             :   virtual casacore::Vector<casacore::Float>& totalFit();
     103             :   virtual casacore::Vector<casacore::Float>& totalFitWgt();
     104             :   virtual casacore::Array<casacore::Bool>& solnOk();
     105             :   virtual casacore::Array<casacore::Float>& fit();
     106             :   virtual casacore::Array<casacore::Float>& fitWgt();
     107             :   virtual casacore::Array<casacore::Bool>& flag();
     108             :   virtual casacore::Array<casacore::Float>& snr();
     109             : 
     110             :  protected:
     111             :   // Factory method to create a columns accessor object of the appropriate type
     112           0 :   virtual SolvableVisJonesMCol* newCalMainCol (CalTable& calTable) {
     113             :     return new 
     114           0 :       SolvableVisJonesMCol(dynamic_cast<SolvableVisJonesTable&>(calTable));};
     115             : 
     116             :   // Calibration table columns accessor
     117           0 :   virtual SolvableVisJonesMCol* calMainCol() 
     118           0 :     {return dynamic_cast<SolvableVisJonesMCol*>(CalMainBuffer::calMainCol());};
     119             : 
     120             :   // Invalidate the current cache.
     121             :   virtual void invalidate();
     122             : 
     123             :   // <group>
     124             :   // Fill the cal buffer attribute columns in an empty cal buffer,
     125             :   // after the cal indices have been set using fillIndices(). The
     126             :   // cal indices, specified as enums from class MSCalEnums, are excluded
     127             :   // as non-attribute columns
     128             :   //
     129             :   // Use a visibility buffer to define the attribute values (NYI)
     130           0 :   virtual void fillAttributes(const casacore::Vector<casacore::Int>& /*calIndices*/,
     131           0 :                               const VisBuffer& /*vb*/) {};
     132             :   //
     133             :   // Set default attribute values
     134             :   virtual void fillAttributes(const casacore::Vector<casacore::Int>& calIndices);
     135             :   // </group>
     136             : 
     137             :  private:
     138             :   // Buffer fields
     139             :   casacore::Vector<casacore::Bool> totalSolnOk_p;
     140             :   casacore::Vector<casacore::Float> totalFit_p;
     141             :   casacore::Vector<casacore::Float> totalFitWgt_p;
     142             :   casacore::Array<casacore::Bool> solnOk_p;
     143             :   casacore::Array<casacore::Float> fit_p;
     144             :   casacore::Array<casacore::Float> fitWgt_p;
     145             :   casacore::Array<casacore::Bool> flag_p;
     146             :   casacore::Array<casacore::Float> snr_p;
     147             : 
     148             :   // Buffer field status flags
     149             :   casacore::Bool totalSolnOkOK_p;
     150             :   casacore::Bool totalFitOK_p;
     151             :   casacore::Bool totalFitWgtOK_p;
     152             :   casacore::Bool solnOkOK_p;
     153             :   casacore::Bool fitOK_p;
     154             :   casacore::Bool fitWgtOK_p;
     155             :   casacore::Bool flagOK_p;
     156             :   casacore::Bool snrOK_p;
     157             : };
     158             : 
     159             : // <summary> 
     160             : // GJonesMBuf: GJones calibration main table buffer
     161             : // </summary>
     162             : 
     163             : // <use visibility=export>
     164             : 
     165             : // <reviewed reviewer="" date="" tests="" demos="">
     166             : 
     167             : // <prerequisite>
     168             : // <li> <linkto class="CalMainBuffer">CalMainBuffer</linkto> module
     169             : // <li> <linkto class="SolvableVisJonesMBuf">SolvableVisJonesMBuf</linkto> module
     170             : // </prerequisite>
     171             : //
     172             : // <etymology>
     173             : // From "GJones matrix", "cal main table" and "buffer"
     174             : // </etymology>
     175             : //
     176             : // <synopsis>
     177             : // The GJonesMBuf class holds a buffer, optionally connected to a 
     178             : // GJones calibration main table iterator (of base type CalIterBase). 
     179             : // The GJones matrix contains electronic gain correction terms.
     180             : // </synopsis>
     181             : //
     182             : // <example>
     183             : // <srcblock>
     184             : // </srcblock>
     185             : // </example>
     186             : //
     187             : // <motivation>
     188             : // Encapsulate GJones calibration main table data buffers.
     189             : // </motivation>
     190             : //
     191             : // <todo asof="01/08/01">
     192             : // (i) Deal with non-standard columns.
     193             : // </todo>
     194             : 
     195             : class GJonesMBuf : public SolvableVisJonesMBuf
     196             : {
     197             :  public:
     198             :   // Default constructor. No connection to an underlying
     199             :   // calibration table iterator in this case.
     200             :   GJonesMBuf();
     201             : 
     202             :   // Construct from a set of calibration buffer indices and
     203             :   // their specified values. Non-index columns will be set 
     204             :   // to default values, and there is no connection to an 
     205             :   // underlying calibration table iterator in this case.
     206             :   GJonesMBuf (const casacore::Vector<casacore::Int>& calIndices, 
     207             :               const casacore::Block<casacore::Vector<casacore::Int> >& indexValues);
     208             : 
     209             :   // Construct from a calibration table iterator. The calibration
     210             :   // buffer will remain synchronized with the iterator.
     211             :   GJonesMBuf (CalIterBase& calIter);
     212             : 
     213             :   // Update the calibration solution in each of a set of buffer rows
     214             :   virtual casacore::Bool fillMatchingRows (const casacore::Vector<casacore::Int>& matchingRows,
     215             :                                  const casacore::String& sFreqGrpName,
     216             :                                  const casacore::Complex& sGain,
     217             :                                  const casacore::MFrequency& sRefFreq,
     218             :                                  const casacore::Int& sRefAnt);
     219             :  protected:
     220             : 
     221             :  private:
     222             : };
     223             : 
     224             : // <summary> 
     225             : // DJonesMBuf: DJones calibration main table buffer
     226             : // </summary>
     227             : 
     228             : // <use visibility=export>
     229             : 
     230             : // <reviewed reviewer="" date="" tests="" demos="">
     231             : 
     232             : // <prerequisite>
     233             : // <li> <linkto class="CalMainBuffer">CalMainBuffer</linkto> module
     234             : // <li> <linkto class="SolvableVisJonesMBuf">SolvableVisJonesMBuf</linkto> module
     235             : // </prerequisite>
     236             : //
     237             : // <etymology>
     238             : // From "DJones matrix", "cal main table" and "buffer"
     239             : // </etymology>
     240             : //
     241             : // <synopsis>
     242             : // The DJonesMBuf class holds a buffer, optionally connected to a 
     243             : // DJones calibration main table iterator (of base type CalIterBase). 
     244             : // The DJones matrix contains instrumental polarization corrections.
     245             : // </synopsis>
     246             : //
     247             : // <example>
     248             : // <srcblock>
     249             : // </srcblock>
     250             : // </example>
     251             : //
     252             : // <motivation>
     253             : // Encapsulate DJones calibration main table data buffers.
     254             : // </motivation>
     255             : //
     256             : // <todo asof="01/08/01">
     257             : // (i) Deal with non-standard columns.
     258             : // </todo>
     259             : 
     260             : class DJonesMBuf : public SolvableVisJonesMBuf
     261             : {
     262             :  public:
     263             :   // Default constructor. No connection to an underlying
     264             :   // calibration table iterator in this case.
     265             :   DJonesMBuf();
     266             : 
     267             :   // Construct from a set of calibration buffer indices and
     268             :   // their specified values. Non-index columns will be set 
     269             :   // to default values, and there is no connection to an 
     270             :   // underlying calibration table iterator in this case.
     271             :   DJonesMBuf (const casacore::Vector<casacore::Int>& calIndices, 
     272             :               const casacore::Block<casacore::Vector<casacore::Int> >& indexValues);
     273             : 
     274             :   // Construct from a calibration table iterator. The calibration
     275             :   // buffer will remain synchronized with the iterator.
     276             :   DJonesMBuf (CalIterBase& calIter);
     277             : 
     278             :  protected:
     279             : 
     280             :  private:
     281             : };
     282             : 
     283             : // <summary> 
     284             : // TJonesMBuf: TJones calibration main table buffer
     285             : // </summary>
     286             : 
     287             : // <use visibility=export>
     288             : 
     289             : // <reviewed reviewer="" date="" tests="" demos="">
     290             : 
     291             : // <prerequisite>
     292             : // <li> <linkto class="CalMainBuffer">CalMainBuffer</linkto> module
     293             : // <li> <linkto class="SolvableVisJonesMBuf">SolvableVisJonesMBuf</linkto> module
     294             : // </prerequisite>
     295             : //
     296             : // <etymology>
     297             : // From "TJones matrix", "cal main table" and "buffer"
     298             : // </etymology>
     299             : //
     300             : // <synopsis>
     301             : // The TJonesMBuf class holds a buffer, optionally connected to a 
     302             : // TJones calibration main table iterator (of base type CalIterBase). 
     303             : // The TJones matrix contains atmospheric corrections.
     304             : // </synopsis>
     305             : //
     306             : // <example>
     307             : // <srcblock>
     308             : // </srcblock>
     309             : // </example>
     310             : //
     311             : // <motivation>
     312             : // Encapsulate TJones calibration main table data buffers.
     313             : // </motivation>
     314             : //
     315             : // <todo asof="01/08/01">
     316             : // (i) Deal with non-standard columns.
     317             : // </todo>
     318             : 
     319             : class TJonesMBuf : public SolvableVisJonesMBuf
     320             : {
     321             :  public:
     322             :   // Default constructor. No connection to an underlying
     323             :   // calibration table iterator in this case.
     324             :   TJonesMBuf();
     325             : 
     326             :   // Construct from a set of calibration buffer indices and
     327             :   // their specified values. Non-index columns will be set 
     328             :   // to default values, and there is no connection to an 
     329             :   // underlying calibration table iterator in this case.
     330             :   TJonesMBuf (const casacore::Vector<casacore::Int>& calIndices, 
     331             :               const casacore::Block<casacore::Vector<casacore::Int> >& indexValues);
     332             : 
     333             :   // Construct from a calibration table iterator. The calibration
     334             :   // buffer will remain synchronized with the iterator.
     335             :   TJonesMBuf (CalIterBase& calIter);
     336             : 
     337             :  protected:
     338             : 
     339             :  private:
     340             : };
     341             : 
     342             : 
     343             : } //# NAMESPACE CASA - END
     344             : 
     345             : #endif
     346             :    
     347             :   
     348             : 
     349             : 
     350             : 

Generated by: LCOV version 1.16