Line data Source code
1 : //# FJones.h: Declaration of Ionospheric corrections 2 : //# Copyright (C) 1996,1997,2000,2001,2002,2003,2011,2014 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_FJONES_H 29 : #define SYNTHESIS_FJONES_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/CalCorruptor.h> 37 : 38 : #include <casacore/measures/Measures/EarthMagneticMachine.h> 39 : 40 : namespace casa { //# NAMESPACE CASA - BEGIN 41 : 42 : class FJones : public SolvableVisJones { 43 : public: 44 : 45 : // Constructor 46 : FJones(VisSet& vs); 47 : FJones(casacore::String msname,casacore::Int MSnAnt,casacore::Int MSnSpw); 48 : FJones(const MSMetaInfoForCal& msmc); 49 : 50 : virtual ~FJones(); 51 : 52 : // Return the type enum 53 0 : virtual Type type() { return VisCal::F; }; 54 : 55 : // Return type name as string 56 2 : virtual casacore::String typeName() { return "F Jones"; }; 57 0 : virtual casacore::String longTypeName() { return "F Jones (Ionosphere)"; }; 58 : 59 : // Report current Jones type (circ=diag, lin=general) 60 0 : Jones::JonesType jonesType() { return pjonestype_; }; 61 : 62 : // Par is freq-INdep, but matrix is freq-dep 63 2 : virtual casacore::Bool freqDepPar() { return false; }; 64 0 : virtual casacore::Bool freqDepMat() { return true; }; 65 : 66 : // We have casacore::Float parameters 67 169 : virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; }; 68 : 69 : // Local setapply to enforce calwt=F and spwmap=[0] for FJones 70 : virtual void setApply(const casacore::Record& apply); 71 : using SolvableVisJones::setApply; 72 : 73 : // Report apply-related info 74 : casacore::String applyinfo(); 75 : 76 : // Local specializations for TEC generation 77 : virtual void setSpecify(const casacore::Record& specify); 78 : virtual void specify(const casacore::Record& specify); 79 : 80 : protected: 81 : 82 : // FJones has one casacore::Float par per ant 83 8 : virtual casacore::Int nPar() { return 1; }; 84 : 85 : // Jones matrix elements are NOT trivial 86 0 : virtual casacore::Bool trivialJonesElem() { return false; }; 87 : 88 : // Access to z.a. data 89 1745 : casacore::Vector<casacore::Double>& za() { return za_; }; 90 : 91 : // Detect pol basis and some geometry 92 : virtual void syncMeta(const VisBuffer& vb); 93 : virtual void syncMeta2(const vi::VisBuffer2& vb); 94 : 95 : // Calculate parameters (in this case, the z.a.) 96 : virtual void calcPar(); 97 : 98 : // Calculate the FJones matrix for all ants 99 : virtual void calcAllJones(); 100 : 101 : private: 102 : 103 : // TEC specify/retrieval mode 104 : casacore::String tectype_; 105 : 106 : // Field calculation components 107 : casacore::MeasFrame mframe_; 108 : casacore::EarthMagneticMachine *emm_; 109 : 110 : // Fiducial ionosphere height 111 : casacore::Quantity ionhgt_; 112 : 113 : // TEC image filename 114 : casacore::String tecimname_; 115 : 116 : // zenith angle per antenna 117 : casacore::Vector<casacore::Double> za_; 118 : 119 : // The magnetic field 120 : casacore::Vector<casacore::Double> BlosG_; 121 : 122 : // Units 123 : casacore::Double radper_; 124 : 125 : // Lin (general) or Circ (diag) 126 : Jones::JonesType pjonestype_; 127 : 128 : // Measures geometry 129 : casacore::MDirection phasedir_p; 130 : casacore::ROScalarMeasColumn<casacore::MPosition> antpos_p; 131 : 132 : }; 133 : 134 : } //# NAMESPACE CASA - END 135 : 136 : #endif 137 :