casa
$Rev:20696$
|
Sky Model: Model the Sky Brightness for the SkyEquation. More...
#include <SkyModel.h>
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 ComponentList & | componentList ()=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 |
ImageRegion * | imageRegion_p |
this ImageRegion is used to suggest the shape for the XFR. | |
Bool | isImageNormalized_p |
Sky Model: Model the Sky Brightness for the SkyEquation.
Public interface
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.
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:
// 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"); }
The properties of a model of the sky must be described for the SkyEquation.
Definition at line 132 of file SkyModel.h.
Definition at line 136 of file SkyModel.h.
casa::SkyModel::SkyModel | ( | ) | [inline] |
Definition at line 141 of file SkyModel.h.
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] |
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.
const String casa::SkyModel::getAlgorithm | ( | ) | [inline] |
virtual Int casa::SkyModel::getModelIndex | ( | uInt | field = 0 , |
uInt | taylor = 0 |
||
) | [pure virtual] |
Implemented in casa::ImageSkyModel, and casa::WBCleanImageSkyModel.
virtual Double casa::SkyModel::getReferenceFrequency | ( | ) | [pure virtual] |
MFS : Reference Frequency.
Implemented in casa::ImageSkyModel, and casa::WBCleanImageSkyModel.
const String casa::SkyModel::getSubAlgorithm | ( | ) | [inline] |
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.
Bool casa::SkyModel::isImageNormalized | ( | ) | [inline] |
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.
void casa::SkyModel::setImageNormalization | ( | Bool | val | ) | [inline] |
void casa::SkyModel::setImageRegion | ( | 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.
void casa::SkyModel::setSubAlgorithm | ( | const String & | alg | ) | [inline] |
virtual Bool casa::SkyModel::solve | ( | SkyEquation & | se | ) | [pure virtual] |
Solve for this SkyModel.
Implemented in casa::ImageSkyModel, casa::MFMSCleanImageSkyModel, casa::MSCleanImageSkyModel, casa::WBCleanImageSkyModel, casa::WFCleanImageSkyModel, casa::ClarkCleanImageSkyModel, casa::MFCEMemImageSkyModel, casa::MFCleanImageSkyModel, casa::CSCleanImageSkyModel, casa::CEMemImageSkyModel, casa::PClarkCleanImageSkyModel, casa::PWFCleanImageSkyModel, casa::NNLSImageSkyModel, and casa::HogbomCleanImageSkyModel.
void casa::SkyModel::unsetImageRegion | ( | ) | [inline] |
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.
ImageRegion* casa::SkyModel::imageRegion_p [protected] |
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().
Bool casa::SkyModel::isImageNormalized_p [protected] |
Definition at line 243 of file SkyModel.h.
Referenced by setImageNormalization().
String casa::SkyModel::itsAlgorithm [protected] |
Definition at line 235 of file SkyModel.h.
Referenced by getAlgorithm(), and setAlgorithm().
String casa::SkyModel::itsSubAlgorithm [protected] |
Definition at line 239 of file SkyModel.h.
Referenced by getSubAlgorithm(), and setSubAlgorithm().