casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SynthesisNormalizer.h
Go to the documentation of this file.
1 //# SynthesisNormalizer.h: Gather and Scatter operations for parallel major cycles.
2 //# Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
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 addressed 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 //#
25 //# $Id$
26 
27 #ifndef SYNTHESIS_SYNTHESISPARSYNC_H
28 #define SYNTHESIS_SYNTHESISPARSYNC_H
29 
30 #include <casa/aips.h>
31 #include <casa/OS/Timer.h>
32 #include <casa/Containers/Record.h>
34 #include <casa/Arrays/IPosition.h>
35 #include <casa/Quanta/Quantum.h>
37 
42 
45 
46 namespace casacore{
47 
48 class MeasurementSet;
49 template<class T> class ImageInterface;
50 }
51 
52 namespace casa { //# NAMESPACE CASA - BEGIN
53 
54 // Forward declarations
55 
56 // <summary> Class that contains functions needed for imager </summary>
57 
59 {
60  public:
61  // Default constructor
62 
65 
66  // Copy constructor and assignment operator
67 
68  // make all pure-inputs const
69  void setupNormalizer(casacore::Record normpars);
70 
71  // Gather all part images to the 'full' one
72  void gatherImages(casacore::Bool dopsf, casacore::Bool doresidual, casacore::Bool dodensity);
73 
74  // 'Gather' the pb ( just one node makes it.. )
75  void gatherPB();
76 
77  // Copy out model to all pieces. Currently a No-Op.
78  void scatterModel();
79 
80  // Gather all part gridded weights and add them up.
81  void gatherWeightDensity();
82  // Scatter summed gridded weights to all parts
83  void scatterWeightDensity();
84 
85  std::shared_ptr<SIImageStore> getImageStore();
86  void setImageStore( SIImageStore* imstore );
87 
89  void dividePSFByWeight();
90  void divideModelByWeight();
91  void multiplyModelByWeight();
92 
93  void normalizePrimaryBeam();
94 
95 protected:
96 
97  // Normalize. This can later change to be more general, i.e. used for PB-correction too...
98  // Check if images exist on disk and are all the same shape
101 
102  std::shared_ptr<SIImageStore> makeImageStore( const casacore::String &imagename );
103  std::shared_ptr<SIImageStore> makeImageStore( const casacore::String &imagename,
105  casacore::Bool useweightimage );
106 
107  void setPsfFromOneFacet();
108 
110 
111  std::shared_ptr<SIImageStore> itsImages;
114 
116 
121 
124 
126 
128 
129 };
130 
131 
132 } //# NAMESPACE CASA - END
133 
134 #endif
A Vector of integers, for indexing into Array&lt;T&gt; objects.
Definition: IPosition.h:119
A 1-D Specialization of the Array class.
std::shared_ptr< SIImageStore > getImageStore()
void gatherImages(casacore::Bool dopsf, casacore::Bool doresidual, casacore::Bool dodensity)
Gather all part images to the &#39;full&#39; one.
casacore::Bool doImagesExist(casacore::String imagename)
*std::shared_ptr< SIImageStore > itsImages
casacore::Block< std::shared_ptr< SIImageStore > > itsFacetImageStores
void setImageStore(SIImageStore *imstore)
casacore::Vector< casacore::String > itsPartImageNames
void setupNormalizer(casacore::Record normpars)
Copy constructor and assignment operator.
casacore::Bool setupImagesOnDisk()
Normalize.
void gatherPB()
&#39;Gather&#39; the pb (just one node makes it..)
void scatterModel()
Copy out model to all pieces.
std::shared_ptr< SIImageStore > makeImageStore(const casacore::String &imagename)
casacore::Vector< std::shared_ptr< SIImageStore > > itsPartImages
void gatherWeightDensity()
Gather all part gridded weights and add them up.
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
float Float
Definition: aipstype.h:54
Forward declarations.
simple 1-D array
SynthesisNormalizer()
Default constructor.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
void scatterWeightDensity()
Scatter summed gridded weights to all parts.
casacore::String itsStartingModelName
casacore::IPosition itsImageShape
unsigned int uInt
Definition: aipstype.h:51
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42