//# BJonesMBuf.h: BJones calibration main table buffer //# Copyright (C) 1996,1997,1998,2001,2002,2003 //# Associated Universities, Inc. Washington DC, USA. //# //# This library is free software; you can redistribute it and/or modify it //# under the terms of the GNU Library General Public License as published by //# the Free Software Foundation; either version 2 of the License, or (at your //# option) any later version. //# //# This library is distributed in the hope that it will be useful, but WITHOUT //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public //# License for more details. //# //# You should have received a copy of the GNU Library General Public License //# along with this library; if not, write to the Free Software Foundation, //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# //# Correspondence concerning AIPS++ should be adressed as follows: //# Internet email: aips2-request@nrao.edu. //# Postal address: AIPS++ Project Office //# National Radio Astronomy Observatory //# 520 Edgemont Road //# Charlottesville, VA 22903-2475 USA //# //# //# $Id$ #ifndef CALIBRATION_BJONESMBUF_H #define CALIBRATION_BJONESMBUF_H #include #include #include #include namespace casa { //# NAMESPACE CASA - BEGIN // // BJonesMBuf: BJones calibration main table buffer // // // // //
  • CalMainBuffer module //
  • SolvableVisJonesMBuf module // // // // From "BJones matrix", "cal main table" and "buffer" // // // // The BJonesMBuf class holds a buffer, optionally connected to a // BJones calibration main table iterator (of base type CalIterBase). // The BJones matrix contains bandpass correction terms. // // // // // // // // // Encapsulate BJones calibration main table data buffers. // // // // (i) Deal with non-standard columns. // class BJonesMBuf : public SolvableVisJonesMBuf { public: // Default constructor. No connection to an underlying // calibration table iterator in this case. BJonesMBuf(); // Construct from a set of calibration buffer indices and // their specified values. Non-index columns will be set // to default values, and there is no connection to an // underlying calibration table iterator in this case. BJonesMBuf (const casacore::Vector& calIndices, const casacore::Block >& indexValues); // Construct from a calibration table iterator. The calibration // buffer will remain synchronized with the iterator. BJonesMBuf (CalIterBase& calIter); protected: private: }; // // BJonesPolyMBuf: BJonesPoly calibration main table buffer // // // // //
  • CalMainBuffer module //
  • SolvableVisJonesMBuf module // // // // From "BJonesPoly matrix", "cal main table" and "buffer" // // // // The BJonesPolyMBuf class holds a buffer, optionally connected to a // BJonesPoly calibration main table iterator (of base type CalIterBase). // The BJonesPoly matrix contains bandpass correction terms. // // // // // // // // // Encapsulate BJonesPoly calibration main table data buffers. // // // // (i) Deal with non-standard columns. // class BJonesPolyMBuf : public BJonesMBuf { public: // Default constructor. No connection to an underlying // calibration table iterator in this case. BJonesPolyMBuf(); // Construct from a set of calibration buffer indices and // their specified values. Non-index columns will be set // to default values, and there is no connection to an // underlying calibration table iterator in this case. BJonesPolyMBuf (const casacore::Vector& calIndices, const casacore::Block >& indexValues); // Construct from a calibration table iterator. The calibration // buffer will remain synchronized with the iterator. BJonesPolyMBuf (CalIterBase& calIter); // Write the current buffer at the end of a specified cal table virtual casacore::Int append (CalTable& calTable); // Maximum number of rows in the calibration buffer virtual casacore::Int nRow(); // Update the parametrized solution for a given antenna id. virtual casacore::Bool putAntGain (const casacore::Int& antennaId, const casacore::String& sFreqGrpName, const casacore::String& sPolyType, const casacore::Complex& sScaleFactor, const casacore::Vector& sValidDomain, const casacore::Int& sNPolyAmp, const casacore::Int& sNPolyPhase, const casacore::Vector& sPolyCoeffAmp, const casacore::Vector& sPolyCoeffPhase, const casacore::String& sPhaseUnits, const casacore::Complex& sSideBandRef, const casacore::MFrequency& sRefFreq, const casacore::Int& sRefAnt); // casacore::Data field accessors casacore::Vector& polyType(); casacore::Vector& polyMode(); casacore::Vector& scaleFactor(); casacore::Array& validDomain(); casacore::Vector& nPolyAmp(); casacore::Vector& nPolyPhase(); casacore::Array& polyCoeffAmp(); casacore::Array& polyCoeffPhase(); casacore::Vector& phaseUnits(); casacore::Vector& sideBandRef(); protected: // Factory method to create a columns accessor object of the // appropriate type virtual BJonesPolyMCol* newCalMainCol (CalTable& calTable) { return new BJonesPolyMCol(dynamic_cast(calTable));}; // Access to the columns accessor object virtual BJonesPolyMCol* calMainCol() {return dynamic_cast(CalMainBuffer::calMainCol());}; // Invalidate the current cache. virtual void invalidate(); // // Fill the BJonesPoly cal buffer attribute columns in an empty // cal buffer, to extend the inherited method fillAttributes. The // cal indices, specified as enums from class MSCalEnums, are excluded // as non-attribute columns. // // Use a visibility buffer to define the attribute values (NYI) virtual void fillAttributes(const casacore::Vector& /*calIndices*/, const VisBuffer& /*vb*/) {}; // // Set default attribute values virtual void fillAttributes(const casacore::Vector& calIndices); // private: // Buffer fields casacore::Vector polyType_p; casacore::Vector polyMode_p; casacore::Vector scaleFactor_p; casacore::Array validDomain_p; casacore::Vector nPolyAmp_p; casacore::Vector nPolyPhase_p; casacore::Array polyCoeffAmp_p; casacore::Array polyCoeffPhase_p; casacore::Vector phaseUnits_p; casacore::Vector sideBandRef_p; // Buffer field status flags casacore::Bool polyTypeOK_p; casacore::Bool polyModeOK_p; casacore::Bool scaleFactorOK_p; casacore::Bool validDomainOK_p; casacore::Bool nPolyAmpOK_p; casacore::Bool nPolyPhaseOK_p; casacore::Bool polyCoeffAmpOK_p; casacore::Bool polyCoeffPhaseOK_p; casacore::Bool phaseUnitsOK_p; casacore::Bool sideBandRefOK_p; }; } //# NAMESPACE CASA - END #endif