casa
5.7.0-16
|
Image Sky Model: Image-based Model for the Sky Brightness. More...
#include <ImageSkyModel.h>
Public Member Functions | |
ImageSkyModel (const casacore::Int maxNumModels=1) | |
Empty constructor. More... | |
void | setMaxNumberModels (const casacore::Int maxNumModels) |
ImageSkyModel (const ImageSkyModel &sm) | |
Copy constructor. More... | |
virtual casacore::Bool | add (ComponentList &compList) |
Add a componentlist. More... | |
virtual casacore::Bool | updatemodel (ComponentList &compList) |
update componentlist More... | |
virtual casacore::Int | add (casacore::ImageInterface< casacore::Float > &image, const casacore::Int maxNumXfr=100) |
Add an image. More... | |
virtual casacore::Bool | updatemodel (const casacore::Int thismodel, casacore::ImageInterface< casacore::Float > &image) |
update model image...you have to have added it before...nmodels_p held has to be bigger that image here its left to the caller to make sure the image is conformant...otherwise you are in trouble. More... | |
virtual casacore::Bool | addResidual (casacore::Int image, casacore::ImageInterface< casacore::Float > &residual) |
Add a residual image. More... | |
virtual | ~ImageSkyModel () |
Destructor. More... | |
ImageSkyModel & | operator= (const ImageSkyModel &other) |
Assignment operator. More... | |
virtual casacore::Int | numberOfModels () |
Number of models contained. More... | |
virtual casacore::Int | numberOfTaylorTerms () |
MFS : Number of taylor terms per model. More... | |
virtual casacore::Bool | calculateCoeffResiduals () |
MFS : In-place coefficient residual calculations. More... | |
virtual casacore::Bool | calculateAlphaBeta (const casacore::Vector< casacore::String > &, const casacore::Vector< casacore::String > &) |
MFS : Calculate restored alpha and beta. More... | |
virtual casacore::Double | getReferenceFrequency () |
MFS : Reference Frequency. More... | |
virtual casacore::Int | getTaylorIndex (casacore::Int index) |
MFS : Index of Taylor term in array of nmodels x ntaylorterms virtual casacore::Int getTaylorIndex(casacore::Int index){return 0;} More... | |
casacore::Bool | isSolveable (casacore::Int model=0) |
Is this model solveable? More... | |
casacore::Bool | free (casacore::Int model=0) |
Free and fix the model (returns previous status). More... | |
casacore::Bool | fix (casacore::Int model=0) |
virtual void | initializeGradients () |
Initialize for gradient search. More... | |
virtual void | finalizeGradients () |
Finalize for gradient search. More... | |
casacore::Bool | hasComponentList () |
Does this have a component list? More... | |
casacore::Bool | isEmpty (casacore::Int model=0) |
Is this model empty. More... | |
virtual ComponentList & | componentList () |
Return the component list. More... | |
casacore::ImageInterface < casacore::Float > & | image (casacore::Int model=0) |
Return actual images to be used by SkyEquation. More... | |
casacore::ImageInterface < casacore::Complex > & | cImage (casacore::Int model=0) |
casacore::Complex image (needed for e.g. More... | |
casacore::ImageInterface < casacore::Complex > & | XFR (casacore::Int model=0, casacore::Int numXFR=0) |
casacore::Complex XFR More... | |
casacore::ImageInterface < casacore::Float > & | PSF (casacore::Int model=0) |
PSF. More... | |
casacore::ImageInterface < casacore::Float > & | gS (casacore::Int model=0) |
Gradient of chi-squared wrt pixels. More... | |
casacore::ImageInterface < casacore::Float > & | residual (casacore::Int model=0) |
casacore::ImageInterface < casacore::Float > & | ggS (casacore::Int model=0) |
Grad Grad chi-squared wrt pixels (diagonal elements only) More... | |
casacore::ImageInterface < casacore::Float > & | fluxScale (casacore::Int model=0) |
if (doFluxScale(mod)) image(mod) * fluxScale(mod) gives actual brightness distribution More... | |
casacore::ImageInterface < casacore::Float > & | work (casacore::Int model=0) |
Work image. More... | |
casacore::ImageInterface < casacore::Float > & | deltaImage (casacore::Int model=0) |
Increment in the image. More... | |
casacore::Bool | doFluxScale (casacore::Int model=0) |
tells if this model needs to be multiplied by a flux scale image More... | |
void | mandateFluxScale (casacore::Int model=0) |
require use of flux scale image More... | |
casacore::Bool | hasXFR (casacore::Int model=0) |
void | addStatistics (casacore::Float sumwt, casacore::Float chisq) |
Add to Sum weights, Chi-Squared. More... | |
casacore::Matrix < casacore::Float > & | weight (casacore::Int model=0) |
Weight per model (channels, polarizations) More... | |
virtual casacore::Bool | solve (SkyEquation &me) |
Solve for this SkyModel: This replaces the image with the residual image. More... | |
casacore::Bool | solveResiduals (SkyEquation &me, casacore::Bool modelToMS=false) |
Solve explicitly for the residuals: same as solve for this class modelToMs determines if predicted vis is put in the MODEL_DATA column. More... | |
virtual void | makeApproxPSFs (SkyEquation &se) |
Make the approximate PSFs needed for each model. More... | |
virtual casacore::ImageInterface < casacore::Float > & | getResidual (casacore::Int model=0) |
Get current residual image: this is either that image specified via addResidual, or a scratch image. More... | |
casacore::ImageBeamSet & | beam (casacore::Int model=0) |
Return the fitted beam for each model. More... | |
void | setPGPlotter (casacore::PGPlotter &pgp) |
Set casacore::PGPlotter to be used. More... | |
void | setCycleFactor (float x) |
This is the factor by which you multiply the worst outer sidelobe by to get the threshold for the current cycle. More... | |
void | setCycleSpeedup (float x) |
Cycle threshold will double in this number of iterations (ie, use a large number if you don't want cycle threshold to inch up) More... | |
void | setCycleMaxPsfFraction (float x) |
Yet another control for the minor cycle threshold. More... | |
void | setDisplayProgress (const casacore::Bool display) |
Set the variable that switches on the progress display. More... | |
void | setDataPolFrame (StokesImageUtil::PolRep datapolrep) |
Set a variable to indicate the polarization frame in the data (circular or linear). More... | |
virtual casacore::Int | getModelIndex (casacore::uInt field, casacore::uInt) |
virtual void | setMemoryUse (casacore::Bool useMem=false) |
try to make templattices use memory if possible if set to false then always use disk More... | |
virtual casacore::Bool | getMemoryUse () |
void | setTileVol (const casacore::Int tileVol=1000000) |
Set templattice tile vol in pixels. More... | |
Public Member Functions inherited from casa::SkyModel | |
SkyModel () | |
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 () |
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 () |
Static Public Member Functions | |
template<class M > | |
static casacore::TempImage< M > * | getTempImage (const casacore::TiledShape &imgShp, const casacore::CoordinateSystem &imgCoords, const casacore::uInt nMouthsToFeed=1) |
Tries to return a pointer to a casacore::TempImage (allocated with new, so remember to use delete) with the given shape and CoordinateSystem. More... | |
Protected Member Functions | |
casacore::Bool | makeNewtonRaphsonStep (SkyEquation &se, casacore::Bool incremental=false, casacore::Bool modelToMS=false) |
Make Newton Raphson step internally. More... | |
casacore::PGPlotter * | getPGPlotter () |
Get casacore::PGPlotter to be used. More... | |
casacore::LogSink & | logSink () |
casacore::Long | cacheSize (casacore::Int model) |
casacore::IPosition | tileShape (casacore::Int model) |
Additional Inherited Members | |
Public Types inherited from casa::SkyModel | |
enum | PolRep { CIRCULAR, LINEAR } |
Image Sky Model: Image-based Model for the Sky Brightness.
Public interface
ImageSkyModel describes an interface for Models to be used in the SkyEquation. It is derived from SkyModel.
A ImageSkyModel 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.
See the example for SkyModel.
The properties of a model of the sky must be described for the SkyEquation.
Definition at line 93 of file ImageSkyModel.h.
casa::ImageSkyModel::ImageSkyModel | ( | const casacore::Int | maxNumModels = 1 | ) |
Empty constructor.
casa::ImageSkyModel::ImageSkyModel | ( | const ImageSkyModel & | sm | ) |
Copy constructor.
|
virtual |
Destructor.
|
virtual |
Add a componentlist.
Reimplemented in casa::CleanImageSkyModel.
|
virtual |
Add an image.
maxNumXfr is the maximum Number of transfer functions that we might want to associate with this image.
Reimplemented in casa::CleanImageSkyModel, casa::WFCleanImageSkyModel, casa::MFCleanImageSkyModel, and casa::CSCleanImageSkyModel.
|
virtual |
Add a residual image.
Reimplemented in casa::WFCleanImageSkyModel, casa::MFCleanImageSkyModel, and casa::CSCleanImageSkyModel.
|
inlinevirtual |
Add to Sum weights, Chi-Squared.
Implements casa::SkyModel.
Definition at line 190 of file ImageSkyModel.h.
casacore::ImageBeamSet& casa::ImageSkyModel::beam | ( | casacore::Int | model = 0 | ) |
Return the fitted beam for each model.
|
protected |
|
inlinevirtual |
MFS : Calculate restored alpha and beta.
Reimplemented in casa::WBCleanImageSkyModel.
Definition at line 135 of file ImageSkyModel.h.
|
inlinevirtual |
MFS : In-place coefficient residual calculations.
Reimplemented in casa::WBCleanImageSkyModel.
Definition at line 132 of file ImageSkyModel.h.
|
virtual |
|
virtual |
Return the component list.
Implements casa::SkyModel.
|
virtual |
Increment in the image.
Implements casa::SkyModel.
|
virtual |
tells if this model needs to be multiplied by a flux scale image
Implements casa::SkyModel.
|
inlinevirtual |
Finalize for gradient search.
Implements casa::SkyModel.
Definition at line 156 of file ImageSkyModel.h.
casacore::Bool casa::ImageSkyModel::fix | ( | casacore::Int | model = 0 | ) |
|
virtual |
if (doFluxScale(mod)) image(mod) * fluxScale(mod) gives actual brightness distribution
Implements casa::SkyModel.
casacore::Bool casa::ImageSkyModel::free | ( | casacore::Int | model = 0 | ) |
Free and fix the model (returns previous status).
Free means that it will be solved for in any solution.
|
inlinevirtual |
|
inlinevirtual |
Implements casa::SkyModel.
Reimplemented in casa::WBCleanImageSkyModel.
Definition at line 257 of file ImageSkyModel.h.
|
inlineprotected |
Get casacore::PGPlotter to be used.
Definition at line 277 of file ImageSkyModel.h.
References pgplotter_p.
|
inlinevirtual |
MFS : Reference Frequency.
Implements casa::SkyModel.
Reimplemented in casa::WBCleanImageSkyModel.
Definition at line 138 of file ImageSkyModel.h.
|
virtual |
Get current residual image: this is either that image specified via addResidual, or a scratch image.
For example in WFImageSkyModel it might return the whole main image rather than facets
Reimplemented in casa::WFCleanImageSkyModel.
|
inlinevirtual |
MFS : Index of Taylor term in array of nmodels x ntaylorterms
virtual casacore::Int getTaylorIndex(casacore::Int index){return 0;}
Implements casa::SkyModel.
Definition at line 142 of file ImageSkyModel.h.
References nfields_p.
|
static |
Tries to return a pointer to a casacore::TempImage (allocated with new, so remember to use delete) with the given shape and CoordinateSystem.
imgShp | |
imgCoords | |
nMouthsToFeed,: | If > 1 it is taken as a hint that it should leave room for nMouthsToFeed - 1 more TempImages. |
<throws> casacore::AipsError on memory allocation error. </throws>
|
virtual |
Grad Grad chi-squared wrt pixels (diagonal elements only)
Implements casa::SkyModel.
|
virtual |
Gradient of chi-squared wrt pixels.
Implements casa::SkyModel.
|
virtual |
Does this have a component list?
Implements casa::SkyModel.
|
virtual |
Implements casa::SkyModel.
|
virtual |
Return actual images to be used by SkyEquation.
Implements casa::SkyModel.
|
virtual |
Initialize for gradient search.
Implements casa::SkyModel.
|
virtual |
Is this model empty.
Implements casa::SkyModel.
|
virtual |
Is this model solveable?
Implements casa::SkyModel.
|
inlineprotected |
Definition at line 317 of file ImageSkyModel.h.
References logSink_p.
|
virtual |
Make the approximate PSFs needed for each model.
Reimplemented in casa::PWFCleanImageSkyModel.
|
protected |
Make Newton Raphson step internally.
This is really an implementation detail: it is useful for derived classes. The modelToMS parameter is for committing to MODEL_DATA column of the MS the predicted visibilities.
void casa::ImageSkyModel::mandateFluxScale | ( | casacore::Int | model = 0 | ) |
require use of flux scale image
|
inlinevirtual |
Number of models contained.
Implements casa::SkyModel.
Definition at line 126 of file ImageSkyModel.h.
References nmodels_p.
|
inlinevirtual |
MFS : Number of taylor terms per model.
Implements casa::SkyModel.
Reimplemented in casa::WBCleanImageSkyModel.
Definition at line 129 of file ImageSkyModel.h.
ImageSkyModel& casa::ImageSkyModel::operator= | ( | const ImageSkyModel & | other | ) |
Assignment operator.
|
virtual |
PSF.
Implements casa::SkyModel.
casacore::ImageInterface<casacore::Float>& casa::ImageSkyModel::residual | ( | casacore::Int | model = 0 | ) |
|
inline |
This is the factor by which you multiply the worst outer sidelobe by to get the threshold for the current cycle.
Definition at line 221 of file ImageSkyModel.h.
References cycleFactor_p.
|
inline |
Yet another control for the minor cycle threshold.
This is in response to CAS-2673 This allows control similar to 'cyclefactor' - used in MFClarkCleanSkyModel
Definition at line 231 of file ImageSkyModel.h.
References cycleMaxPsfFraction_p.
|
inline |
Cycle threshold will double in this number of iterations (ie, use a large number if you don't want cycle threshold to inch up)
Definition at line 226 of file ImageSkyModel.h.
References cycleSpeedup_p.
|
inline |
Set a variable to indicate the polarization frame in the data (circular or linear).
This is used along with the user's choice of output casacore::Stokes parameter to decide the stokesCoordinate of the temporary images "cImage".
Definition at line 239 of file ImageSkyModel.h.
References dataPolRep_p.
|
inline |
Set the variable that switches on the progress display.
Definition at line 234 of file ImageSkyModel.h.
References displayProgress_p.
void casa::ImageSkyModel::setMaxNumberModels | ( | const casacore::Int | maxNumModels | ) |
|
virtual |
try to make templattices use memory if possible if set to false then always use disk
Implements casa::SkyModel.
|
inline |
Set casacore::PGPlotter to be used.
Definition at line 217 of file ImageSkyModel.h.
References pgplotter_p.
void casa::ImageSkyModel::setTileVol | ( | const casacore::Int | tileVol = 1000000 | ) |
Set templattice tile vol in pixels.
|
virtual |
Solve for this SkyModel: This replaces the image with the residual image.
Implements casa::SkyModel.
Reimplemented in casa::MFMSCleanImageSkyModel, casa::MSCleanImageSkyModel, casa::WFCleanImageSkyModel, casa::WBCleanImageSkyModel, casa::ClarkCleanImageSkyModel, casa::MFCleanImageSkyModel, casa::CSCleanImageSkyModel, casa::MFCEMemImageSkyModel, casa::CEMemImageSkyModel, casa::PClarkCleanImageSkyModel, casa::HogbomCleanImageSkyModel, casa::PWFCleanImageSkyModel, and casa::NNLSImageSkyModel.
casacore::Bool casa::ImageSkyModel::solveResiduals | ( | SkyEquation & | me, |
casacore::Bool | modelToMS = false |
||
) |
Solve explicitly for the residuals: same as solve for this class modelToMs determines if predicted vis is put in the MODEL_DATA column.
|
protected |
|
virtual |
update componentlist
|
virtual |
update model image...you have to have added it before...nmodels_p held has to be bigger that image here its left to the caller to make sure the image is conformant...otherwise you are in trouble.
|
virtual |
Weight per model (channels, polarizations)
Implements casa::SkyModel.
|
virtual |
Work image.
Implements casa::SkyModel.
|
virtual |
casacore::Complex XFR
Implements casa::SkyModel.
|
protected |
Definition at line 314 of file ImageSkyModel.h.
|
protected |
Definition at line 287 of file ImageSkyModel.h.
Referenced by addStatistics().
|
protected |
We actually create these.
Definition at line 299 of file ImageSkyModel.h.
|
protected |
Definition at line 290 of file ImageSkyModel.h.
|
protected |
Definition at line 300 of file ImageSkyModel.h.
|
protected |
This is the factor by which you multiply the worst outer sidelobe by to get the threshold for the current cycle.
Definition at line 326 of file ImageSkyModel.h.
Referenced by setCycleFactor().
|
protected |
Cycle threshold = maxResidual x min(Max-Psf-Fraction, cyclefactor x maxpsfsidelobe)
Definition at line 332 of file ImageSkyModel.h.
Referenced by setCycleMaxPsfFraction().
|
protected |
Cycle threshold will double in this number of iterations (ie, use a large number if you don't want cycle threshold to inch up)
Definition at line 330 of file ImageSkyModel.h.
Referenced by setCycleSpeedup().
|
protected |
Parameter to indicate the polaraization type of the data (circular or linear) Required by cImage() to decide shapes.
Definition at line 340 of file ImageSkyModel.h.
Referenced by setDataPolFrame().
|
protected |
Definition at line 308 of file ImageSkyModel.h.
|
protected |
Definition at line 323 of file ImageSkyModel.h.
Referenced by setDisplayProgress().
|
protected |
Definition at line 310 of file ImageSkyModel.h.
|
protected |
If PSF is done..should not redo it.
Definition at line 334 of file ImageSkyModel.h.
|
protected |
if (doFluxScale_p), image_p * fluxScale_p gives the true brightness
Definition at line 306 of file ImageSkyModel.h.
|
protected |
Definition at line 304 of file ImageSkyModel.h.
|
protected |
Definition at line 302 of file ImageSkyModel.h.
|
protected |
Everything here can be just interface.
Definition at line 295 of file ImageSkyModel.h.
|
protected |
Images.
Definition at line 293 of file ImageSkyModel.h.
|
protected |
Definition at line 316 of file ImageSkyModel.h.
Referenced by logSink().
|
protected |
Definition at line 279 of file ImageSkyModel.h.
|
protected |
Definition at line 284 of file ImageSkyModel.h.
|
protected |
check if model has been modified especially for continuing a deconvolution
Definition at line 337 of file ImageSkyModel.h.
|
protected |
MFS.
Definition at line 282 of file ImageSkyModel.h.
Referenced by casa::WBCleanImageSkyModel::getFieldIndex(), casa::WBCleanImageSkyModel::getModelIndex(), casa::WBCleanImageSkyModel::getTaylorIndex(), and getTaylorIndex().
|
protected |
Definition at line 280 of file ImageSkyModel.h.
Referenced by numberOfModels().
|
protected |
Definition at line 322 of file ImageSkyModel.h.
Referenced by getPGPlotter(), and setPGPlotter().
|
protected |
Definition at line 303 of file ImageSkyModel.h.
|
protected |
Definition at line 296 of file ImageSkyModel.h.
|
protected |
Definition at line 301 of file ImageSkyModel.h.
|
protected |
Definition at line 309 of file ImageSkyModel.h.
|
protected |
Definition at line 286 of file ImageSkyModel.h.
Referenced by addStatistics().
|
protected |
Definition at line 343 of file ImageSkyModel.h.
|
protected |
Definition at line 342 of file ImageSkyModel.h.
Referenced by getMemoryUse().
|
protected |
Definition at line 312 of file ImageSkyModel.h.
|
protected |
Definition at line 307 of file ImageSkyModel.h.
|
protected |
Definition at line 341 of file ImageSkyModel.h.