casa
$Rev:20696$
|
00001 //# MeasurementEquations.h: The MeasurementEquations module 00002 //# Copyright (C) 1996,1997,1999 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 //# $Id$ 00028 00029 #ifndef SYNTHESIS_MEASUREMENTEQUATIONS_H 00030 #define SYNTHESIS_MEASUREMENTEQUATIONS_H 00031 00032 #include <synthesis/MeasurementEquations/VisEquation.h> 00033 #include <synthesis/MeasurementEquations/SkyEquation.h> 00034 #include <msvis/MSVis/VisibilityIterator.h> 00035 #include <msvis/MSVis/VisSet.h> 00036 00037 namespace casa { //# NAMESPACE CASA - BEGIN 00038 00039 //<module> 00040 00041 // <summary> 00042 // MeasurementEquations express how synthesis measurements are made 00043 // </summary> 00044 00045 // <use visibility=export> 00046 00047 // <reviewed reviewer="" date="" tests="" demos=""> 00048 00049 // <prerequisite> 00050 // <li> <linkto module="MeasurementSets">MeasurementSets</linkto> 00051 // </prerequisite> 00052 // 00053 // <etymology> 00054 // Measurement Equation describes a model for measurements from a 00055 // generic radio telescope. 00056 // </etymology> 00057 // 00058 // <synopsis> 00059 // Synthesis processing in AIPS++ is implemented using the 00060 // measurement equation due to Hamaker, Bregman and Sault and later 00061 // extended by Noordam, and Cornwell. The HBS measurement equation 00062 // expresses the measured visibility in terms of Jones matrices and 00063 // other components. A Jones matrix is a two by two complex matrix 00064 // that describes how two orthogonal senses of polarization are 00065 // affected by an element in a measurement system. In the HBS 00066 // formulation of synthesis processing, the antenna is described by a 00067 // compound Jones matrix formed from a product each element of which 00068 // represents a different physical effect: 00069 // 00070 // J = G D C E P T F K 00071 // 00072 // The measured visibility from a radio telescope is then 00073 // given by: 00074 // 00075 // V_i,j=X_i,j (M_i,j integral directProduct(J_i, Conjugate(J_j)) S I + A_i,j) 00076 // 00077 // where the elements in the equation are 00078 // 00079 // <ul> 00080 // <li> M is the 4 by 4 complex closure error matrix 00081 // <li> K is the Fourier phase Factor Jones matrix 00082 // <li> G is the antenna gain Jones matrix 00083 // <li> D is the polarization leakage Jones matrix 00084 // <li> C is the configuration Jones matrix 00085 // <li> E is the electric field pattern Jones matrix 00086 // <li> P is the receptor position angle Jones matrix 00087 // <li> T is the atmospheric gain Jones matrix 00088 // <li> F is the Faraday rotation Jones matrix 00089 // <li> A is the complex additive component 00090 // <li> X is the non-linear correlator function 00091 // <li> S is the Stokes conversion matrix 00092 // <li> I is the (real) sky brightness 4-vector 00093 // </ul> 00094 // 00095 // and the integral is over time, frequency, sky position. The direct 00096 // product of two 2 by 2 matrices gives a 4 by 4 matrix in which every 00097 // possible product of the 2 by 2 matrix elements appears. 00098 // 00099 // Manipulation of the equation in this form is possible but is much 00100 // too expensive for most uses so we break it down into two parts and 00101 // also use a special machine for the Fourier summation. This loses 00102 // some generality but makes the use of the HBS measurement equation 00103 // feasible. 00104 // 00105 // The split is such that the class 00106 // <linkto class="VisEquation ">VisEquation </linkto> 00107 // expresses the visibility-plane part of the ME: 00108 // 00109 // J = G D C P 00110 // 00111 // where the visibility is 00112 // V_i,j=X_i,j (M_i,j integral directProduct(J_i, Conjugate(J_j)) Vsky_i,j 00113 // + A_i,j) 00114 // and the integral is over time, frequency. 00115 // 00116 // and the class <linkto class="SkyEquation ">SkyEquation </linkto> 00117 // expresses the sky-plane part of the ME: 00118 // 00119 // J = E T F K 00120 // 00121 // Vsky_i,j=integral directProduct(J_i, Conjugate(J_j)) S I and the 00122 // integral is over time, frequency, sky position. 00123 // 00124 // The last integral (over K) amounts to a Fourier transform and so 00125 // the SkyEquation is given FT machines to use for this purpose. Note 00126 // that we have chosen to move the position of the parallactic angle 00127 // term. This has been done for expediency but will lead to some 00128 // difficulties in difficult cases. 00129 // 00130 // The terms G, D, C, etc, are represented by the classes in the 00131 // module <linkto 00132 // module="MeasurementComponents">MeasurementComponents</linkto>. 00133 // This classes can typically do two basic things: apply a correction 00134 // to a <linkto class="VisBuffer">VisBuffer</linkto> (which is a 00135 // holder of a chunk of visibility data), and solve for its own 00136 // internal parameters. Solution is accomplished using gradients of 00137 // chi-squared obtained via standard services of the 00138 // MeasurementEquation. 00139 // 00140 // The SkyBrightness is modelled by a special type of 00141 // MeasurementComponent called a <linkto class="SkyModel">SkyModel</linkto>. This has an interface to the 00142 // SkyEquation via a <linkto class="PagedImage">PagedImage</linkto>. 00143 // 00144 // Another type of <linkto module="MeasurementComponents">MeasurementComponent</linkto> is the 00145 // Fourier transform machine <linkto 00146 // class="FTMachine">FTMachine</linkto> which is used for performing 00147 // forward and inverse Fourier transforms. The class <linkto 00148 // class="GridFT">GridFT</linkto> implements a straightforward grid 00149 // and degrid FFT-based Fourier transform. We anticipate that other 00150 // FTMachines will be needed for e.g. wide-field imaging. 00151 // 00152 // Visibility Data is held in a 00153 // <linkto module="MeasurementSets">MeasurementSet</linkto>. 00154 // To expedite processing, we use a 00155 // <linkto class="VisibilityIterator">VisibilityIterator</linkto> 00156 // (found in msvis/) 00157 // to iterate through the MeasurementSet as needed. Setting up the 00158 // iterator is relatively expensive so we store the iterator 00159 // in a <linkto class="VisSet">VisSet</linkto> (also found in this 00160 // module). Thus one should 00161 // construct a <linkto class="VisSet">VisSet</linkto> and then 00162 // use the iterator method to retrieve the iterator. Once 00163 // one has a VisibilityIterator, it can be used to access the 00164 // actual visibility data in chunk by using the 00165 // <linkto class="VisBuffer">VisBuffer</linkto> (also in this 00166 // module). 00167 // This scheme may seem baroque but it is needed to cut down on 00168 // superfluous otherhead of various types. 00169 // </synopsis> 00170 // 00171 // <example> 00172 // <srcblock> 00173 // // Create a VisSet from a MeasurementSet on disk 00174 // VisSet vs("3c84.MS"); 00175 // 00176 // // Now make an FTMachine with a 2048 by 2048 00177 // // complex pixel cache of 16 by 16 tiles, 00178 // // using Spheriodal Function gridding 00179 // GridFT ft(2048*2048, 16, "SF") 00180 // 00181 // // Create an ImageSkyModel from an image on disk 00182 // PagedImage<Float> im("3c84.modelImage")); 00183 // ImageSkyModel ism(im); 00184 // 00185 // // For the imaging, we need a SkyEquation and 00186 // // an FTMachine 00187 // SkyEquation se(vs, ft); 00188 // 00189 // // Predict the visibility set for the model 00190 // se.predict(); 00191 // 00192 // // Make a VisEquation 00193 // VisEquation ve(vs); 00194 // 00195 // // Solve for calibration of G matrix every 5 minutes 00196 // GJones gj(vs, 5*60); 00197 // ve.solve(gj); 00198 // 00199 // // Solve for calibration of D matrix every 12 hours 00200 // DJones dj(vs, 12*60*60); 00201 // ve.solve(dj); 00202 // 00203 // // Now use the SkyEquaton to make a Clean Image 00204 // HogbomCleanImageSkyModel csm(ism); 00205 // if (se.solve(csm)) { 00206 // Image<StokesVector> cleanImage=csm.getImage(); 00207 // cleanImage.setName("3c84.cleanImage"); 00208 // } 00209 // 00210 // </srcblock> 00211 // </example> 00212 // 00213 // <motivation> 00214 // MeasurementEquations are needed to encapsulate the measurement 00215 // equations for linear systems, and both single dish and synthesis 00216 // observations. The idea is 00217 // that the structure of many calibration and imaging algorithms is much 00218 // the same for many different types of telescope. MeasurementEquations 00219 // are part of a framework of classes that are designed for synthesis and 00220 // single dish imaging. The others are the <linkto 00221 // module=MeasurementComponents>MeasurementComponents</linkto>. 00222 //</motivation> 00223 // 00224 // <todo asof=""> 00225 // <li> Implement SkyJones 00226 // <li> Multiple images in SkyModel/SkyEquation 00227 // <li> Derive special SkyEquation for SD 00228 // <li> Move LinearEquation and LinearModel into separate modules 00229 // </todo> 00230 00231 // </module> 00232 00233 } //# NAMESPACE CASA - END 00234 00235 #endif