casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Protected Attributes
casa::SkyModel Class Reference

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

List of all members.

Public Types

enum  PolRep {
  CIRCULAR,
  LINEAR
}

Public Member Functions

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

Bool isImageNormalized ()

Protected Attributes

String itsAlgorithm
String itsSubAlgorithm
ImageRegionimageRegion_p
 this ImageRegion is used to suggest the shape for the XFR.
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(PagedImage<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()) {
           PagedImage<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

Definition at line 141 of file SkyModel.h.


Member Function Documentation

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

Add to Sum weights, Chi-Squared.

Implemented in casa::ImageSkyModel.

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

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 ImageInterface<Float>& casa::SkyModel::deltaImage ( Int  model = 0) [pure virtual]

Increment in the image.

Implemented in casa::ImageSkyModel.

virtual Bool casa::SkyModel::doFluxScale ( 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 ImageInterface<Float>& casa::SkyModel::fluxScale ( Int  model = 0) [pure virtual]

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

Implemented in casa::ImageSkyModel.

get Algorithm

Definition at line 219 of file SkyModel.h.

References itsAlgorithm.

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

MFS : Reference Frequency.

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

get Sub Algorithm

Definition at line 225 of file SkyModel.h.

References itsSubAlgorithm.

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

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

Implemented in casa::ImageSkyModel.

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

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

Implemented in casa::ImageSkyModel.

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

Gradient of chi-squared wrt pixels.

Implemented in casa::ImageSkyModel.

virtual Bool casa::SkyModel::hasComponentList ( ) [pure virtual]

Return the component list.

Implemented in casa::ImageSkyModel.

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

Implemented in casa::ImageSkyModel.

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

Image interface for this model (Stokes representation)

Implemented in casa::ImageSkyModel.

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

Initialize for gradient search.

Implemented in casa::ImageSkyModel.

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

Is this model empty.

Implemented in casa::ImageSkyModel.

Definition at line 235 of file SkyModel.h.

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

Is this SkyModel solveable?

Implemented in casa::ImageSkyModel.

virtual Int casa::SkyModel::numberOfModels ( ) [pure virtual]

Number of models contained.

Implemented in casa::ImageSkyModel.

virtual Int casa::SkyModel::numberOfTaylorTerms ( ) [pure virtual]

MFS : Number of taylor terms per model.

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

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

PSF.

Implemented in casa::ImageSkyModel.

void casa::SkyModel::setAlgorithm ( const String alg) [inline]

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

Definition at line 216 of file SkyModel.h.

References itsAlgorithm.

   

Definition at line 234 of file SkyModel.h.

References isImageNormalized_p.

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

Definition at line 229 of file SkyModel.h.

References imageRegion_p.

void casa::SkyModel::setSubAlgorithm ( const String alg) [inline]

set Sub Algorithm

Definition at line 222 of file SkyModel.h.

References itsSubAlgorithm.

virtual Bool casa::SkyModel::solve ( SkyEquation se) [pure virtual]

use the default shape

Definition at line 231 of file SkyModel.h.

References imageRegion_p.

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

Weight per model (channels, polarizations)

Implemented in casa::ImageSkyModel.

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

Work image.

Implemented in casa::ImageSkyModel.

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

Complex XFR.

Implemented in casa::ImageSkyModel.


Member Data Documentation

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

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

Definition at line 242 of file SkyModel.h.

Referenced by setImageRegion(), and unsetImageRegion().

Definition at line 243 of file SkyModel.h.

Referenced by setImageNormalization().

Definition at line 235 of file SkyModel.h.

Referenced by getAlgorithm(), and setAlgorithm().

Definition at line 239 of file SkyModel.h.

Referenced by getSubAlgorithm(), and setSubAlgorithm().


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