casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MeasurementEquations.h
Go to the documentation of this file.
1 //# MeasurementEquations.h: The MeasurementEquations module
2 //# Copyright (C) 1996,1997,1999
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be adressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //# $Id$
28 
29 #ifndef SYNTHESIS_MEASUREMENTEQUATIONS_H
30 #define SYNTHESIS_MEASUREMENTEQUATIONS_H
31 
35 #include <msvis/MSVis/VisSet.h>
36 
37 namespace casa { //# NAMESPACE CASA - BEGIN
38 
39 //<module>
40 
41 // <summary>
42 // MeasurementEquations express how synthesis measurements are made
43 // </summary>
44 
45 // <use visibility=export>
46 
47 // <reviewed reviewer="" date="" tests="" demos="">
48 
49 // <prerequisite>
50 // <li> <linkto module="MeasurementSets">MeasurementSets</linkto>
51 // </prerequisite>
52 //
53 // <etymology>
54 // Measurement Equation describes a model for measurements from a
55 // generic radio telescope.
56 // </etymology>
57 //
58 // <synopsis>
59 // Synthesis processing in AIPS++ is implemented using the
60 // measurement equation due to Hamaker, Bregman and Sault and later
61 // extended by Noordam, and Cornwell. The HBS measurement equation
62 // expresses the measured visibility in terms of Jones matrices and
63 // other components. A Jones matrix is a two by two complex matrix
64 // that describes how two orthogonal senses of polarization are
65 // affected by an element in a measurement system. In the HBS
66 // formulation of synthesis processing, the antenna is described by a
67 // compound Jones matrix formed from a product each element of which
68 // represents a different physical effect:
69 //
70 // J = G D C E P T F K
71 //
72 // The measured visibility from a radio telescope is then
73 // given by:
74 //
75 // V_i,j=X_i,j (M_i,j integral directProduct(J_i, Conjugate(J_j)) S I + A_i,j)
76 //
77 // where the elements in the equation are
78 //
79 // <ul>
80 // <li> M is the 4 by 4 complex closure error matrix
81 // <li> K is the Fourier phase Factor Jones matrix
82 // <li> G is the antenna gain Jones matrix
83 // <li> D is the polarization leakage Jones matrix
84 // <li> C is the configuration Jones matrix
85 // <li> E is the electric field pattern Jones matrix
86 // <li> P is the receptor position angle Jones matrix
87 // <li> T is the atmospheric gain Jones matrix
88 // <li> F is the Faraday rotation Jones matrix
89 // <li> A is the complex additive component
90 // <li> X is the non-linear correlator function
91 // <li> S is the casacore::Stokes conversion matrix
92 // <li> I is the (real) sky brightness 4-vector
93 // </ul>
94 //
95 // and the integral is over time, frequency, sky position. The direct
96 // product of two 2 by 2 matrices gives a 4 by 4 matrix in which every
97 // possible product of the 2 by 2 matrix elements appears.
98 //
99 // Manipulation of the equation in this form is possible but is much
100 // too expensive for most uses so we break it down into two parts and
101 // also use a special machine for the Fourier summation. This loses
102 // some generality but makes the use of the HBS measurement equation
103 // feasible.
104 //
105 // The split is such that the class
106 // <linkto class="VisEquation ">VisEquation </linkto>
107 // expresses the visibility-plane part of the ME:
108 //
109 // J = G D C P
110 //
111 // where the visibility is
112 // V_i,j=X_i,j (M_i,j integral directProduct(J_i, Conjugate(J_j)) Vsky_i,j
113 // + A_i,j)
114 // and the integral is over time, frequency.
115 //
116 // and the class <linkto class="SkyEquation ">SkyEquation </linkto>
117 // expresses the sky-plane part of the ME:
118 //
119 // J = E T F K
120 //
121 // Vsky_i,j=integral directProduct(J_i, Conjugate(J_j)) S I and the
122 // integral is over time, frequency, sky position.
123 //
124 // The last integral (over K) amounts to a Fourier transform and so
125 // the SkyEquation is given FT machines to use for this purpose. Note
126 // that we have chosen to move the position of the parallactic angle
127 // term. This has been done for expediency but will lead to some
128 // difficulties in difficult cases.
129 //
130 // The terms G, D, C, etc, are represented by the classes in the
131 // module <linkto
132 // module="MeasurementComponents">MeasurementComponents</linkto>.
133 // This classes can typically do two basic things: apply a correction
134 // to a <linkto class="VisBuffer">VisBuffer</linkto> (which is a
135 // holder of a chunk of visibility data), and solve for its own
136 // internal parameters. Solution is accomplished using gradients of
137 // chi-squared obtained via standard services of the
138 // MeasurementEquation.
139 //
140 // The SkyBrightness is modelled by a special type of
141 // MeasurementComponent called a <linkto class="SkyModel">SkyModel</linkto>. This has an interface to the
142 // SkyEquation via a <linkto class="casacore::PagedImage">casacore::PagedImage</linkto>.
143 //
144 // Another type of <linkto module="MeasurementComponents">MeasurementComponent</linkto> is the
145 // Fourier transform machine <linkto
146 // class="FTMachine">FTMachine</linkto> which is used for performing
147 // forward and inverse Fourier transforms. The class <linkto
148 // class="GridFT">GridFT</linkto> implements a straightforward grid
149 // and degrid FFT-based Fourier transform. We anticipate that other
150 // FTMachines will be needed for e.g. wide-field imaging.
151 //
152 // Visibility casacore::Data is held in a
153 // <linkto module="MeasurementSets">casacore::MeasurementSet</linkto>.
154 // To expedite processing, we use a
155 // <linkto class="VisibilityIterator">VisibilityIterator</linkto>
156 // (found in msvis/)
157 // to iterate through the casacore::MeasurementSet as needed. Setting up the
158 // iterator is relatively expensive so we store the iterator
159 // in a <linkto class="VisSet">VisSet</linkto> (also found in this
160 // module). Thus one should
161 // construct a <linkto class="VisSet">VisSet</linkto> and then
162 // use the iterator method to retrieve the iterator. Once
163 // one has a VisibilityIterator, it can be used to access the
164 // actual visibility data in chunk by using the
165 // <linkto class="VisBuffer">VisBuffer</linkto> (also in this
166 // module).
167 // This scheme may seem baroque but it is needed to cut down on
168 // superfluous otherhead of various types.
169 // </synopsis>
170 //
171 // <example>
172 // <srcblock>
173 // // Create a VisSet from a casacore::MeasurementSet on disk
174 // VisSet vs("3c84.MS");
175 //
176 // // Now make an FTMachine with a 2048 by 2048
177 // // complex pixel cache of 16 by 16 tiles,
178 // // using Spheriodal casacore::Function gridding
179 // GridFT ft(2048*2048, 16, "SF")
180 //
181 // // Create an ImageSkyModel from an image on disk
182 // casacore::PagedImage<casacore::Float> im("3c84.modelImage"));
183 // ImageSkyModel ism(im);
184 //
185 // // For the imaging, we need a SkyEquation and
186 // // an FTMachine
187 // SkyEquation se(vs, ft);
188 //
189 // // Predict the visibility set for the model
190 // se.predict();
191 //
192 // // Make a VisEquation
193 // VisEquation ve(vs);
194 //
195 // // Solve for calibration of G matrix every 5 minutes
196 // GJones gj(vs, 5*60);
197 // ve.solve(gj);
198 //
199 // // Solve for calibration of D matrix every 12 hours
200 // DJones dj(vs, 12*60*60);
201 // ve.solve(dj);
202 //
203 // // Now use the SkyEquaton to make a Clean Image
204 // HogbomCleanImageSkyModel csm(ism);
205 // if (se.solve(csm)) {
206 // Image<StokesVector> cleanImage=csm.getImage();
207 // cleanImage.setName("3c84.cleanImage");
208 // }
209 //
210 // </srcblock>
211 // </example>
212 //
213 // <motivation>
214 // MeasurementEquations are needed to encapsulate the measurement
215 // equations for linear systems, and both single dish and synthesis
216 // observations. The idea is
217 // that the structure of many calibration and imaging algorithms is much
218 // the same for many different types of telescope. MeasurementEquations
219 // are part of a framework of classes that are designed for synthesis and
220 // single dish imaging. The others are the <linkto
221 // module=MeasurementComponents>MeasurementComponents</linkto>.
222 //</motivation>
223 //
224 // <todo asof="">
225 // <li> Implement SkyJones
226 // <li> Multiple images in SkyModel/SkyEquation
227 // <li> Derive special SkyEquation for SD
228 // <li> Move LinearEquation and LinearModel into separate modules
229 // </todo>
230 
231 // </module>
232 
233 } //# NAMESPACE CASA - END
234 
235 #endif