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_PBMATH2DIMAGE_H
00030 #define SYNTHESIS_PBMATH2DIMAGE_H
00031
00032 #include <casa/aips.h>
00033 #include <synthesis/TransformMachines/PBMath2D.h>
00034 #include <images/Images/ImageInterface.h>
00035 #include <measures/Measures.h>
00036
00037 namespace casa {
00038
00039
00040 template<class T> class TempImage;
00041
00042 typedef SquareMatrix<Complex,2> mjJones2;
00043 typedef SquareMatrix<Complex,4> mjJones4;
00044 typedef SquareMatrix<Float,2> mjJones2F;
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
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100 class PBMath2DImage : public PBMath2D {
00101 public:
00102
00103 PBMath2DImage();
00104
00105
00106 PBMath2DImage(ImageInterface<Float>& reJonesImage);
00107 PBMath2DImage(ImageInterface<Float>& reJonesImage,
00108 ImageInterface<Float>& imJonesImage);
00109
00110 PBMath2DImage(const ImageInterface<Complex>& jonesImage);
00111
00112
00113
00114
00115
00116 PBMath2DImage& operator=(const PBMath2DImage& other);
00117
00118
00119 ~PBMath2DImage();
00120
00121
00122 PBMathInterface::PBClass whichPBClass() { return PBMathInterface::IMAGE; }
00123
00124
00125 void summary(Int nValues=0);
00126
00127 protected:
00128
00129 virtual ImageInterface<Complex>& apply(const ImageInterface<Complex>& in,
00130 ImageInterface<Complex>& out,
00131 const MDirection& sp,
00132 const Quantity parAngle,
00133 const BeamSquint::SquintType doSquint,
00134 Bool inverse,
00135 Bool conjugate,
00136 Int ipower,
00137 Float cutoff,
00138 Bool forward);
00139
00140 virtual ImageInterface<Float>& apply(const ImageInterface<Float>& in,
00141 ImageInterface<Float>& out,
00142 const MDirection& sp,
00143 const Quantity parAngle,
00144 const BeamSquint::SquintType doSquint,
00145 Float cutoff, Int ipower);
00146
00147 virtual SkyComponent& apply(SkyComponent& in,
00148 SkyComponent& out,
00149 const MDirection& sp,
00150 const Quantity frequency,
00151 const Quantity parAngle,
00152 const BeamSquint::SquintType doSquint,
00153 Bool inverse,
00154 Bool conjugate,
00155 Int ipower,
00156 Float cutoff,
00157 Bool forward);
00158
00159 virtual Int support(const CoordinateSystem& cs);
00160
00161
00162
00163 private:
00164
00165
00166 void checkJonesCongruent(ImageInterface<Float>& reJones,
00167 ImageInterface<Float>& imJones);
00168 void checkImageCongruent(ImageInterface<Float>& image);
00169
00170
00171
00172 void updateJones(const CoordinateSystem& coords,
00173 const IPosition& shape,
00174 const MDirection& pc,
00175 const Quantity& paAngle);
00176
00177
00178 void applyJones(const Array<Float>* reJones,
00179 const Array<Float>* imJones,
00180 const Array<Complex>& in,
00181 Array<Complex>& out,
00182 Vector<Int>& polmap,
00183 Bool inverse,
00184 Bool conjugate,
00185 Int ipower,
00186 Float cutoff,
00187 Bool circular=True,
00188 Bool forward=True);
00189
00190 void applyJonesFast(const Float*& reJones,
00191 const Float*& imJones,
00192 const Array<Complex>& in,
00193 Array<Complex>& out,
00194 Vector<Int>& polmap,
00195 Bool ,
00196 Bool ,
00197 Int ipower,
00198 Float ,
00199 Bool circular,
00200 Bool forward);
00201 void applyJonesFastX(const Float*& reJones,
00202 const Float*& imJones,
00203 const Complex*& in,
00204 Complex*& outstor,
00205 const Vector<Int>& polmap,
00206 Bool ,
00207 Bool ,
00208 Int ipower,
00209 Float ,
00210 Bool circular,
00211 Bool forward,
00212 const Int ix, const Int nx, const Int ny, const Int npol);
00213
00214
00215
00216 void applyJones(const Array<Float>* reJones,
00217 const Array<Float>* imJones,
00218 const Array<Float>& in,
00219 Array<Float>& out,
00220 Vector<Int>& polmap,
00221 Float cutoff,
00222 Bool circular=True);
00223
00224
00225 TempImage<Float>* reJonesImage_p;
00226 TempImage<Float>* reRegridJonesImage_p;
00227 TempImage<Float>* imJonesImage_p;
00228 TempImage<Float>* imRegridJonesImage_p;
00229
00230 Vector<Double>* incrementsReJones_p;
00231 Vector<Double>* incrementsImJones_p;
00232
00233 Vector<Double>* referencePixelReJones_p;
00234 Vector<Double>* referencePixelImJones_p;
00235
00236 Float pa_p;
00237 };
00238
00239
00240 }
00241
00242 #endif