29 #ifndef SYNTHESIS_IMAGESKYMODEL_H
30 #define SYNTHESIS_IMAGESKYMODEL_H
351 #ifndef AIPS_NO_TEMPLATE_SRC
352 #include <synthesis/MeasurementComponents/ImageSkyModel.tcc>
353 #endif //# AIPS_NO_TEMPLATE_SRC
casacore::PtrBlock< casacore::ImageInterface< casacore::Float > * > fluxScale_p
if (doFluxScale_p), image_p * fluxScale_p gives the true brightness
casacore::Bool modified_p
check if model has been modified especially for continuing a deconvolution
A Vector of integers, for indexing into Array<T> objects.
casacore::Bool solveResiduals(SkyEquation &me, casacore::Bool modelToMS=false)
Solve explicitly for the residuals: same as solve for this class modelToMs determines if predicted vi...
virtual casacore::Bool addResidual(casacore::Int image, casacore::ImageInterface< casacore::Float > &residual)
Add a residual image.
casacore::Vector< casacore::String > imageNames_p
Images.
casacore::Bool fix(casacore::Int model=0)
Temporary astronomical images.
virtual casacore::Bool updatemodel(ComponentList &compList)
update componentlist
virtual casacore::Bool add(ComponentList &compList)
Add a componentlist.
void setCycleFactor(float x)
This is the factor by which you multiply the worst outer sidelobe by to get the threshold for the cur...
casacore::ImageBeamSet & beam(casacore::Int model=0)
Return the fitted beam for each model.
virtual casacore::Double getReferenceFrequency()
MFS : Reference Frequency.
casacore::Bool donePSF_p
If PSF is done..should not redo it.
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...
virtual casacore::Bool getMemoryUse()
casacore::Long cacheSize(casacore::Int model)
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) wi...
casacore::ImageInterface< casacore::Float > & ggS(casacore::Int model=0)
Grad Grad chi-squared wrt pixels (diagonal elements only)
void setPGPlotter(casacore::PGPlotter &pgp)
Set casacore::PGPlotter to be used.
casacore::PtrBlock< casacore::ImageInterface< casacore::Float > * > psf_p
casacore::ImageInterface< casacore::Float > & fluxScale(casacore::Int model=0)
if (doFluxScale(mod)) image(mod) * fluxScale(mod) gives actual brightness distribution ...
casacore::ImageInterface< casacore::Float > & gS(casacore::Int model=0)
Gradient of chi-squared wrt pixels.
casacore::ImageInterface< casacore::Float > & work(casacore::Int model=0)
Work image.
casacore::ImageInterface< casacore::Float > & residual(casacore::Int model=0)
casacore::ImageInterface< casacore::Complex > & cImage(casacore::Int model=0)
casacore::Complex image (needed for e.g.
casacore::PtrBlock< casacore::ImageInterface< casacore::Float > * > residualImage_p
casacore::Int maxNumXFR_p
casacore::Float cycleSpeedup_p
Cycle threshold will double in this number of iterations (ie, use a large number if you don't want cy...
casacore::PtrBlock< casacore::ImageInterface< casacore::Float > * > gS_p
void setMaxNumberModels(const casacore::Int maxNumModels)
void setTileVol(const casacore::Int tileVol=1000000)
Set templattice tile vol in pixels.
virtual void finalizeGradients()
Finalize for gradient search.
casacore::Block< casacore::Bool > solve_p
casacore::Block< casacore::Bool > doFluxScale_p
virtual casacore::Int numberOfTaylorTerms()
MFS : Number of taylor terms per model.
casacore::IPosition tileShape(casacore::Int model)
casacore::PtrBlock< casacore::ImageInterface< casacore::Float > * > residual_p
virtual casacore::Bool calculateCoeffResiduals()
MFS : In-place coefficient residual calculations.
ImageSkyModel & operator=(const ImageSkyModel &other)
Assignment operator.
casacore::PGPlotter * pgplotter_p
Define the shape and tile shape.
casacore::ImageInterface< casacore::Float > & PSF(casacore::Int model=0)
PSF.
virtual void setMemoryUse(casacore::Bool useMem=false)
try to make templattices use memory if possible if set to false then always use disk ...
casacore::PtrBlock< casacore::ImageInterface< casacore::Float > * > image_p
Everything here can be just interface.
void setCycleMaxPsfFraction(float x)
Yet another control for the minor cycle threshold.
casacore::Bool displayProgress_p
Represents a set of restoring beams associated with an image.
casacore::Bool makeNewtonRaphsonStep(SkyEquation &se, casacore::Bool incremental=false, casacore::Bool modelToMS=false)
Make Newton Raphson step internally.
casacore::PtrBlock< casacore::ImageInterface< casacore::Complex > * > cxfr_p
casacore::PtrBlock< casacore::ImageInterface< casacore::Float > * > deltaimage_p
void setCycleSpeedup(float x)
Cycle threshold will double in this number of iterations (ie, use a large number if you don't want cy...
casacore::Bool workDirOnNFS_p
casacore::Bool isEmpty(casacore::Int model=0)
Is this model empty.
Image Sky Model: Image-based Model for the Sky Brightness.
casacore::Bool hasComponentList()
Does this have a component list?
bool Bool
Define the standard types used by Casacore.
ComponentList * componentList_p
ComponentList.
casacore::Bool hasXFR(casacore::Int model=0)
casacore::ImageInterface< casacore::Complex > & XFR(casacore::Int model=0, casacore::Int numXFR=0)
casacore::Complex XFR
A drop-in replacement for Block<T*>.
virtual casacore::Int getTaylorIndex(casacore::Int index)
MFS : Index of Taylor term in array of nmodels x ntaylorterms virtual casacore::Int getTaylorIndex(c...
casacore::LogSink & logSink()
casacore::PtrBlock< casacore::Matrix< casacore::Float > * > weight_p
virtual ComponentList & componentList()
Return the component list.
ImageSkyModel(const casacore::Int maxNumModels=1)
Empty constructor.
void mandateFluxScale(casacore::Int model=0)
require use of flux scale image
Sky Model: Model the Sky Brightness for the SkyEquation.
Standard plotting object for application programmers.
casacore::PtrBlock< casacore::ImageInterface< casacore::Float > * > work_p
casacore::Int nfields_p
MFS.
casacore::Float cycleMaxPsfFraction_p
Cycle threshold = maxResidual x min(Max-Psf-Fraction, cyclefactor x maxpsfsidelobe) ...
casacore::LogSink logSink_p
virtual void makeApproxPSFs(SkyEquation &se)
Make the approximate PSFs needed for each model.
casacore::Bool isSolveable(casacore::Int model=0)
Is this model solveable?
casacore::PtrBlock< casacore::ImageInterface< casacore::Float > * > ggS_p
A class for manipulating groups of components.
virtual casacore::Int numberOfModels()
Number of models contained.
virtual ~ImageSkyModel()
Destructor.
Distribute LogMessages to their destination(s)
casacore::Float cycleFactor_p
This is the factor by which you multiply the worst outer sidelobe by to get the threshold for the cur...
casacore::ImageInterface< casacore::Float > & deltaImage(casacore::Int model=0)
Increment in the image.
void setDataPolFrame(StokesImageUtil::PolRep datapolrep)
Set a variable to indicate the polarization frame in the data (circular or linear).
virtual casacore::Bool solve(SkyEquation &me)
Solve for this SkyModel: This replaces the image with the residual image.
virtual casacore::Bool calculateAlphaBeta(const casacore::Vector< casacore::String > &, const casacore::Vector< casacore::String > &)
MFS : Calculate restored alpha and beta.
casacore::Int maxnmodels_p
casacore::PtrBlock< casacore::ImageBeamSet * > beam_p
virtual casacore::Int getModelIndex(casacore::uInt field, casacore::uInt)
casacore::ImageInterface< casacore::Float > & image(casacore::Int model=0)
Return actual images to be used by SkyEquation.
casacore::PGPlotter * getPGPlotter()
Get casacore::PGPlotter to be used.
void setDisplayProgress(const casacore::Bool display)
Set the variable that switches on the progress display.
casacore::Bool doFluxScale(casacore::Int model=0)
tells if this model needs to be multiplied by a flux scale image
casacore::Matrix< casacore::Float > & weight(casacore::Int model=0)
Weight per model (channels, polarizations)
StokesImageUtil::PolRep dataPolRep_p
Parameter to indicate the polaraization type of the data (circular or linear) Required by cImage() to...
casacore::PtrBlock< casacore::ImageInterface< casacore::Complex > * > cimage_p
We actually create these.
Interconvert pixel and world coordinates.
virtual void initializeGradients()
Initialize for gradient search.
void addStatistics(casacore::Float sumwt, casacore::Float chisq)
Add to Sum weights, Chi-Squared.