29 #ifndef SYNTHESIS_DECONVOLVER_H
30 #define SYNTHESIS_DECONVOLVER_H
46 template<
class T>
class Lattice;
casacore::LatticeConvolver< casacore::Float > * convolver_p
A Vector of integers, for indexing into Array<T> objects.
casacore::Bool nnls(const casacore::String &algorithm, const casacore::Int niter, const casacore::Float tolerance, const casacore::String &model, const casacore::String &fluxMask, const casacore::String &dataMask)
NNLS algorithm.
casacore::Bool close()
Flush the ms to disk and detach from the ms file.
casacore::Vector< casacore::Float > itsTotalFluxScale
casacore::Bool setupLatCleaner(const casacore::String &algorithm, const casacore::Int niter, const casacore::Float gain, const casacore::Quantity &threshold, const casacore::Bool displayProgress)
setup lattice cleaner
A class interfacing images to MatrixNACleaner.
casacore::GaussianBeam beam_p
casacore::Float itsTotalFlux
void checkMask(casacore::ImageInterface< casacore::Float > &maskimage, casacore::Int &xbeg, casacore::Int &xend, casacore::Int &ybeg, casacore::Int ¥d)
check mask
Temporary astronomical images.
std::shared_ptr< ImageNACleaner > naCleaner_p
casacore::String dirtyname() const
casacore::Bool make1(const casacore::String &imagename)
Make an empty image with just one casacore::Stokes pixel (ie, for a mask)
casacore::Bool mtcalcpowerlaw(const casacore::Vector< casacore::String > &images, const casacore::Vector< casacore::String > &residuals, const casacore::String &alphaname, const casacore::String &betaname, const casacore::Quantity &threshold, const casacore::Bool calcerror)
Calculate alpha and beta from restored images.
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
A class interfacing images to MatrixCleaner.
casacore::Bool fullPlane_p
Implements the convolution equation.
casacore::String psfName_p
casacore::Bool beamValid_p
casacore::Quantity bmaj_p, bmin_p, bpa_p;
casacore::Bool clarkclean(const casacore::Int niter, const casacore::Float gain, const casacore::Quantity &threshold, const casacore::String &model, const casacore::String &maskName, casacore::Float &maxresid, casacore::Int &iterused, casacore::Float cycleFactor=1.5)
Clark Clean but image, psf, mask has to be 4-axes in the canonical casa order.
casacore::Bool mtopen(const casacore::Int nTaylor, const casacore::Vector< casacore::Float > &userScaleSizes, const casacore::Vector< casacore::String > &psfs)
---------------— Multi-Term Deconvolver functions - START -------------------— Initialize the Multi-T...
casacore::Bool boxmask(const casacore::String &boxmask, const casacore::Vector< casacore::Int > blc, const casacore::Vector< casacore::Int > trc, const casacore::Quantity &fillValue=1.0, const casacore::Quantity &externalValue=0.0)
Make a Box Mask.
casacore::String state() const
Return the state of the object as a string.
casacore::String dirtyName_p
void defaults()
Set the defaults.
casacore::Bool convolve(const casacore::String &convolvedmodel, const casacore::String &model)
Convolve one image with another.
A Class for performing the Clark Clean Algorithm on Arrays.
casacore::Bool scalesValid_p
A class for doing multi-dimensional convolution.
casacore::Bool mtclean(const casacore::Vector< casacore::String > &residuals, const casacore::Vector< casacore::String > &models, const casacore::Int niter, const casacore::Float gain, const casacore::Quantity &threshold, const casacore::Bool displayProgress, const casacore::String &mask, casacore::Float &maxResidual, casacore::Int &iterationsDone)
Do component-finding iterations.
casacore::Bool setscales(const casacore::String &scaleMethod, const casacore::Int nscales, const casacore::Vector< casacore::Float > &userScaleSizes)
Set up scales: based on scaleMethod = "nscales" or "uservector", we will create the scale sizes in pi...
Interface class containing functions returning "Domain" type.
casacore::Bool mt_valid_p
casacore::Bool open(const casacore::String &dirty, const casacore::String &psf, casacore::Bool warn=true)
Open the given dirty image and psf If warn is true, print warnings about there being no psf if one is...
A 2-D Specialization of the Array class.
casacore::Bool removeTable(const casacore::String &tablename)
casacore::Bool valid() const
Represents a Gaussian restoring beam associated with an image.
casacore::Bool ft(const casacore::String &model, const casacore::String &transform)
Fourier transform the model and componentlist.
casacore::Bool reopen()
After some cleaning, the dirty image is replaced with the residual image in the deconvolver tool...
casacore::Bool residual(const casacore::String &model, const casacore::String &image)
Residual.
casacore::Bool makegaussian(const casacore::String &gaussianimage, casacore::GaussianBeam &mbeam, casacore::Bool normalizeVolume)
Make a Gaussian – you might want to use it for convolution, etc.
ResidualEquation< casacore::Lattice< casacore::Float > > * residEqn_p
A simple deconvolver operating on images (no SkyEquation)
casacore::Bool createMask(casacore::LatticeExpr< casacore::Bool > &lemask, casacore::ImageInterface< casacore::Float > &outimage)
Embed a mask into an image.
A templated, abstract base class for array-like objects.
Referenced counted pointer for constant data.
A base class for astronomical images.
casacore::Bool clean(const casacore::String &algorithm, const casacore::Int niter, const casacore::Float gain, const casacore::Quantity &threshold, const casacore::Bool displayProgress, const casacore::String &model, const casacore::String &mask, casacore::Float &maxResidual, casacore::Int &iterationsDone)
Clean algorithm maxResidual and iterationsDone are return values
casacore::CountedPtr< ImageMSCleaner > cleaner_p
casacore::PagedImage< casacore::Float > * psf_p
Deconvolver & operator=(const Deconvolver &other)
casacore::Vector< casacore::Float > scaleSizes_p
casacore::Bool restore(const casacore::String &model, const casacore::String &image, casacore::GaussianBeam &mbeam)
Restore.
casacore::Bool clone(const casacore::String &imageName, const casacore::String &newImageName)
Clone an image.
casacore::String imageName() const
Class to get file information and a base for other file classes.
casacore::Bool naclean(const casacore::Int niter, const casacore::Float gain, const casacore::Quantity &threshold, const casacore::String &model, const casacore::String &mask, const casacore::Int masksupp, const casacore::Int memoryType, const casacore::Float numSigma, casacore::Float &maxResidual, casacore::Int &iterationsDone)
casacore::Bool detached() const
Prints an error message if the deconvolver DO is detached and returns true.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
casacore::Bool fitpsf(const casacore::String &psf, casacore::GaussianBeam &beam)
Fit the psf.
casacore::Bool summary() const
Output a summary of the state of the object.
void findAxes()
find which axes are the spectral and pol one
A (masked) subset of an ImageInterface object.
Implements the Cornwell & Evans MEM Algorithm on Lattices.
casacore::Bool regionmask(const casacore::String &maskimage, casacore::Record *imageRegRec, casacore::Matrix< casacore::Quantity > &blctrcs, const casacore::Float &value=1.0)
make a mask image from regions
casacore::Bool mem(const casacore::String &algorithm, const casacore::Int niter, const casacore::Quantity &sigma, const casacore::Quantity &targetFlux, casacore::Bool constrainTargetFlux, casacore::Bool displayprogress, const casacore::String &model, const casacore::String &prior="", const casacore::String &mask="", const casacore::Bool imagePlane=false)
MEM algorithm add other inputs as required.
Deconvolver()
"deconvolver" ctor
casacore::IPosition imageshape() const
Return the image shape.
casacore::Bool mtrestore(const casacore::Vector< casacore::String > &models, const casacore::Vector< casacore::String > &residuals, const casacore::Vector< casacore::String > &images, casacore::GaussianBeam &mbeam)
Restore the output images.
casacore::String psfname() const
casacore::Int mt_nterms_p
Multi-Term private variables.
String: the storage and methods of handling collections of characters.
casacore::SubImage< casacore::Float > * innerQuarter(casacore::PagedImage< casacore::Float > &in)
------------—— Multi-Term Deconvolver functions - END ----------------——
LatConvEquation * latConvEqn_p
casacore::Bool make(const casacore::String &model)
Make an empty image.
casacore::PagedImage< casacore::Float > * dirty_p
casacore::SubImage< casacore::Float > * allQuarters(casacore::PagedImage< casacore::Float > &in)
Return full image as a SubImage.
Class to allow C++ expressions involving lattices.
Read, store, and manipulate astronomical images.
casacore::Bool clipimage(const casacore::String &clippedImage, const casacore::String &inputImage, const casacore::Quantity &threshold)
Clip an image below some casacore::Stokes I threshold.
MultiTermMatrixCleaner mt_cleaner_p
casacore::Bool putGaussian(casacore::ImageInterface< casacore::Float > &im, const casacore::GaussianBeam &beam)
Put a unit peak gaussian at centre.
casacore::Bool smooth(const casacore::String &model, const casacore::String &image, casacore::GaussianBeam &mbeam, casacore::Bool normalizeVolume)
Smooth.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
casacore::Bool makeprior(const casacore::String &prior, const casacore::String &templateImage, const casacore::Quantity &lowClipfrom, const casacore::Quantity &lowClipto, const casacore::Quantity &highClipfrom, const casacore::Quantity &highClipto, const casacore::Vector< casacore::Int > &blc, const casacore::Vector< casacore::Int > &trc)
make a prior image
transform(a.begin(), a.end(), std::ostream_iterator< int >(cout,"\n"), compose(unary(h), compose(unary(f), unary(f))))
Global Functions.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.