ImageSkyModel.h
Classes
- ImageSkyModel -- Image Sky Model: Image-based Model for the Sky Brightness (full description)
Interface
- Public Members
- ImageSkyModel(const Int maxNumModels=1)
- void setMaxNumberModels(const Int maxNumModels)
- ImageSkyModel(const ImageSkyModel& sm)
- virtual Bool add(ComponentList& compList)
- virtual Int add(ImageInterface<Float>& image, const Int maxNumXfr=100)
- virtual Bool addResidual(Int image, ImageInterface<Float>& residual)
- virtual ~ImageSkyModel()
- ImageSkyModel& operator=(const ImageSkyModel& other)
- virtual Int numberOfModels()
- Bool isSolveable(Int model=0)
- Bool free(Int model=0)
- Bool fix(Int model=0)
- virtual void initializeGradients()
- virtual void finalizeGradients()
- Bool hasComponentList()
- Bool isEmpty(Int model=0)
- virtual ComponentList& componentList()
- ImageInterface<Float>& image(Int model=0)
- ImageInterface<Complex>& cImage(Int model=0)
- ImageInterface<Complex>& XFR(Int model=0, Int numXFR=0)
- ImageInterface<Float>& PSF(Int model=0)
- ImageInterface<Float>& gS(Int model=0)
- ImageInterface<Float>& residual(Int model=0)
- ImageInterface<Float>& ggS(Int model=0)
- ImageInterface<Float>& fluxScale(Int model=0)
- ImageInterface<Float>& work(Int model=0)
- ImageInterface<Float>& deltaImage(Int model=0)
- Bool doFluxScale(Int model=0)
- void mandateFluxScale(Int model=0)
- Bool hasXFR(Int model=0)
- void addStatistics(Float sumwt, Float chisq)
- Matrix<Float>& weight(Int model=0)
- virtual Bool solve (SkyEquation& me)
- Bool solveResiduals (SkyEquation& me)
- virtual void makeApproxPSFs(SkyEquation& se)
- ImageInterface<Float>& getResidual (Int model=0)
- Vector<Float>& beam(Int model=0)
- void setPGPlotter(PGPlotter& pgp)
- void setCycleFactor(float x)
- void setCycleSpeedup(float x)
- void setDisplayProgress (const Bool display )
- Protected Members
- Bool makeNewtonRaphsonStep(SkyEquation& se, Bool incremental=False, Bool modelToMS=False)
- PGPlotter* getPGPlotter()
- LogSink& logSink()
Prerequisite
Etymology
ImageSkyModel describes an interface for Models to be used in
the SkyEquation. It is derived from SkyModel.
Synopsis
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.
Example
See the example for SkyModel.
Motivation
The properties of a model of the sky must be described
for the SkyEquation.
To Do
- Multiple images in SkyModel
- ComponentModel
Member Description
Empty constructor
Copy constructor
Add a componentlist
virtual Int add(ImageInterface<Float>& image, const Int maxNumXfr=100)
Add an image. maxNumXfr is the maximum Number of transfer functions
that we might want to associate with this image.
virtual Bool addResidual(Int image, ImageInterface<Float>& residual)
Add a residual image
Destructor
ImageSkyModel& operator=(const ImageSkyModel& other)
Assignment operator
Number of models contained
Is this model solveable?
Bool free(Int model=0)
Free and fix the model (returns previous status). Free means that
it will be solved for in any solution.
Bool fix(Int model=0)
Initialize for gradient search
Finalize for gradient search
Does this have a component list?
Bool isEmpty(Int model=0)
Return the component list
ImageInterface<Float>& fluxScale(Int model=0)
Return actual images to be used by SkyEquation.
if (doFluxScale(mod)) image(mod) * fluxScale(mod)
gives actual brightness distribution
ImageInterface<Float>& image(Int model=0)
ImageInterface<Complex>& cImage(Int model=0)
ImageInterface<Complex>& XFR(Int model=0, Int numXFR=0)
ImageInterface<Float>& PSF(Int model=0)
ImageInterface<Float>& gS(Int model=0)
ImageInterface<Float>& residual(Int model=0)
ImageInterface<Float>& ggS(Int model=0)
ImageInterface<Float>& work(Int model=0)
ImageInterface<Float>& deltaImage(Int model=0)
Return actual images to be used by SkyEquation.
tells if this model needs to be multiplied by a flux scale image
require use of flux scale image
Bool hasXFR(Int model=0)
void addStatistics(Float sumwt, Float chisq)
Add to Sum weights, Chi-Squared
Weight per model (channels, polarizations)
Solve for this SkyModel: This replaces the image with
the residual image
Solve explicitly for the residuals: same as solve for
this class
Make the approximate PSFs needed for each model
ImageInterface<Float>& getResidual (Int model=0)
Get current residual image: this is either that image specified via
addResidual, or a scratch image.
Vector<Float>& beam(Int model=0)
Return the fitted beam for each model
Set PGPlotter to be used
This is the factor by which you multiply the worst outer
sidelobe by to get the threshold for the current cycle
Cycle threshold will double in this number of iterations
(ie, use a large number if you don't want cycle threshold
to inch up)
Set the variable that switches on the progress display
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.
Get PGPlotter to be used