27 #ifndef SYNTHESIS_SIIMAGESTORE_H
28 #define SYNTHESIS_SIIMAGESTORE_H
55 enum IMAGE_IDS {
MASK=0,
PSF,
MODEL,
RESIDUAL,
WEIGHT,
IMAGE,
SUMWT,
GRIDWT,
PB,
FORWARDGRID,
BACKWARDGRID,
IMAGEPBCOR,
MAX_IMAGE_IDS};
104 virtual std::shared_ptr<casacore::ImageInterface<casacore::Float> >
psf(
casacore::uInt term=0);
106 virtual std::shared_ptr<casacore::ImageInterface<casacore::Float> >
weight(
casacore::uInt term=0);
107 virtual std::shared_ptr<casacore::ImageInterface<casacore::Float> >
model(
casacore::uInt term=0);
108 virtual std::shared_ptr<casacore::ImageInterface<casacore::Float> >
image(
casacore::uInt term=0);
109 virtual std::shared_ptr<casacore::ImageInterface<casacore::Float> >
mask(
casacore::uInt term=0);
112 virtual std::shared_ptr<casacore::ImageInterface<casacore::Float> >
sumwt(
casacore::uInt term=0);
116 virtual std::shared_ptr<casacore::ImageInterface<casacore::Float> >
beta(){
throw(
casacore::AipsError(
"No Beta for 1 term"));};
120 virtual std::shared_ptr<casacore::ImageInterface<casacore::Float> >
pb(
casacore::uInt term=0);
133 virtual void addImages( std::shared_ptr<SIImageStore> imagestoadd,
virtual std::shared_ptr< SIImageStore > getSubImageStore(const casacore::Int facet=0, const casacore::Int nfacets=1, const casacore::Int chan=0, const casacore::Int nchanchunks=1, const casacore::Int pol=0, const casacore::Int npolchunks=1)
The images internall will reference back to a given section of the main of this.
A Vector of integers, for indexing into Array<T> objects.
casacore::Float calcMean(casacore::Vector< casacore::Float > &vect, casacore::Vector< casacore::Bool > &flag)
virtual void divideModelByWeight(const casacore::Float pblimit=casacore::C::minfloat, const casacore::String normtype="flatnoise")
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsPB
void recreate(casacore::String &fileName)
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsSumWt
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsPsf
casacore::Bool copyMask(casacore::CountedPtr< casacore::ImageInterface< casacore::Float > >inimage, casacore::CountedPtr< casacore::ImageInterface< casacore::Float > >outimage)
casacore::Bool createMask(casacore::LatticeExpr< casacore::Bool > &lemask, casacore::CountedPtr< casacore::ImageInterface< casacore::Float > >outimage)
casacore::IPosition getShape()
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > model(casacore::uInt term=0)
casacore::ImageBeamSet itsRestoredBeams
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsParentImage
virtual void printImageStats()
casacore::GaussianBeam findGoodBeam()
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsImagePBcor
casacore::Int itsNPolChunks
virtual casacore::Bool hasModel()
virtual casacore::Bool hasModel() {return (bool) itsModel;}
virtual casacore::Bool hasRestored()
{return doesImageExist(itsImageName+imageExts(SUMWT));}
virtual void printBeamSet(casacore::Bool verbose=casacore::False)
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > sumwt(casacore::uInt term=0)
casacore::Double memoryBeforeLattice()
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsParentSumWt
casacore::Bool itsUseWeight
virtual void initMetaInfo(std::shared_ptr< casacore::ImageInterface< casacore::Float > > &imptr, const casacore::String name)
virtual casacore::Long estimateRAM()
estimate of Memory to be used by the images held in KiloBytes
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsParentMask
void accessImage(std::shared_ptr< casacore::ImageInterface< casacore::Float > > &ptr, std::shared_ptr< casacore::ImageInterface< casacore::Float > > &parentptr, const casacore::String label)
casacore::Float calcStd(casacore::Vector< casacore::Float > &vect, casacore::Vector< casacore::Bool > &flag, casacore::Vector< casacore::Float > &fit)
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > psf(casacore::uInt term=0)
virtual casacore::Bool releaseLocks()
Other.
casacore::Double getPbMax()
casacore::Float getModelFlux(casacore::uInt term=0)
casacore::GaussianBeam getPSFGaussian()
casacore::ImageBeamSet itsPSFBeams
void releaseImage(std::shared_ptr< casacore::ImageInterface< casacore::Float > > &im)
casacore::Float getPSFSidelobeLevel()
void removeMask(casacore::CountedPtr< casacore::ImageInterface< casacore::Float > >im)
std::shared_ptr< casacore::ImageInterface< casacore::Float > > makeSubImage(const casacore::Int facet, const casacore::Int nfacets, const casacore::Int chan, const casacore::Int nchanchunks, const casacore::Int pol, const casacore::Int npolchunks, casacore::ImageInterface< casacore::Float > &image)
void makePBImage(const casacore::Float pblimit)
void setObjectName(const casacore::String)
virtual void restore(casacore::GaussianBeam &rbeam, casacore::String &usebeam, casacore::uInt term=0)
virtual casacore::GaussianBeam restorePlane();
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > beta()
casacore::String getName()
virtual std::shared_ptr< casacore::ImageInterface< casacore::Complex > > backwardGrid(casacore::uInt term=0)
virtual casacore::String getType()
casacore::Int itsNChanChunks
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
virtual void normalizePrimaryBeam(const casacore::Float pblimit=casacore::C::minfloat)
virtual casacore::Bool doesImageExist(casacore::String imagename)
casacore::Float itsPSFSideLobeLevel
*casacore::IPosition itsImageShape
casacore::CoordinateSystem itsParentCoordSys
virtual std::shared_ptr< casacore::ImageInterface< casacore::Complex > > forwardGrid(casacore::uInt term=0)
virtual void resetImages(casacore::Bool resetpsf, casacore::Bool resetresidual, casacore::Bool resetweight)
casacore::Bool divideImageByWeightVal(casacore::ImageInterface< casacore::Float > &target)
Represents a Gaussian restoring beam associated with an image.
virtual casacore::Bool hasPB()
virtual casacore::Bool hasSensitivity(){return doesImageExist(itsImageName+imageExts(WEIGHT));} ...
void setSumWt(casacore::ImageInterface< casacore::Float > &target, casacore::Matrix< casacore::Float > &sumwt)
virtual casacore::Double getReferenceFrequency()
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > mask(casacore::uInt term=0)
virtual void addImages(std::shared_ptr< SIImageStore > imagestoadd, casacore::Bool addpsf, casacore::Bool addresidual, casacore::Bool addweight, casacore::Bool adddensity)
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
void regridToModelImage(casacore::ImageInterface< casacore::Float > &inputimage, casacore::Int term=0)
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsParentGridWt
virtual casacore::Bool hasPsf()
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsParentWeight
casacore::Matrix< casacore::Float > getSumWt(casacore::ImageInterface< casacore::Float > &target)
SIImageStore()
Default constructor.
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsParentPB
void setUseWeightImage(casacore::ImageInterface< casacore::Float > &target, casacore::Bool useweightimage)
casacore::Bool itsOverWrite
casacore::Bool getUseWeightImage(casacore::ImageInterface< casacore::Float > &target)
void setDataPolFrame(StokesImageUtil::PolRep datapolrep)
Referenced counted pointer for constant data.
void openImage(const casacore::String &imagenamefull, std::shared_ptr< casacore::ImageInterface< T > > *img)
std::shared_ptr< casacore::ImageInterface< casacore::Complex > > itsForwardGrid
A base class for astronomical images.
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsParentPsf
casacore::ImageBeamSet getBeamSet()
*casacore::IPosition itsParentImageShape
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsWeight
virtual casacore::Array< casacore::Double > calcRobustRMS(casacore::Array< casacore::Double > &mdns, const casacore::Float pbmasklevel=0.0, const casacore::Bool fastcalc=true)
virtual casacore::uInt getNTaylorTerms(casacore::Bool dopsf=casacore::False)
Represents a set of restoring beams associated with an image.
virtual casacore::Bool hasMask()
virtual casacore::Bool hasPB(){return (bool) itsPB;}
virtual casacore::Vector< casacore::String > getModelImageName()
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsResidual
casacore::CoordinateSystem getCSys()
casacore::Record itsMiscInfo
void lineFit(casacore::Vector< casacore::Float > &data, casacore::Vector< casacore::Bool > &flag, casacore::Vector< casacore::Float > &fit, casacore::uInt lim1, casacore::uInt lim2)
StokesImageUtil::PolRep itsDataPolRep
void buildImage(std::shared_ptr< casacore::ImageInterface< casacore::Float > > &imptr, casacore::IPosition shape, casacore::CoordinateSystem csys, const casacore::String name)
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsModel
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > pb(casacore::uInt term=0)
virtual void calcSensitivity()
void rescaleResolution(casacore::Int chan, casacore::ImageInterface< casacore::Float > &subResidual, const casacore::GaussianBeam &newbeam, const casacore::GaussianBeam &oldbeam)
virtual void dividePSFByWeight(const casacore::Float pblimit=casacore::C::minfloat)
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsGridWt
casacore::String itsObjectName
virtual casacore::Bool hasResidualImage()
casacore::Double itsPBScaleFactor
virtual void setModelImage(casacore::Vector< casacore::String > modelnames)
casacore::Vector< casacore::String > imageExts
Non-persistent internal variables
virtual casacore::Bool releaseComplexGrids()
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > image(casacore::uInt term=0)
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
void fillSumWt(casacore::Int term=0)
virtual casacore::Bool hasSumWt()
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsMask
casacore::IPosition tileShape()
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > residual(casacore::uInt term=0)
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > gridwt(casacore::IPosition newshape=casacore::IPosition(0))
Gridwgt is for weight density sharing (Brigg's) thus only term 0 is done.
std::shared_ptr< casacore::ImageInterface< casacore::Float > > openImage(const casacore::String imagenamefull, const casacore::Bool overwrite, const casacore::Bool dosumwt=casacore::False, const casacore::Int nfacetsperside=1, const casacore::Bool checkCoord=casacore::True)
void setMiscInfo(const casacore::Record miscinfo)
std::shared_ptr< casacore::ImageInterface< casacore::Complex > > itsBackwardGrid
Base class for all Casacore library errors.
virtual void multiplyModelByWeight(const casacore::Float pblimit=casacore::C::minfloat, const casacore::String normtype="flatnoise")
virtual void setWeightDensity(std::shared_ptr< SIImageStore > imagetoset)
casacore::Float getPeakResidual()
Image Statistics....
LatticeExprNode mean(const LatticeExprNode &expr)
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > alpha()
const Double minfloat
the minimum single precision floating point number, including denormalised numbers ...
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > weight(casacore::uInt term=0)
void makePBFromWeight(const casacore::Float pblimit)
casacore::Float getPeakResidualWithinMask()
String: the storage and methods of handling collections of characters.
virtual casacore::Bool hasResidual()
virtual casacore::Bool hasPsfImage() {return doesImageExist(itsImageName+imageExts(PSF));} ...
virtual void makeImageBeamSet()
casacore::Bool findMinMaxLattice(const casacore::Lattice< casacore::Float > &lattice, const casacore::Lattice< casacore::Float > &mask, const casacore::Lattice< casacore::Bool > &pixmask, casacore::Float &maxAbs, casacore::Float &maxAbsMask, casacore::Float &minAbs, casacore::Float &minAbsMask)
virtual void setModelImageOne(casacore::String modelname, casacore::Int nterm=-1)
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsParentImagePBcor
void normPSF(casacore::Int term=0)
virtual void divideResidualByWeight(const casacore::Float pblimit=casacore::C::minfloat, const casacore::String normtype="flatnoise")
Class to allow C++ expressions involving lattices.
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsParentModel
casacore::Float getMaskSum()
casacore::CoordinateSystem itsCoordSys
virtual casacore::Bool hasSensitivity()
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsImage
void makePersistent(casacore::String &fileName)
std::shared_ptr< casacore::ImageInterface< casacore::Float > > itsParentResidual
casacore::String itsImageName
virtual casacore::Bool isModelEmpty()
Interconvert pixel and world coordinates.
virtual std::shared_ptr< casacore::ImageInterface< casacore::Float > > imagepbcor(casacore::uInt term=0)
void findMinMax(const casacore::Array< casacore::Float > &lattice, const casacore::Array< casacore::Float > &mask, casacore::Float &minVal, casacore::Float &maxVal, casacore::Float &minValMask, casacore::Float &maxValMask)