casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ConvolutionTVI.h
Go to the documentation of this file.
1 //# ConvolutionTVI.h: This file contains the interface definition of the MSTransformManager class.
2 //#
3 //# CASA - Common Astronomy Software Applications (http://casa.nrao.edu/)
4 //# Copyright (C) Associated Universities, Inc. Washington DC, USA 2011, All rights reserved.
5 //# Copyright (C) European Southern Observatory, 2011, All rights reserved.
6 //#
7 //# This library is free software; you can redistribute it and/or
8 //# modify it under the terms of the GNU Lesser General Public
9 //# License as published by the Free software Foundation; either
10 //# version 2.1 of the License, or (at your option) any later version.
11 //#
12 //# This library is distributed in the hope that it will be useful,
13 //# but WITHOUT ANY WARRANTY, without even the implied warranty of
14 //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 //# Lesser General Public License for more details.
16 //#
17 //# You should have received a copy of the GNU Lesser General Public
18 //# License along with this library; if not, write to the Free Software
19 //# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 //# MA 02111-1307 USA
21 //# $Id: $
22 
23 #ifndef ConvolutionTVI_H_
24 #define ConvolutionTVI_H_
25 
26 // Base class
28 
29 
30 namespace casa { //# NAMESPACE CASA - BEGIN
31 
32 namespace vi { //# NAMESPACE VI - BEGIN
33 
35 // ConvolutionTVI class
37 
38 class ConvolutionTVI : public FreqAxisTVI
39 {
40 
41 public:
42 
44  const casacore::Record &configuration = casacore::Record());
45 
46  void flag(casacore::Cube<casacore::Bool>& flagCube) const;
47  void floatData (casacore::Cube<casacore::Float> & vis) const;
51  void weightSpectrum(casacore::Cube<casacore::Float> &weightSp) const;
52  void sigmaSpectrum (casacore::Cube<casacore::Float> &sigmaSp) const;
53 
54  bool weightSpectrumExists () const {return true;}
55  bool sigmaSpectrumExists () const {return true;}
56 
57 protected:
58 
60  void initialize();
61 
63 };
64 
66 // ConvolutionTVIFactory class
68 
69 class ConvolutionTVIFactory : public ViFactory
70 {
71 
72 public:
73 
75 
76 protected:
77 
80 
83 };
84 
86 // ConvolutionTransformEngine class
88 
89 
90 template<class T> class ConvolutionKernel; // Forward declaration
91 
92 template<class T> class ConvolutionTransformEngine : public FreqAxisTransformEngine<T>
93 {
94 
95 public:
96 
98 
99  void transform(casacore::Vector<T> &inputVector,casacore::Vector<T> &outputVector);
100 
101 protected:
102 
104  // This member has to be a pointer, otherwise there
105  // are compile time problems due to the fact that
106  // it is a pure virtual class.
108 };
109 
111 // ConvolutionKernel class
113 
114 template<class T> class ConvolutionKernel
115 {
116 
117 public:
118 
120 
121  virtual void kernel( casacore::Vector<T> &inputVector,
122  casacore::Vector<T> &outputVector,
123  casacore::uInt startInputPos,
124  casacore::uInt outputPos) = 0;
125 
126 protected:
127 
130 
131 };
132 
134 // ConvolutionDataKernel class
136 
137 template<class T> class ConvolutionDataKernel : public ConvolutionKernel<T>
138 {
141 
142 public:
143 
145 
146  void kernel( casacore::Vector<T> &inputVector,
147  casacore::Vector<T> &outputVector,
148  casacore::uInt startInputPos,
149  casacore::uInt outputPos);
150 };
151 
153 // ConvolutionLogicalORKernel class
155 
156 template<class T> class ConvolutionLogicalORKernel : public ConvolutionKernel<T>
157 {
158 
161 
162 public:
163 
165 
166  void kernel( casacore::Vector<T> &inputVector,
167  casacore::Vector<T> &outputVector,
168  casacore::uInt startInputPos,
169  casacore::uInt outputPos);
170 };
171 
173 // ConvolutionWeightPropagationKernel class
175 
176 template<class T> class ConvolutionWeightPropagationKernel : public ConvolutionKernel<T>
177 {
178 
181 
182 public:
183 
185 
186  void kernel( casacore::Vector<T> &inputVector,
187  casacore::Vector<T> &outputVector,
188  casacore::uInt startInputPos,
189  casacore::uInt outputPos);
190 };
191 
192 
193 } //# NAMESPACE VI - END
194 
195 } //# NAMESPACE CASA - END
196 
197 #endif /* ConvolutionTVI_H_ */
198 
void kernel(casacore::Vector< T > &inputVector, casacore::Vector< T > &outputVector, casacore::uInt startInputPos, casacore::uInt outputPos)
void floatData(casacore::Cube< casacore::Float > &vis) const
Return FLOAT_DATA as a casacore::Cube (npol, nchan, nrow) if found in the MS.
VisibilityIterator2 iterates through one or more readonly MeasurementSets.
ConvolutionKernel(casacore::Vector< casacore::Float > *convCoeff)
vi::ViImplementation2 * createVi() const
ViImplementation2 * inputVii_p
void visibilityModel(casacore::Cube< casacore::Complex > &vis) const
void visibilityCorrected(casacore::Cube< casacore::Complex > &vis) const
Return the visibilities as found in the casacore::MS, casacore::Cube (npol,nchan,nrow).
void flag(casacore::Cube< casacore::Bool > &flagCube) const
Return flag for each polarization, channel and row.
bool weightSpectrumExists() const
Determine whether WEIGHT_SPECTRUM exists.
ConvolutionDataKernel(casacore::Vector< casacore::Float > *convCoeff)
ConvolutionTVIFactory(casacore::Record &configuration, ViImplementation2 *inputVII)
ConvolutionLogicalORKernel(casacore::Vector< casacore::Float > *convCoeff)
virtual void kernel(casacore::Vector< T > &inputVector, casacore::Vector< T > &outputVector, casacore::uInt startInputPos, casacore::uInt outputPos)=0
void transform(casacore::Vector< T > &inputVector, casacore::Vector< T > &outputVector)
ConvolutionKernel< T > * convolutionKernel_p
This member has to be a pointer, otherwise there are compile time problems due to the fact that it is...
void kernel(casacore::Vector< T > &inputVector, casacore::Vector< T > &outputVector, casacore::uInt startInputPos, casacore::uInt outputPos)
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Bool parseConfiguration(const casacore::Record &configuration)
casacore::Vector< casacore::Float > convCoeff_p
void sigmaSpectrum(casacore::Cube< casacore::Float > &sigmaSp) const
Return sgimaspectrum (a sigma for each channel)
bool sigmaSpectrumExists() const
Determine whether SIGMA_SPECTRUM exists.
ConvolutionTVI(ViImplementation2 *inputVii, const casacore::Record &configuration=casacore::Record())
ConvolutionWeightPropagationKernel(casacore::Vector< casacore::Float > *convCoeff)
void kernel(casacore::Vector< T > &inputVector, casacore::Vector< T > &outputVector, casacore::uInt startInputPos, casacore::uInt outputPos)
casacore::Vector< casacore::Float > * convCoeff_p
VisibilityIterator2 iterates through one or more readonly MeasurementSets.
ConvolutionTransformEngine(ConvolutionKernel< T > *kernel, casacore::uInt width)
void weightSpectrum(casacore::Cube< casacore::Float > &weightSp) const
Return weightspectrum (a weight for each channel)
unsigned int uInt
Definition: aipstype.h:51
void visibilityObserved(casacore::Cube< casacore::Complex > &vis) const