casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ComponentFTMachine.h
Go to the documentation of this file.
1 //# ComponentFTMachine.h: Definition for ComponentFTMachine
2 //# Copyright (C) 1996,1997,1998,1999,2000,2001
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_TRANSFORM2_COMPONENTFTMACHINE_H
30 #define SYNTHESIS_TRANSFORM2_COMPONENTFTMACHINE_H
31 
35 #include <casa/Arrays/Array.h>
36 #include <casa/Arrays/Vector.h>
37 #include <casa/Arrays/Matrix.h>
38 #include <casa/Logging/LogIO.h>
39 #include <casa/Logging/LogSink.h>
41 
42 namespace casa { //# NAMESPACE CASA - BEGIN
43 
44 // Forward declarations
45 class ComponentList;
46 namespace vi{class VisBuffer2;}
47 
48 namespace refim{ // refactor namespace
49 
50 
51 // <summary>
52 // ComponentFTMachine: a abstract base class defining the interface
53 // for a Fourier Transform Machine to be used in the
54 // <linkto class=SkyEquation>SkyEquation</linkto> for the
55 // transformation of SkyComponents
56 // </summary>
57 
58 // <use visibility=export>
59 
60 // <reviewed reviewer="" date="" tests="" demos="">
61 
62 // <prerequisite>
63 // <li> <linkto class=SkyModel>SkyModel</linkto> module
64 // <li> <linkto class=SkyEquation>SkyEquation</linkto> module
65 // <li> <linkto class=VisBuffer>VisBuffer</linkto> module
66 // <li> <linkto class=SkyComponent>SkyComponent</linkto> class
67 // </prerequisite>
68 //
69 // <etymology>
70 // FTMachine is a Machine for Fourier Transforms
71 // </etymology>
72 //
73 // <synopsis>
74 // The <linkto class=SkyEquation>SkyEquation</linkto> needs to be able
75 // to perform Fourier transforms on visibility data. FTMachine
76 // allows efficient Fourier Transform processing using a
77 // <linkto class=VisBuffer>VisBuffer</linkto> which encapsulates
78 // a chunk of visibility (typically all baselines for one time)
79 // together with all the information needed for processing
80 // (e.g. UVW coordinates).
81 // </synopsis>
82 //
83 // <example>
84 // A simple example of an ComponentFTMachine is found in
85 // <linkto class=GridFT>SimpleComponentFTMachine</linkto>.
86 // See the example for <linkto class=SkyModel>SkyModel</linkto>.
87 // </example>
88 //
89 // <motivation>
90 // Define an interface to allow efficient processing of chunks of
91 // visibility data
92 //
93 // </motivation>
94 //
95 // <todo asof="98/01/25">
96 // </li> SmearedComponentFTMachine to take into account
97 // time and bandwidth smearing
98 // </todo>
99 
100 
101 
102 
104 public:
105 
107 
109 
111 
112  virtual ~ComponentFTMachine();
113 
114  // Get actual coherence : this is the only virtual method
115  virtual void get(vi::VisBuffer2& vb, SkyComponent& component, casacore::Int row=-1) = 0;
116  // Get actual coherence : this is the other only virtual method
117  virtual void get(vi::VisBuffer2& vb, const ComponentList& componentList, casacore::Int row=-1) = 0;
118 
119  // Rotate the uvw from the observed phase center to the
120  // desired phase center.
122  const vi::VisBuffer2& vb, const casacore::MDirection& mDesired);
123  // A version that use pointers to contigous matrix and vector
124  void rotateUVW(casacore::Double*& uvw, casacore::Double*& dphase, const casacore::Int nrows,
125  const vi::VisBuffer2& vb, const casacore::MDirection& mDesired);
126  // Set number of threads to use when predicting. Setting it to -1
127  // basically tell openmp to use the number it can get
128  void setnumthreads(const casacore::Int numthreads);
129 protected:
130 
132 
134 
135  // Default Position used for phase rotations
137 
138  virtual void ok();
140 
141 };
142 
143 } // end namespace refim
144 } //# NAMESPACE CASA - END
145 
146 #endif
A Measure: astronomical direction.
Definition: MDirection.h:174
A Measure: position on Earth.
Definition: MPosition.h:79
int Int
Definition: aipstype.h:50
casacore::MPosition mLocation_p
Default Position used for phase rotations.
ComponentFTMachine & operator=(const ComponentFTMachine &other)
ostream-like interface to creating log messages.
Definition: LogIO.h:167
ComponentFTMachine: a abstract base class defining the interface for a Fourier Transform Machine to b...
void rotateUVW(casacore::Matrix< casacore::Double > &uvw, casacore::Vector< casacore::Double > &dphase, const vi::VisBuffer2 &vb, const casacore::MDirection &mDesired)
Rotate the uvw from the observed phase center to the desired phase center.
double Double
Definition: aipstype.h:55
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
A class for manipulating groups of components.
A component of a model of the sky.
Definition: SkyComponent.h:130
void setnumthreads(const casacore::Int numthreads)
Set number of threads to use when predicting.