casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SetJyGridFT.h
Go to the documentation of this file.
1 //# SetJyGridFT.h: Definition for GridFT
2 //# Copyright (C) 2012-2014
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 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 General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU 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_SETJYGRIDFT_H
30 #define SYNTHESIS_TRANSFORM2_SETJYGRIDFT_H
31 
33 
34 
35 namespace casa { //# NAMESPACE CASA - BEGIN
36 namespace vi { class VisBuffer2;}
37 
38 namespace refim { //#namespace for imaging refactor
39 // <summary> An FTMachine for Gridded Fourier transforms specializing in setjy frequency scaling </summary>
40 
41 // <use visibility=export>
42 
43 // <reviewed reviewer="" date="" tests="" demos="">
44 
45 // <prerequisite>
46 // <li> <linkto class=FTMachine>GridFT</linkto> module
47 // <li> <linkto class=SkyEquation>SkyEquation</linkto> module
48 // <li> <linkto class=VisBuffer>VisBuffer</linkto> module
49 // </prerequisite>
50 //
51 // <etymology>
52 // Inheriting from GridFT which does
53 // Grid-based Fourier transforms.
54 // special case for setjy style frequency scaling
55 // </etymology>
56 //
57 // <synopsis>
58 
59 // </synopsis>
60 //
61 // <example>
62 // </example>
63 //
64 // <motivation>
65 // Define an interface to allow efficient processing of chunks of
66 // visibility data
67 // </motivation>
68 //
69 // <todo asof="2012/05/08">
70 //
71 // </todo>
72 
73 class SetJyGridFT : public GridFT {
74 public:
75 
76  // Constructor: cachesize is the size of the cache in words
77  // (e.g. a few million is a good number), tilesize is the
78  // size of the tile used in gridding (cannot be less than
79  // 12, 16 works in most cases), and convType is the type of
80  // gridding used (SF is prolate spheriodal wavefunction,
81  // and BOX is plain box-car summation). mLocation is
82  // the position to be used in some phase rotations. If
83  // mTangent is specified then the uvw rotation is done for
84  // that location iso the image center.
85  // <group>
86 
88  casacore::MPosition mLocation, casacore::MDirection mTangent, casacore::Float passing=1.0,
89  casacore::Bool usezero=true, casacore::Bool useDoublePrec=false,
91  // </group>
92 
93  // Construct from a casacore::Record containing the GridFT state
94  SetJyGridFT(const casacore::RecordInterface& stateRec);
95 
96  // Copy constructor
97  SetJyGridFT(const SetJyGridFT &other);
98 
99  // Assignment operator
100  SetJyGridFT &operator=(const SetJyGridFT &other);
101 
102  virtual ~SetJyGridFT();
103 
104  //clone FTM
105  virtual FTMachine* cloneFTM();
106  // Initialize transform to Visibility plane using the image
107  // as a template. The image is loaded and Fourier transformed.
109  const vi::VisBuffer2& vb);
110 
111  // Finalize transform to Visibility plane: flushes the image
112  // cache and shows statistics if it is being used.
113  //void finalizeToVis();
114 
115  // Get actual coherence from grid by degridding
116  void get(vi::VisBuffer2& vb, casacore::Int row=-1);
117 
118 
119  // Save and restore the GridFT to and from a record
121  casacore::Bool withImage=false, const casacore::String diskimage="");
123 
125 
126  virtual casacore::String name() const;
127 
128 
129 protected:
130 
131 
132 
133 
134  //Prepare the grid for degridding
135  //void prepGridForDegrid();
136 
140 
141 
142 
143 };
144 } //# end of namespace refim
145 } //# NAMESPACE CASA - END
146 
147 #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::String convType
Definition: GridFT.h:273
SetJyGridFT(casacore::Long cachesize, casacore::Int tilesize, casacore::String convType, casacore::MPosition mLocation, casacore::MDirection mTangent, casacore::Float passing=1.0, casacore::Bool usezero=true, casacore::Bool useDoublePrec=false, const casacore::Vector< casacore::Double > &freqscale=casacore::Vector< casacore::Double >(1, 0.0), const casacore::Vector< casacore::Double > &scale=casacore::Vector< casacore::Double >(1, 1.0))
Constructor: cachesize is the size of the cache in words (e.g.
casacore::Vector< casacore::Double > interpscale_p
Definition: SetJyGridFT.h:139
defines interface for the Fourier Transform Machine
Definition: FTMachine.h:122
casacore::Int tilesize
Definition: GridFT.h:258
virtual casacore::Bool fromRecord(casacore::String &error, const casacore::RecordInterface &inRec)
casacore::Vector< casacore::Double > scale_p
Definition: SetJyGridFT.h:138
An FTMachine for Gridded Fourier transforms specializing in setjy frequency scaling.
Definition: SetJyGridFT.h:73
long Long
Definition: aipstype.h:52
virtual void initializeToVis(casacore::ImageInterface< casacore::Complex > &image, const vi::VisBuffer2 &vb)
Initialize transform to Visibility plane using the image as a template.
virtual void setScale(const casacore::Vector< casacore::Double > &freq, const casacore::Vector< casacore::Double > &scale)
virtual casacore::String name() const
Return the name of the machine.
casacore::Long cachesize
Sizes.
Definition: GridFT.h:257
An FTMachine for Gridded Fourier transforms.
Definition: GridFT.h:128
SetJyGridFT & operator=(const SetJyGridFT &other)
Assignment operator.
casacore::Vector< casacore::Double > freqscale_p
Prepare the grid for degridding void prepGridForDegrid();.
Definition: SetJyGridFT.h:137
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
float Float
Definition: aipstype.h:54
virtual FTMachine * cloneFTM()
clone FTM
VisBuffer2s encapsulate one chunk of visibility data for processing.
Definition: VisBuffer2.h:141
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Abstract base class for Record classes.
casacore::ImageInterface< casacore::Complex > * image
Definition: FTMachine.h:395
virtual casacore::Bool toRecord(casacore::String &error, casacore::RecordInterface &outRec, casacore::Bool withImage=false, const casacore::String diskimage="")
Save and restore the GridFT to and from a record.