casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
casa::SkyModel Class Referenceabstract

Sky Model: Model the Sky Brightness for the SkyEquation. More...

#include <SkyModel.h>

Inheritance diagram for casa::SkyModel:
casa::Iterate casa::ImageSkyModel casa::CleanImageSkyModel casa::CEMemImageSkyModel casa::ClarkCleanImageSkyModel casa::CSCleanImageSkyModel casa::HogbomCleanImageSkyModel casa::MFCleanImageSkyModel casa::MSCleanImageSkyModel casa::NNLSImageSkyModel casa::PClarkCleanImageSkyModel casa::WBCleanImageSkyModel

Public Types

enum  PolRep {
  CIRCULAR,
  LINEAR
}
 

Public Member Functions

 SkyModel ()
 
virtual casacore::Int numberOfModels ()=0
 Number of models contained. More...
 
virtual casacore::Int numberOfTaylorTerms ()=0
 MFS : Number of taylor terms per model. More...
 
virtual casacore::Double getReferenceFrequency ()=0
 MFS : Reference Frequency. More...
 
virtual casacore::Int getTaylorIndex (casacore::Int index=0)=0
 MFS : Index of Taylor term in array of nmodels x ntaylorterms. More...
 
virtual casacore::Bool isSolveable (casacore::Int model=0)=0
 Is this SkyModel solveable? More...
 
virtual casacore::Bool doFluxScale (casacore::Int model=0)=0
 Is there a flux scale image associated with this model? More...
 
virtual void initializeGradients ()=0
 Initialize for gradient search. More...
 
virtual void finalizeGradients ()=0
 Finalize for gradient search. More...
 
virtual ComponentListcomponentList ()=0
 Return the component list. More...
 
virtual casacore::Bool hasComponentList ()=0
 Return the component list. More...
 
virtual
casacore::ImageInterface
< casacore::Float > & 
image (casacore::Int model=0)=0
 Image interface for this model (casacore::Stokes representation) More...
 
virtual
casacore::ImageInterface
< casacore::Float > & 
deltaImage (casacore::Int model=0)=0
 Increment in the image. More...
 
virtual
casacore::ImageInterface
< casacore::Complex > & 
cImage (casacore::Int model=0)=0
 casacore::Complex image (needed for e.g. More...
 
virtual
casacore::ImageInterface
< casacore::Complex > & 
XFR (casacore::Int model=0, casacore::Int numXFR=0)=0
 casacore::Complex XFR More...
 
virtual casacore::Bool hasXFR (casacore::Int model=0)=0
 
virtual
casacore::ImageInterface
< casacore::Float > & 
PSF (casacore::Int model=0)=0
 PSF. More...
 
virtual
casacore::ImageInterface
< casacore::Float > & 
gS (casacore::Int model=0)=0
 Gradient of chi-squared wrt pixels. More...
 
virtual
casacore::ImageInterface
< casacore::Float > & 
ggS (casacore::Int model=0)=0
 Grad Grad chi-squared wrt pixels (diagonal elements only) More...
 
virtual
casacore::ImageInterface
< casacore::Float > & 
fluxScale (casacore::Int model=0)=0
 FluxScale image: image * fluxScale => true brightness distribution. More...
 
virtual
casacore::ImageInterface
< casacore::Float > & 
work (casacore::Int model=0)=0
 Work image. More...
 
virtual void addStatistics (casacore::Float sumwt, casacore::Float chisq)=0
 Add to Sum weights, Chi-Squared. More...
 
virtual casacore::Matrix
< casacore::Float > & 
weight (casacore::Int model=0)=0
 Weight per model (channels, polarizations) More...
 
virtual casacore::Bool solve (SkyEquation &se)=0
 Solve for this SkyModel. More...
 
virtual casacore::Bool isEmpty (casacore::Int model=0)=0
 Is this model empty. More...
 
virtual casacore::Int getModelIndex (casacore::uInt field=0, casacore::uInt taylor=0)=0
 
void setAlgorithm (const casacore::String &alg)
 set Algorithm (e.g clean, mem, nnls) More...
 
const casacore::String getAlgorithm ()
 get Algorithm More...
 
void setSubAlgorithm (const casacore::String &alg)
 set Sub Algorithm More...
 
const casacore::String getSubAlgorithm ()
 get Sub Algorithm More...
 
void setImageRegion (casacore::ImageRegion &ir)
 Set the imageregion that will be used for the next XFR generation. More...
 
void unsetImageRegion ()
 use the default shape More...
 
void setImageNormalization (casacore::Bool val)
 
casacore::Bool isImageNormalized ()
 
virtual void setMemoryUse (casacore::Bool memuse)=0
 set and get memory usage model More...
 
virtual casacore::Bool getMemoryUse ()=0
 
- Public Member Functions inherited from casa::Iterate
 Iterate ()
 Constructor. More...
 
virtual ~Iterate ()
 
void setFree ()
 Is this a free variable? More...
 
void setNotFree ()
 
casacore::Bool free ()
 
void setNumberIterations (const casacore::Int n)
 
void setGain (const casacore::Float g)
 
void setTolerance (const casacore::Float t)
 
void setThreshold (const casacore::Float t)
 
void setMode (const casacore::String m)
 
casacore::Int numberIterations ()
 
casacore::Float gain ()
 
casacore::Float tolerance ()
 
virtual casacore::Float threshold ()
 
const casacore::String mode ()
 

Protected Attributes

casacore::String itsAlgorithm
 
casacore::String itsSubAlgorithm
 
casacore::ImageRegionimageRegion_p
 this casacore::ImageRegion is used to suggest the shape for the XFR. More...
 
casacore::Bool isImageNormalized_p
 

Detailed Description

Sky Model: Model the Sky Brightness for the SkyEquation.

Intended use:

Public interface

Prerequisite

Etymology

SkyModel describes an interface for Models to be used in the SkyEquation. It is an Abstract Base Class: most methods must be defined in derived classes.

Synopsis

A SkyModel contains a number of separate models. The interface to SkyEquation is via an image per model. SkyEquation uses this image to calculate Fourier transforms, etc. Some (most) SkyModels are solvable: the SkyEquation can be used by the SkyModel to return gradients with respect to itself (via the image interface). Thus for a SkyModel to solve for itself, it calls the SkyEquation methods to get gradients of chi-squared with respect to the image pixel values (thus returning an image: basically a residual image). The SkyModel then uses these gradients as appropriate to update itself.

The following examples illustrate how a SkyModel can be used:

Example

// Read the VisSet from disk
VisSet vs("3c84.MS");
// Create an ImageSkyModel from an image on disk
ImageSkyModel ism(casacore::PagedImage<casacore::Float>("3c84.modelImage"));
// Make an FTMachine: here we use a simple Grid and FT.
GridFT ft;
SkyEquation se(ism, vs, ft);
// Predict the visibility set
se.predict();
// Make a Clean Image and write it out
HogbomCleanImageSkyModel csm(ism);
if (csm.solve()) {
casacore::PagedImage<casacore::Float> cleanImage=csm.image(0);
cleanImage.setName("3c84.cleanImage");
}

Motivation

The properties of a model of the sky must be described for the SkyEquation.

To Do

Definition at line 132 of file SkyModel.h.

Member Enumeration Documentation

Enumerator
CIRCULAR 
LINEAR 

Definition at line 136 of file SkyModel.h.

Constructor & Destructor Documentation

casa::SkyModel::SkyModel ( )
inline

Definition at line 141 of file SkyModel.h.

Member Function Documentation

virtual void casa::SkyModel::addStatistics ( casacore::Float  sumwt,
casacore::Float  chisq 
)
pure virtual

Add to Sum weights, Chi-Squared.

Implemented in casa::ImageSkyModel.

virtual casacore::ImageInterface<casacore::Complex>& casa::SkyModel::cImage ( casacore::Int  model = 0)
pure virtual

casacore::Complex image (needed for e.g.

RR,RL,LR,LL)

Implemented in casa::ImageSkyModel.

virtual ComponentList& casa::SkyModel::componentList ( )
pure virtual

Return the component list.

Implemented in casa::ImageSkyModel.

virtual casacore::ImageInterface<casacore::Float>& casa::SkyModel::deltaImage ( casacore::Int  model = 0)
pure virtual

Increment in the image.

Implemented in casa::ImageSkyModel.

virtual casacore::Bool casa::SkyModel::doFluxScale ( casacore::Int  model = 0)
pure virtual

Is there a flux scale image associated with this model?

Implemented in casa::ImageSkyModel.

virtual void casa::SkyModel::finalizeGradients ( )
pure virtual

Finalize for gradient search.

Implemented in casa::ImageSkyModel.

virtual casacore::ImageInterface<casacore::Float>& casa::SkyModel::fluxScale ( casacore::Int  model = 0)
pure virtual

FluxScale image: image * fluxScale => true brightness distribution.

Implemented in casa::ImageSkyModel.

const casacore::String casa::SkyModel::getAlgorithm ( )
inline

get Algorithm

Definition at line 219 of file SkyModel.h.

References itsAlgorithm.

virtual casacore::Bool casa::SkyModel::getMemoryUse ( )
pure virtual

Implemented in casa::ImageSkyModel.

virtual casacore::Int casa::SkyModel::getModelIndex ( casacore::uInt  field = 0,
casacore::uInt  taylor = 0 
)
pure virtual
virtual casacore::Double casa::SkyModel::getReferenceFrequency ( )
pure virtual

MFS : Reference Frequency.

Implemented in casa::ImageSkyModel, and casa::WBCleanImageSkyModel.

const casacore::String casa::SkyModel::getSubAlgorithm ( )
inline

get Sub Algorithm

Definition at line 225 of file SkyModel.h.

References itsSubAlgorithm.

virtual casacore::Int casa::SkyModel::getTaylorIndex ( casacore::Int  index = 0)
pure virtual

MFS : Index of Taylor term in array of nmodels x ntaylorterms.

Implemented in casa::ImageSkyModel.

virtual casacore::ImageInterface<casacore::Float>& casa::SkyModel::ggS ( casacore::Int  model = 0)
pure virtual

Grad Grad chi-squared wrt pixels (diagonal elements only)

Implemented in casa::ImageSkyModel.

virtual casacore::ImageInterface<casacore::Float>& casa::SkyModel::gS ( casacore::Int  model = 0)
pure virtual

Gradient of chi-squared wrt pixels.

Implemented in casa::ImageSkyModel.

virtual casacore::Bool casa::SkyModel::hasComponentList ( )
pure virtual

Return the component list.

Implemented in casa::ImageSkyModel.

virtual casacore::Bool casa::SkyModel::hasXFR ( casacore::Int  model = 0)
pure virtual

Implemented in casa::ImageSkyModel.

virtual casacore::ImageInterface<casacore::Float>& casa::SkyModel::image ( casacore::Int  model = 0)
pure virtual

Image interface for this model (casacore::Stokes representation)

Implemented in casa::ImageSkyModel.

virtual void casa::SkyModel::initializeGradients ( )
pure virtual

Initialize for gradient search.

Implemented in casa::ImageSkyModel.

virtual casacore::Bool casa::SkyModel::isEmpty ( casacore::Int  model = 0)
pure virtual

Is this model empty.

Implemented in casa::ImageSkyModel.

casacore::Bool casa::SkyModel::isImageNormalized ( )
inline

Definition at line 235 of file SkyModel.h.

References isImageNormalized_p.

virtual casacore::Bool casa::SkyModel::isSolveable ( casacore::Int  model = 0)
pure virtual

Is this SkyModel solveable?

Implemented in casa::ImageSkyModel.

virtual casacore::Int casa::SkyModel::numberOfModels ( )
pure virtual

Number of models contained.

Implemented in casa::ImageSkyModel.

virtual casacore::Int casa::SkyModel::numberOfTaylorTerms ( )
pure virtual

MFS : Number of taylor terms per model.

Implemented in casa::ImageSkyModel, and casa::WBCleanImageSkyModel.

virtual casacore::ImageInterface<casacore::Float>& casa::SkyModel::PSF ( casacore::Int  model = 0)
pure virtual

PSF.

Implemented in casa::ImageSkyModel.

void casa::SkyModel::setAlgorithm ( const casacore::String alg)
inline

set Algorithm (e.g clean, mem, nnls)

Definition at line 216 of file SkyModel.h.

References itsAlgorithm.

void casa::SkyModel::setImageNormalization ( casacore::Bool  val)
inline

Definition at line 234 of file SkyModel.h.

References isImageNormalized_p.

void casa::SkyModel::setImageRegion ( casacore::ImageRegion ir)
inline

Set the imageregion that will be used for the next XFR generation.

Definition at line 229 of file SkyModel.h.

References imageRegion_p.

virtual void casa::SkyModel::setMemoryUse ( casacore::Bool  memuse)
pure virtual

set and get memory usage model

Implemented in casa::ImageSkyModel.

void casa::SkyModel::setSubAlgorithm ( const casacore::String alg)
inline

set Sub Algorithm

Definition at line 222 of file SkyModel.h.

References itsSubAlgorithm.

virtual casacore::Bool casa::SkyModel::solve ( SkyEquation se)
pure virtual
void casa::SkyModel::unsetImageRegion ( )
inline

use the default shape

Definition at line 231 of file SkyModel.h.

References imageRegion_p.

virtual casacore::Matrix<casacore::Float>& casa::SkyModel::weight ( casacore::Int  model = 0)
pure virtual

Weight per model (channels, polarizations)

Implemented in casa::ImageSkyModel.

virtual casacore::ImageInterface<casacore::Float>& casa::SkyModel::work ( casacore::Int  model = 0)
pure virtual

Work image.

Implemented in casa::ImageSkyModel.

virtual casacore::ImageInterface<casacore::Complex>& casa::SkyModel::XFR ( casacore::Int  model = 0,
casacore::Int  numXFR = 0 
)
pure virtual

casacore::Complex XFR

Implemented in casa::ImageSkyModel.

Member Data Documentation

casacore::ImageRegion* casa::SkyModel::imageRegion_p
protected

this casacore::ImageRegion is used to suggest the shape for the XFR.

If null, then just use the shape of image(model)

Definition at line 246 of file SkyModel.h.

Referenced by setImageRegion(), and unsetImageRegion().

casacore::Bool casa::SkyModel::isImageNormalized_p
protected

Definition at line 247 of file SkyModel.h.

Referenced by isImageNormalized(), and setImageNormalization().

casacore::String casa::SkyModel::itsAlgorithm
protected

Definition at line 242 of file SkyModel.h.

Referenced by getAlgorithm(), and setAlgorithm().

casacore::String casa::SkyModel::itsSubAlgorithm
protected

Definition at line 243 of file SkyModel.h.

Referenced by getSubAlgorithm(), and setSubAlgorithm().


The documentation for this class was generated from the following file: