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 #ifndef MS_MSSIMULATOR_H
00029 #define MS_MSSIMULATOR_H
00030
00031
00032
00033 #include <casa/BasicSL/String.h>
00034 #include <casa/Arrays/Vector.h>
00035 #include <casa/Arrays/Matrix.h>
00036 #include <casa/Arrays/Cube.h>
00037 #include <casa/BasicSL/Complex.h>
00038 #include <casa/Quanta/Quantum.h>
00039 #include <measures/Measures/MPosition.h>
00040 #include <measures/Measures/MEpoch.h>
00041 namespace casa {
00042
00043
00044 class MeasurementSet;
00045 class MDirection;
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
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 class MSSimulator
00085 {
00086 public:
00087
00088
00089
00090 MSSimulator();
00091
00092
00093 MSSimulator(const MSSimulator & mss);
00094
00095
00096 ~MSSimulator();
00097
00098
00099
00100 MSSimulator & operator=(const MSSimulator &);
00101
00102
00103
00104
00105
00106
00107 void initAnt(const String& telname,
00108 const Vector<Double>& x,
00109 const Vector<Double>& y,
00110 const Vector<Double>& z,
00111 const Vector<Float>& dishDiameter,
00112 const Vector<String>& mount,
00113 const Vector<String>& name,
00114 const String& coordsystem,
00115 const MPosition& mRefLocation);
00116
00117
00118 void initFields(const uInt nSources,
00119 const Vector<String>& sourceName,
00120 const Vector<MDirection>& sourceDirection,
00121 const Vector<Int>& intsPerPointing,
00122 const Vector<Int>& mosPointingsX,
00123 const Vector<Int>& mosPointingsY,
00124 const Vector<Float>& mosSpacing);
00125
00126
00127
00128 void initFeeds(const String& mode);
00129
00130
00131 void initSpWindows(const uInt nSpWindows,
00132 const Vector<String>& spWindowName,
00133 const Vector<Int>& nChan,
00134 const Vector<Quantity>& startFreq,
00135 const Vector<Quantity>& freqInc,
00136 const Vector<Quantity>& freqRes,
00137 const Vector<String>& stokesString);
00138
00139 void setFractionBlockageLimit(const Double fraclimit)
00140 { fractionBlockageLimit_p = fraclimit; }
00141
00142 void setElevationLimit(const Quantity& ellimit)
00143 { elevationLimit_p = ellimit; }
00144
00145 void setAutoCorrelationWt(const Float autocorrwt)
00146 { autoCorrelationWt_p = autocorrwt; }
00147
00148 void setTimes(const Quantity& qIntegrationTime,
00149 const Quantity& qGapTime,
00150 const Bool useHourAngles,
00151 const Quantity& qStartTime,
00152 const Quantity& qStopTime,
00153 const MEpoch& qRefTime );
00154
00155
00156 void writeMS(const String& msname);
00157 void extendMS(MeasurementSet & ms);
00158
00159
00160 private:
00161
00162
00163 Int nSources_p, nSpWindows_p, nAnt_p, nFeed_p, nTimes_p;
00164 Double Tstart_p, Tend_p, Tint_p, Tgap_p;
00165 Quantity qIntegrationTime_p, qGapTime_p, qStartTime_p, qStopTime_p;
00166 MEpoch mRefTime_p;
00167 Bool useHourAngles_p;
00168
00169 Vector<Double> mosSpacing_p, startFreq_p, freqInc_p, freqRes_p,
00170 arrayXYZ_p, antDiam_p;
00171 Vector<Int> nChan_p, nIntFld_p, nIntSpW_p, nCorr_p, antId_p, feedAntId_p,
00172 feedId_p, feedSpWId_p, feedBeamId_p, feedNumRec_p;
00173 Matrix<Int> nMos_p,stokesTypes_p;
00174 Cube<Double> beamOffset_p;
00175 Cube<Complex> polResp_p;
00176 Vector<String> srcName_p, antName_p, mountType_p, spWindowName_p;
00177 Matrix<String> feedPol_p;
00178 Matrix<Double> radec_p, antXYZ_p, feedXYZ_p, feedAngle_p;
00179 MPosition refPosition_p;
00180 String radecRefFrame_p, telescope_p;
00181 Double fractionBlockageLimit_p;
00182 Quantity elevationLimit_p;
00183
00184 Float autoCorrelationWt_p;
00185
00186
00187
00188
00189
00190 void local2global(Vector<Double>& xReturned,
00191 Vector<Double>& yReturned,
00192 Vector<Double>& zReturned,
00193 const MPosition& mRefLocation,
00194 const Vector<Double>& xIn,
00195 const Vector<Double>& yIn,
00196 const Vector<Double>& zIn);
00197
00198 void longlat2global(Vector<Double>& xReturned,
00199 Vector<Double>& yReturned,
00200 Vector<Double>& zReturned,
00201 const MPosition& mRefLocation,
00202 const Vector<Double>& xIn,
00203 const Vector<Double>& yIn,
00204 const Vector<Double>& zIn);
00205
00206
00207
00208
00209
00210
00211
00212 void blockage(Double &fraction1, Double &fraction2,
00213 const Vector<Double>& uvw,
00214 const Double diam1, const Double diam2);
00215
00216 };
00217
00218
00219 }
00220
00221 #endif
00222
00223
00224
00225