BPoly.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef SYNTHESIS_BPOLY_H
00030 #define SYNTHESIS_BPOLY_H
00031
00032 #include <synthesis/MeasurementComponents/SolvableVisCal.h>
00033 #include <synthesis/MeasurementComponents/StandardVisCal.h>
00034
00035 namespace casa {
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 class VisEquation;
00071 class VisBuffGroupAcc;
00072
00073 class BJonesPoly : public BJones {
00074 public:
00075
00076
00077 BJonesPoly (VisSet& vs);
00078
00079
00080 virtual ~BJonesPoly() {};
00081
00082
00083 virtual Type type() { return VisCal::B; };
00084
00085
00086 virtual String typeName() { return "BPOLY"; };
00087 virtual String longTypeName() { return "B Jones Poly (bandpass)"; };
00088
00089
00090 virtual Bool useGenericGatherForSolve() { return True; };
00091
00092 virtual Bool useGenericSolveOne() { return False; };
00093
00094
00095 virtual Jones::JonesType jonesType() { return Jones::Diagonal; };
00096
00097
00098 using BJones::setSolve;
00099 virtual void setSolve(const Record& solvepar);
00100
00101
00102 using BJones::setApply;
00103 virtual void setApply(const Record& applypar);
00104
00105
00106
00107
00108
00109 virtual void selfSolveOne(VisBuffGroupAcc& vbga);
00110
00111
00112 protected:
00113
00114
00115 virtual Int nPar() { return 2; };
00116
00117
00118 virtual void calcPar();
00119
00120 virtual void loadMemCalTable (String applyTable,String field);
00121
00122 private:
00123
00124
00125 VisSet* vs_p;
00126
00127
00128 Int degamp_p, degphase_p;
00129 Bool visnorm_p;
00130 Int maskcenter_p;
00131 Float maskedge_p;
00132
00133
00134
00135 Int maskcenterHalf_p;
00136
00137 Float maskedgeFrac_p;
00138
00139
00140 Double solTimeStamp;
00141 Int solSpwId;
00142 Int solFldId;
00143
00144
00145 Vector<Int> calDescId_p;
00146
00147
00148 Bool maskedChannel (const Int& chan, const Int& nChan);
00149
00150
00151
00152 void updateCalTable (const String& freqGrpName,
00153 const Vector<Int>& antennaId,
00154 const Vector<String>& polyType,
00155 const Vector<Complex>& scaleFactor,
00156 const Matrix<Double>& validDomain,
00157 const Matrix<Double>& polyCoeffAmp,
00158 const Matrix<Double>& polyCoeffPhase,
00159 const Vector<String>& phaseUnits,
00160 const Vector<Complex>& sideBandRef,
00161 const Vector<MFrequency>& refFreq,
00162 const Vector<Int>& refAnt);
00163
00164
00165 Double getChebVal (const Vector<Double>& coeff, const Double& xinit,
00166 const Double& xfinal, const Double& x);
00167
00168
00169
00170
00171
00172
00173
00174 Double meanFrequency (const Vector<Int>& spwids);
00175
00176
00177 String freqGrpName (const Int& spwId);
00178
00179
00180 Vector<Int> spwIdsInGroup (const String& freqGrpName);
00181
00182
00183 Vector<Double> freqAxis (const Int& spwId);
00184
00185 void plotsolve2(const Vector<Double>& x,
00186 const Matrix<Double>& ampdata,
00187 const Matrix<Double>& phadata,
00188 const Matrix<Double>& wtdata,
00189 const Vector<Int>& ant1idx, const Vector<Int>& ant2idx,
00190 const Vector<Double>& amperr, Matrix<Double>& ampcoeff,
00191 const Vector<Double>& phaerr, Matrix<Double>& phacoeff) ;
00192
00193 };
00194
00195
00196 }
00197
00198 #endif