casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CubeSkyEquation.h
Go to the documentation of this file.
1 //# CubeSkyEquation.h: CubeSkyEquation definition
2 //# Copyright (C) 2007
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 //# $Id$
27 #ifndef SYNTHESIS_CUBESKYEQUATION_H
28 #define SYNTHESIS_CUBESKYEQUATION_H
29 
31 //#include <synthesis/Utilities/ThreadTimers.h>
32 
33 
34 namespace casacore{
35 
36 template <class T> class ImageInterface;
37 template <class T> class TempImage;
38 template <class T> class SubImage;
39 template <class T> class Block;
40 }
41 
42 namespace casa { //# NAMESPACE CASA - BEGIN
43 
44 //Forward
45 
46 class VisibilityIterator;
47 class ROVisibilityIterator;
48 
49 class CubeSkyEquation : public SkyEquation {
50 
51  public:
52  CubeSkyEquation(SkyModel& sm, VisSet& vs, FTMachine& ft, ComponentFTMachine& cft, casacore::Bool noModelCol=false);
53 
54  //Read only iterator...hence no scratch col
56 
57  virtual ~CubeSkyEquation();
59  virtual void gradientsChiSquared(casacore::Bool incremental, casacore::Bool commitModel=false);
60 
61  virtual void initializePutSlice(const VisBuffer& vb, casacore::Bool dopsf, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1);
62  virtual void newInitializePutSlice(const VisBuffer& vb, casacore::Bool dopsf, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1);
63  virtual void oldInitializePutSlice(const VisBuffer& vb, casacore::Bool dopsf, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1);
64  virtual void putSlice(VisBuffer& vb, casacore::Bool dopsf,
65  FTMachine::Type col,casacore::Int cubeSlice=0,
66  casacore::Int nCubeSlice=1);
67  virtual void finalizePutSlice(const VisBuffer& vb, casacore::Bool dopsf,
68  casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1);
69  virtual void newFinalizePutSlice(const VisBuffer& vb, casacore::Bool dopsf,
70  casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1);
71  virtual void oldFinalizePutSlice(const VisBuffer& vb, casacore::Bool dopsf,
72  casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1);
73  void initializeGetSlice(const VisBuffer& vb, casacore::Int row,
74  casacore::Bool incremental, casacore::Int cubeSlice=0,
75  casacore::Int nCubeSlice=1);
76  void newInitializeGetSlice(const VisBuffer& vb, casacore::Int row,
77  casacore::Bool incremental, casacore::Int cubeSlice=0,
78  casacore::Int nCubeSlice=1);
79  void oldInitializeGetSlice(const VisBuffer& vb, casacore::Int row,
80  casacore::Bool incremental, casacore::Int cubeSlice=0,
81  casacore::Int nCubeSlice=1);
82  virtual VisBuffer& getSlice(VisBuffer& vb,
83  casacore::Bool incremental, casacore::Int cubeSlice=0,
84  casacore::Int nCubeSlice=1);
85  void finalizeGetSlice();
87  //void makeApproxPSF(casacore::Int model, casacore::ImageInterface<casacore::Float>& psf);
88  //virtual void makeApproxPSF(casacore::Int model, casacore::ImageInterface<casacore::Float>& psf);
90 
91  //Get the flux scale that the ftmachines have if they have
93 
94  //get the weight image from the ftmachines
95  virtual void getWeightImage(const casacore::Int model, casacore::ImageInterface<casacore::Float>& weightim);
96  void tmpWBNormalizeImage(casacore::Bool& dopsf, const casacore::Float& pbLimit);
97 
100 
101  protected:
102 
103  void configureAsyncIo (ROVisibilityIterator * & oldRvi, VisibilityIterator * & oldWvi);
104 
105  //Different versions of psf making
108  virtual void fixImageScale();
114  // Type of copy
115  // 0 => a independent image just with coordinates gotten from cImage
116  // 1 => a subImage referencing cImage ...no image copy
119  //frequency range from image
121  casacore::Int slice, casacore::Int nslice);
122 
124  private:
125  // if skyjones changed in get or put we need to tell put or get respectively
126  // about it
127  void init(FTMachine& ft);
128 
130 
135 
141 
142  // DT aInitGrad, aGetChanSel, aCheckVisRows, aGetFreq, aOrigChunks, aVBInValid, aInitGetSlice, aInitPutSlice, aPutSlice, aFinalizeGetSlice, aFinalizePutSlice, aChangeStokes, aInitModel, aGetSlice, aSetModel, aGetRes, aExtra;
143 
144 
145 };
146 
147 } //# NAMESPACE CASA - ENDf
148 
149 #endif
casacore::Block< casacore::Vector< casacore::Int > > blockNumChanGroup_p
virtual void initializePutSlice(const VisBuffer &vb, casacore::Bool dopsf, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1)
void oldInitializeGetSlice(const VisBuffer &vb, casacore::Int row, casacore::Bool incremental, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1)
virtual void gradientsChiSquared(casacore::Bool incremental, casacore::Bool commitModel=false)
int Int
Definition: aipstype.h:50
virtual void finalizePutSlice(const VisBuffer &vb, casacore::Bool dopsf, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1)
Temporary astronomical images.
virtual void newFinalizePutSlice(const VisBuffer &vb, casacore::Bool dopsf, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1)
casacore::Block< casacore::CountedPtr< FTMachine > > ftm_p
casacore::Block< casacore::Vector< casacore::Int > > blockSpw_p
casacore::Bool getFreqRange(ROVisibilityIterator &vi, const casacore::CoordinateSystem &coords, casacore::Int slice, casacore::Int nslice)
frequency range from image
casacore::Block< casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > > imPutSlice_p
virtual VisBuffer & getSlice(VisBuffer &vb, casacore::Bool incremental, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1)
virtual void predict(casacore::Bool incremental=false, casacore::MS::PredefinedColumns Type=casacore::MS::MODEL_DATA)
Predict model coherence for the SkyModel.
casacore::Bool firstOneChangesPut_p
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
Definition: PlotTool.h:43
virtual void fixImageScale()
Modify the ggS and Create the imageScale.
casacore::Bool firstOneChangesGet_p
casacore::Block< casacore::Vector< casacore::Int > > blockChanInc_p
PredefinedColumns
The Main table colums with predefined meaning.
Definition: MSMainEnums.h:65
casacore::Int nchanPerSlice_p
void initializeGetSlice(const VisBuffer &vb, casacore::Int row, casacore::Bool incremental, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1)
void isLargeCube(casacore::ImageInterface< casacore::Complex > &theIm, casacore::Int &nCubeSlice)
virtual void putSlice(VisBuffer &vb, casacore::Bool dopsf, FTMachine::Type col, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1)
The model visibility data (optional).
Definition: MSMainEnums.h:205
Referenced counted pointer for constant data.
Definition: VisModelData.h:42
A base class for astronomical images.
CubeSkyEquation(SkyModel &sm, VisSet &vs, FTMachine &ft, ComponentFTMachine &cft, casacore::Bool noModelCol=false)
casacore::Block< casacore::Vector< casacore::Int > > blockChanWidth_p
void newInitializeGetSlice(const VisBuffer &vb, casacore::Int row, casacore::Bool incremental, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1)
double Double
Definition: aipstype.h:55
casacore::Slicer sl_p
virtual void newInitializePutSlice(const VisBuffer &vb, casacore::Bool dopsf, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1)
Type
Types of known Images that may be made using the makeImage method.
Definition: FTMachine.h:125
casacore::Block< casacore::Vector< casacore::Int > > blockChanStart_p
void setPhaseCenterTime(const casacore::Double time)
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
virtual void getWeightImage(const casacore::Int model, casacore::ImageInterface< casacore::Float > &weightim)
get the weight image from the ftmachines
float Float
Definition: aipstype.h:54
casacore::Block< casacore::Matrix< casacore::Float > > weightSlice_p
A (masked) subset of an ImageInterface object.
A drop-in replacement for Block&lt;T*&gt;.
Definition: WProjectFT.h:54
virtual ~CubeSkyEquation()
casacore::Block< casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > > imGetSlice_p
void configureAsyncIo(ROVisibilityIterator *&oldRvi, VisibilityIterator *&oldWvi)
Specify which elements to extract from an n-dimensional array.
Definition: Slicer.h:289
simple 1-D array
Sky Model: Model the Sky Brightness for the SkyEquation.
Definition: SkyModel.h:132
void makeSimplePSF(casacore::PtrBlock< casacore::ImageInterface< casacore::Float > * > &psfs)
Different versions of psf making.
void init(FTMachine &ft)
if skyjones changed in get or put we need to tell put or get respectively about it ...
virtual void oldFinalizePutSlice(const VisBuffer &vb, casacore::Bool dopsf, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1)
virtual void oldInitializePutSlice(const VisBuffer &vb, casacore::Bool dopsf, casacore::Int cubeSlice=0, casacore::Int nCubeSlice=1)
virtual void getCoverageImage(casacore::Int model, casacore::ImageInterface< casacore::Float > &im)
Get the flux scale that the ftmachines have if they have.
casacore::Bool internalChangesPut_p
casacore::Block< casacore::CountedPtr< FTMachine > > iftm_p
void tmpWBNormalizeImage(casacore::Bool &dopsf, const casacore::Float &pbLimit)
void makeApproxPSF(casacore::PtrBlock< casacore::ImageInterface< casacore::Float > * > &psfs)
void makeApproxPSF(casacore::Int model, casacore::ImageInterface&lt;casacore::Float&gt;&amp; psf); virtual void...
void sliceCube(casacore::CountedPtr< casacore::ImageInterface< casacore::Complex > > &slice, casacore::Int model, casacore::Int cubeSlice, casacore::Int nCubeSlice, casacore::Int typeOfCopy=0)
Type of copy 0 =&gt; a independent image just with coordinates gotten from cImage 1 =&gt; a subImage refere...
VisBuffers encapsulate one chunk of visibility data for processing.
Definition: VisBuffer.h:153
VisibilityIterator iterates through one or more writable MeasurementSets.
casacore::Bool internalChangesGet_p
ROVisibilityIterator iterates through one or more readonly MeasurementSets.
casacore::Bool isNewFTM()
void makeMosaicPSF(casacore::PtrBlock< casacore::ImageInterface< casacore::Float > * > &psfs)
Interconvert pixel and world coordinates.
casacore::Bool destroyVisibilityIterator_p
defines interface for the Fourier Transform Machine
Definition: FTMachine.h:120
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42