00001 //# FJones.h: Declaration of Ionospheric corrections 00002 //# Copyright (C) 1996,1997,2000,2001,2002,2003,2011,2014 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be adressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# 00027 00028 #ifndef SYNTHESIS_FJONES_H 00029 #define SYNTHESIS_FJONES_H 00030 00031 #include <casa/aips.h> 00032 #include <casa/Containers/Record.h> 00033 #include <casa/BasicSL/Complex.h> 00034 #include <synthesis/MeasurementComponents/VisCal.h> 00035 #include <synthesis/MeasurementComponents/SolvableVisCal.h> 00036 //#include <synthesis/MeasurementComponents/CalCorruptor.h> 00037 00038 #include <measures/Measures/EarthMagneticMachine.h> 00039 00040 namespace casa { //# NAMESPACE CASA - BEGIN 00041 00042 class FJones : public SolvableVisJones { 00043 public: 00044 00045 // Constructor 00046 FJones(VisSet& vs); 00047 FJones(String msname,Int MSnAnt,Int MSnSpw); 00048 FJones(const MSMetaInfoForCal& msmc); 00049 // FJones(const Int& nAnt); // NYI 00050 00051 virtual ~FJones(); 00052 00053 // Return the type enum 00054 virtual Type type() { return VisCal::F; }; 00055 00056 // Return type name as string 00057 virtual String typeName() { return "F Jones"; }; 00058 virtual String longTypeName() { return "F Jones (Ionosphere)"; }; 00059 00060 // Report current Jones type (circ=diag, lin=general) 00061 Jones::JonesType jonesType() { return pjonestype_; }; 00062 00063 // Par is freq-INdep, but matrix is freq-dep 00064 virtual Bool freqDepPar() { return False; }; 00065 virtual Bool freqDepMat() { return True; }; 00066 00067 // We have Float parameters 00068 virtual VisCalEnum::VCParType parType() { return VisCalEnum::REAL; }; 00069 00070 // Local setapply to enforce calwt=F and spwmap=[0] for FJones 00071 virtual void setApply(const Record& apply); 00072 using SolvableVisJones::setApply; 00073 00074 // Report apply-related info 00075 String applyinfo(); 00076 00077 // Local specializations for TEC generation 00078 virtual void setSpecify(const Record& specify); 00079 virtual void specify(const Record& specify); 00080 00081 protected: 00082 00083 // FJones has one Float par per ant 00084 virtual Int nPar() { return 1; }; 00085 00086 // Jones matrix elements are NOT trivial 00087 virtual Bool trivialJonesElem() { return False; }; 00088 00089 // Access to z.a. data 00090 Vector<Double>& za() { return za_; }; 00091 00092 // Detect pol basis and some geometry 00093 virtual void syncMeta(const VisBuffer& vb); 00094 virtual void syncMeta2(const vi::VisBuffer2& vb); 00095 00096 // Calculate parameters (in this case, the z.a.) 00097 virtual void calcPar(); 00098 00099 // Calculate the FJones matrix for all ants 00100 virtual void calcAllJones(); 00101 00102 private: 00103 00104 // TEC specify/retrieval mode 00105 String tectype_; 00106 00107 // Field calculation components 00108 MeasFrame mframe_; 00109 EarthMagneticMachine *emm_; 00110 00111 // Fiducial ionosphere height 00112 Quantity ionhgt_; 00113 00114 // TEC image filename 00115 String tecimname_; 00116 00117 // zenith angle per antenna 00118 Vector<Double> za_; 00119 00120 // The magnetic field 00121 Vector<Double> BlosG_; 00122 00123 // Units 00124 Double radper_; 00125 00126 // Lin (general) or Circ (diag) 00127 Jones::JonesType pjonestype_; 00128 00129 // Measures geometry 00130 MDirection phasedir_p; 00131 ROScalarMeasColumn<MPosition> antpos_p; 00132 00133 }; 00134 00135 } //# NAMESPACE CASA - END 00136 00137 #endif 00138