29 #ifndef SYNTHESIS_STOKESIMAGEUTIL_H
30 #define SYNTHESIS_STOKESIMAGEUTIL_H
static void changeLabelsStokesToCorrStokes(casacore::StokesCoordinate &stokesCoord, StokesImageUtil::PolRep polRep, casacore::Vector< casacore::Int > &whichStokes)
A Vector of integers, for indexing into Array<T> objects.
static void From(casacore::ImageInterface< casacore::Complex > &out, const casacore::ImageInterface< casacore::Float > &in)
Convert from casacore::Stokes Image to "correlation" image.
static void Zero(casacore::ImageInterface< casacore::Float > &image, casacore::Vector< casacore::Bool > &mask)
Zero selected planes of a casacore::Stokes image.
static void Constrain(casacore::ImageInterface< casacore::Float > &image)
Constrain a casacore::Stokes Image.
static void locatePeakPSF(casacore::ImageInterface< casacore::Float > &psf, casacore::Int &xpos, casacore::Int &ypos, casacore::Float &, casacore::Matrix< casacore::Float > &psfplane)
Locat peak of PSF return pos, peak and first plane that satisfies peak >0.9.
static void directCFromR(casacore::ImageInterface< casacore::Complex > &out, const casacore::ImageInterface< casacore::Float > &in)
Direct copy from casacore::Float to casacore::Complex with.
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
static void MaskFrom(casacore::ImageInterface< casacore::Float > &mask, casacore::ImageInterface< casacore::Float > &image, const casacore::Double threshhold)
Mask mask iif(image > threshhold), where threshhold is in image's units.
static void changeCStokesRep(casacore::ImageInterface< casacore::Complex > &image, StokesImageUtil::PolRep polRep)
Change the stokes representation (but not the data!)
static void BoxMask(casacore::ImageInterface< casacore::Float > &mask, const casacore::IPosition &blc, const casacore::IPosition &trc, const casacore::Float value)
Make a box mask.
T norm(const casacore::Vector< T > &x)
The magnitude/norm of a vector.
Represents a Gaussian restoring beam associated with an image.
static void ToStokesPSF(casacore::ImageInterface< casacore::Float > &out, casacore::ImageInterface< casacore::Complex > &in)
Convert to casacore::Stokes PSF.
static casacore::Bool FitGaussianPSF(casacore::ImageInterface< casacore::Float > &psf, casacore::Vector< casacore::Float > &beam)
Fit a Gaussian PSF.
Represents a set of restoring beams associated with an image.
LatticeExprNode amp(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds sqrt(left^2+right^2).
static casacore::Int CStokesPolMap(casacore::Vector< casacore::Int > &map, StokesImageUtil::PolRep &polframe, const casacore::CoordinateSystem &coord)
Find the mapping from pixel on the casacore::Stokes Axis to either XX,XY,YX,YY of LL...
static void directCToR(casacore::ImageInterface< casacore::Float > &out, casacore::ImageInterface< casacore::Complex > &in)
Direct copy To Float...
bool Bool
Define the standard types used by Casacore.
static casacore::CoordinateSystem CStokesCoord(const casacore::CoordinateSystem &coord, casacore::Vector< casacore::Int > &whichStokes, StokesImageUtil::PolRep polRep=StokesImageUtil::CIRCULAR)
Create a casacore::CoordinateSystem.
static void MaskOnStokesI(casacore::ImageInterface< casacore::Float > &image, const casacore::Quantity &threshold)
Zero pixels where casacore::Stokes I < some value.
static casacore::Int StokesPolMap(casacore::Vector< casacore::Int > &map, const casacore::CoordinateSystem &coord)
Find the mapping from pixel on the casacore::Stokes Axis to I,Q,U,V.
make the psf of each plane have static peak(i.e peak in the inner 1/8 of each plane)*/static casacore void Convolve(casacore::ImageInterface< casacore::Float > &image, casacore::ImageInterface< casacore::Float > &psf)
you are on your own if the peak outside that zone :( It returns the maximum of the peak value found ...
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
A Table intended to hold astronomical data (a set of Measurements).
static void ToStokesSumWt(casacore::Matrix< casacore::Float > sumwtStokes, casacore::Matrix< casacore::Float > sumwtCorr)
static casacore::CoordinateSystem StokesCoordFromMS(const casacore::IPosition &shape, casacore::Vector< casacore::Double > &deltas, casacore::MeasurementSet &ms)
Create a casacore::CoordinateSystem from a casacore::MeasurementSet and other info.
Interconvert between pixel and Stokes value.
static void MakeGaussianPSF(casacore::ImageInterface< casacore::Float > &psf, casacore::Vector< casacore::Float > &beam, casacore::Bool norm=false)
Make a Gaussian PSF.
static casacore::Bool standardImageCoordinates(const casacore::CoordinateSystem &coords)
check to see if Image coordinates have the standard order: Direction, casacore::Stokes, Spectral.
static void To(casacore::ImageInterface< casacore::Float > &out, casacore::ImageInterface< casacore::Complex > &in)
Convert to casacore::Stokes Image from "correlation" image.
Interconvert pixel and world coordinates.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
static casacore::Bool StokesMap(casacore::Vector< casacore::Int > &map, const casacore::CoordinateSystem &coord)
Find all mappings from coordinate to axis number.