Line data Source code
1 : //# EVLASwPow.h: Declaration of EVLA Switched Power 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_EVLASWPOW_H 29 : #define SYNTHESIS_EVLASWPOW_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 : 38 : namespace casa { //# NAMESPACE CASA - BEGIN 39 : 40 : // Forward declarations 41 : class VisEquation; 42 : 43 : 44 : // ********************************************************** 45 : // EVLA switched power Gain and Tsys 46 : // 47 : 48 : 49 : class EVLASwPow : public GJones { 50 : public: 51 : 52 : enum SPType{SWPOW,EVLAGAIN=SWPOW,RQ,SWPOVERRQ,NONE}; 53 : 54 : static SPType sptype(casacore::String name); 55 : static casacore::String sptype(SPType sptype); 56 : 57 : // Constructor 58 : EVLASwPow(VisSet& vs); 59 : EVLASwPow(casacore::String msname,casacore::Int MSnAnt,casacore::Int MSnSpw); 60 : EVLASwPow(const MSMetaInfoForCal& msmc); 61 : EVLASwPow(const casacore::Int& nAnt); 62 : 63 : virtual ~EVLASwPow(); 64 : 65 : // Return the type enum (for now, pretend we are G) 66 0 : virtual Type type() { return VisCal::G; }; 67 : 68 : // EVLA Gain and Tsys are casacore::Float parameters 69 0 : virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; }; 70 : 71 : // Return type name as string (ditto) 72 0 : virtual casacore::String typeName() { return "G EVLASWPOW"; }; 73 0 : virtual casacore::String longTypeName() { return "G EVLASWPOW (Switched-power gain)"; }; 74 : 75 : // Local setSpecify 76 : using GJones::setSpecify; 77 : virtual void setSpecify(const casacore::Record& specify); 78 : 79 : // Specific specify() that reads the SYSCAL subtable 80 : virtual void specify(const casacore::Record& specify); 81 : 82 : // In general, we are freq-dep 83 0 : virtual casacore::Bool freqDepPar() { return false; }; 84 : 85 : 86 : protected: 87 : 88 : // There are 4 parameters (Gain and Tsys for each pol) 89 0 : virtual casacore::Int nPar() { return 4; }; 90 : 91 : // The parameter array is not (just) the Jones matrix element array 92 0 : virtual casacore::Bool trivialJonesElem() { return false; }; 93 : 94 : // Calculate Jones matrix elements (slice out the gains) 95 : virtual void calcAllJones(); 96 : 97 : // Synchronize the weight-scaling factors 98 : // Weights are multiplied by 1/Tsys(K) per antenna 99 : virtual void syncWtScale(); 100 : 101 : // Experimenting with updateWt 102 : //virtual void updateWt(casacore::Matrix<casacore::Float>& wt,const casacore::Int& a1,const casacore::Int& a2); 103 : 104 : private: 105 : 106 : // Fill the Tcals from the CALDEVICE table 107 : void fillTcals(); 108 : 109 : // The name of the SYSCAL table 110 : casacore::String sysPowTabName_,calDevTabName_; 111 : 112 : // Tcal storage 113 : casacore::Cube<casacore::Float> tcals_; 114 : 115 : // Digital factors for the EVLA 116 : casacore::Float correff_; // net corr efficiency (lossy) 117 : casacore::Float frgrotscale_; // fringe rotation scale (lossless) 118 : //casacore::Float nyquist_; // 2*dt*dv 119 : 120 : // Effective per-chan BW, per spw for weight calculation 121 : casacore::Vector<casacore::Double> effChBW_; 122 : 123 : }; 124 : 125 : 126 : 127 : 128 : } //# NAMESPACE CASA - END 129 : 130 : #endif 131 :