LCOV - code coverage report
Current view: top level - synthesis/CalTables - CalBuffer.h (source / functions) Hit Total Coverage
Test: casacpp_coverage.info Lines: 0 1 0.0 %
Date: 2024-10-10 15:00:01 Functions: 0 1 0.0 %

          Line data    Source code
       1             : //# CalBuffer.h: Calibration table buffer
       2             : //# Copyright (C) 1996,1997,1998,2001,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_CALBUFFER_H
      30             : #define CALIBRATION_CALBUFFER_H
      31             : 
      32             : #include <synthesis/CalTables/CalIterBase.h>
      33             : #include <synthesis/CalTables/CalTable.h>
      34             : #include <synthesis/CalTables/CalMainColumns.h>
      35             : 
      36             : namespace casa { //# NAMESPACE CASA - BEGIN
      37             : 
      38             : // <summary> 
      39             : // CalBuffer: Calibration table buffer
      40             : // </summary>
      41             : 
      42             : // <use visibility=export>
      43             : 
      44             : // <reviewed reviewer="" date="" tests="" demos="">
      45             : 
      46             : // <prerequisite>
      47             : //   <li> <linkto class="CalTable">CalTable</linkto> module
      48             : //   <li> <linkto class="CalIterBase">CalIterBase</linkto> module
      49             : // </prerequisite>
      50             : //
      51             : // <etymology>
      52             : // From "calibration table" and "buffer"
      53             : // </etymology>
      54             : //
      55             : // <synopsis>
      56             : // The CalBuffer class holds a buffer, optinally connected to a 
      57             : // calibration table iterator (as derived from CalIterBase). 
      58             : // Specializations for baseline-based, time-variable and solvable 
      59             : // VisJones calibration table formats are provided through 
      60             : // inheritance.
      61             : // </synopsis>
      62             : //
      63             : // <example>
      64             : // <srcblock>
      65             : // </srcblock>
      66             : // </example>
      67             : //
      68             : // <motivation>
      69             : // Encapsulate calibration table data buffers.
      70             : // </motivation>
      71             : //
      72             : // <todo asof="01/08/01">
      73             : // (i) Deal with non-standard columns.
      74             : // </todo>
      75             : 
      76             : class CalBuffer 
      77             : {
      78             :  public:
      79             :   // Default constructor. No connection to an underlying
      80             :   // calibration table iterator in this case.
      81             :   CalBuffer();
      82             : 
      83             :   // Construct from a calibration table iterator. The calibration
      84             :   // buffer will remain synchronized with the iterator.
      85             :   CalBuffer (CalIterBase& calIter);
      86             : 
      87             :   // Default destructor
      88             :   virtual ~CalBuffer();
      89             : 
      90             :   // Invalidate the current calibration buffer. This signals
      91             :   // that a re-read is required as the iterator has advanced.
      92             :   virtual void invalidate();
      93             : 
      94             :   // Write the current buffer at the end of a specified cal table (NYI)
      95           0 :   virtual void append (CalTable& /*calTable*/) {};
      96             : 
      97             :   // casacore::Data field accessors
      98             :   casacore::Vector<casacore::Double>& time();
      99             :   //  casacore::Vector<casacore::MEpoch>& timeMeas();
     100             :   casacore::Vector<casacore::Double>& timeEP();
     101             :   casacore::Vector<casacore::Double>& interval();
     102             :   casacore::Vector<casacore::Int>& antenna1();
     103             :   casacore::Vector<casacore::Int>& feed1();
     104             :   casacore::Vector<casacore::Int>& fieldId();
     105             :   casacore::Vector<casacore::Int>& arrayId();
     106             :   casacore::Vector<casacore::Int>& obsId();
     107             :   casacore::Vector<casacore::Int>& scanNo();
     108             :   casacore::Vector<casacore::Int>& processorId();
     109             :   casacore::Vector<casacore::Int>& stateId();
     110             :   casacore::Vector<casacore::Int>& phaseId();
     111             :   casacore::Vector<casacore::Int>& pulsarBin();
     112             :   casacore::Vector<casacore::Int>& pulsarGateId();
     113             :   casacore::Vector<casacore::Int>& freqGrp();
     114             :   casacore::Vector<casacore::String>& freqGrpName();
     115             :   casacore::Vector<casacore::String>& fieldName();
     116             :   casacore::Vector<casacore::String>& fieldCode();
     117             :   casacore::Vector<casacore::String>& sourceName();
     118             :   casacore::Vector<casacore::String>& sourceCode();
     119             :   casacore::Vector<casacore::Int>& calGrp();
     120             :   casacore::Array<casacore::Complex>& gain();
     121             :   casacore::Array<casacore::Int>& refAnt();
     122             :   casacore::Array<casacore::Int>& refFeed();
     123             :   casacore::Array<casacore::Int>& refReceptor();
     124             :   casacore::Array<casacore::Double>& refFreq();
     125             :   casacore::Vector<casacore::Int>& measFreqRef();
     126             :   casacore::Array<casacore::Double>& refDir();
     127             :   casacore::Vector<casacore::Int>& measDirRef();
     128             :   casacore::Vector<casacore::Int>& calDescId();
     129             :   casacore::Vector<casacore::Int>& calHistoryId(); 
     130             : 
     131             :  protected:
     132             : 
     133             :  private:
     134             :   // true if connected to underlying iterator
     135             :   casacore::Bool connectedToIter_p;
     136             : 
     137             :   // Ptr to cal main columns accessor
     138             :   CalMainColumns* calMainCol_p;
     139             : 
     140             :   // Buffer fields
     141             :   casacore::Vector<casacore::Double> time_p;
     142             :   casacore::Vector<casacore::MEpoch> timeMeas_p;
     143             :   casacore::Vector<casacore::Double> timeEP_p;
     144             :   casacore::Vector<casacore::Double> interval_p;
     145             :   casacore::Vector<casacore::Int> antenna1_p;
     146             :   casacore::Vector<casacore::Int> feed1_p;
     147             :   casacore::Vector<casacore::Int> fieldId_p;
     148             :   casacore::Vector<casacore::Int> arrayId_p;
     149             :   casacore::Vector<casacore::Int> obsId_p;
     150             :   casacore::Vector<casacore::Int> scanNo_p;
     151             :   casacore::Vector<casacore::Int> processorId_p;
     152             :   casacore::Vector<casacore::Int> stateId_p;
     153             :   casacore::Vector<casacore::Int> phaseId_p;
     154             :   casacore::Vector<casacore::Int> pulsarBin_p;
     155             :   casacore::Vector<casacore::Int> pulsarGateId_p;
     156             :   casacore::Vector<casacore::Int> freqGrp_p;
     157             :   casacore::Vector<casacore::String> freqGrpName_p;
     158             :   casacore::Vector<casacore::String> fieldName_p;
     159             :   casacore::Vector<casacore::String> fieldCode_p;
     160             :   casacore::Vector<casacore::String> sourceName_p;
     161             :   casacore::Vector<casacore::String> sourceCode_p;
     162             :   casacore::Vector<casacore::Int> calGrp_p;
     163             :   casacore::Array<casacore::Complex> gain_p;
     164             :   casacore::Array<casacore::Int> refAnt_p;
     165             :   casacore::Array<casacore::Int> refFeed_p;
     166             :   casacore::Array<casacore::Int> refReceptor_p;
     167             :   casacore::Array<casacore::Double> refFreq_p;
     168             :   casacore::Vector<casacore::Int> measFreqRef_p;
     169             :   casacore::Array<casacore::Double> refDir_p;
     170             :   casacore::Vector<casacore::Int> measDirRef_p;
     171             :   casacore::Vector<casacore::Int> calDescId_p;
     172             :   casacore::Vector<casacore::Int> calHistoryId_p;
     173             : 
     174             :   // Buffer field status flags
     175             :   casacore::Bool timeOK_p;
     176             :   casacore::Bool timeMeasOK_p;
     177             :   casacore::Bool timeEPOK_p;
     178             :   casacore::Bool intervalOK_p;
     179             :   casacore::Bool antenna1OK_p;
     180             :   casacore::Bool feed1OK_p;
     181             :   casacore::Bool fieldIdOK_p;
     182             :   casacore::Bool arrayIdOK_p;
     183             :   casacore::Bool obsIdOK_p;
     184             :   casacore::Bool scanNoOK_p;
     185             :   casacore::Bool processorIdOK_p;
     186             :   casacore::Bool stateIdOK_p;
     187             :   casacore::Bool phaseIdOK_p;
     188             :   casacore::Bool pulsarBinOK_p;
     189             :   casacore::Bool pulsarGateIdOK_p;
     190             :   casacore::Bool freqGrpOK_p;
     191             :   casacore::Bool freqGrpNameOK_p;
     192             :   casacore::Bool fieldNameOK_p;
     193             :   casacore::Bool fieldCodeOK_p;
     194             :   casacore::Bool sourceNameOK_p;
     195             :   casacore::Bool sourceCodeOK_p;
     196             :   casacore::Bool calGrpOK_p;
     197             :   casacore::Bool gainOK_p;
     198             :   casacore::Bool refAntOK_p;
     199             :   casacore::Bool refFeedOK_p;
     200             :   casacore::Bool refReceptorOK_p;
     201             :   casacore::Bool refFreqOK_p;
     202             :   casacore::Bool measFreqRefOK_p;
     203             :   casacore::Bool refDirOK_p;
     204             :   casacore::Bool measDirRefOK_p;
     205             :   casacore::Bool calDescIdOK_p;
     206             :   casacore::Bool calHistoryIdOK_p;
     207             : };
     208             : 
     209             : 
     210             : } //# NAMESPACE CASA - END
     211             : 
     212             : #endif
     213             :    
     214             :   
     215             : 
     216             : 
     217             : 

Generated by: LCOV version 1.16