27 #ifndef IMAGES_IMAGEBEAMSET_H 28 #define IMAGES_IMAGEBEAMSET_H 30 #include <casacore/casa/aips.h> 31 #include <casacore/casa/Arrays/Matrix.h> 32 #include <casacore/scimath/Mathematics/GaussianBeam.h> 38 class SpectralCoordinate;
40 class CoordinateSystem;
140 {
return _beams.size() == 1; }
149 {
return _beams.empty(); }
154 {
return _beams.shape(); }
159 {
return _beams.shape()[0]; }
164 {
return _beams.shape()[1]; }
176 {
return getBeam (chan, stokes); }
284 const uInt chan,
const uInt chanWidth,
const uInt freqPrec,
285 const uInt velWidth,
const uInt velPrec
A Vector of integers, for indexing into Array<T> objects.
GaussianBeam getMinAreaBeam() const
Get the beam in the set which has the smallest area.
IPosition getMaxAreaBeamPosition() const
Get the position of the beam with the maximum area.
LatticeExprNode log(const LatticeExprNode &expr)
const Matrix< GaussianBeam > & getBeams() const
Get the beam array.
void resize(uInt nchan, uInt nstokes)
Resize the beam array.
ImageBeamSet & operator=(const ImageBeamSet &other)
Assignment can change the shape (copy semantics).
Bool operator==(const ImageBeamSet &other) const
Beam sets are equal if the shapes and all corresponding beams are equal.
void setBeams(const Matrix< GaussianBeam > &beams)
Set the beams in this beam set.
static const String & className()
const GaussianBeam & getMaxAreaBeamForPol(IPosition &pos, uInt stokes) const
void rotate(const Quantity &angle)
Modify the beam set by rotating all beams counterclockwise through the specified angle.
uInt nelements() const
Get the number of elements in the beam array.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
const GaussianBeam & operator()(Int chan, Int stokes) const
A 2-D Specialization of the Array class.
ostream-like interface to creating log messages.
ImageBeamSet()
Construct an empty beam set.
Bool hasMultiBeam() const
Does this beam set contain multiple beams?
static void _beamToStream(ostream &os, const GaussianBeam &beam, const Unit &unit)
const IPosition & shape() const
Get the shape of the beam array.
Bool hasSingleBeam() const
Represents a Gaussian restoring beam associated with an image.
const GaussianBeam & getBeam() const
Get the single global beam.
Represents a set of restoring beams associated with an image.
const GaussianBeam & getMinAreaBeamForPol(IPosition &pos, uInt stokes) const
Get the minimal, maximal, and median area beams and positions in the beam set matrix for the given st...
static void _chanInfoToStream(ostream &os, const SpectralCoordinate *spCoord, const uInt chan, const uInt chanWidth, const uInt freqPrec, const uInt velWidth, const uInt velPrec)
Array< GaussianBeam >::const_iterator BeamIter
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
void summarize(LogIO &log, Bool verbose, const CoordinateSystem &csys) const
If verbose, log all beams, if not just summarize beam stats.
Matrix< GaussianBeam > _beams
uInt nstokes() const
Get the number of stokes in the beam array.
Specify which elements to extract from an n-dimensional array.
Interconvert pixel and frequency values.
static const String _DEFAULT_AREA_UNIT
IPosition getMinAreaBeamPosition() const
Get the position of the beam with the minimum area.
GaussianBeam getMedianAreaBeam() const
Get the beam in the set which has the median area.
Bool equivalent(const ImageBeamSet &that) const
Beam sets are equivalent if both have no beams or if the expanded sets are equal. ...
GaussianBeam getMaxAreaBeam() const
Get the beam in the set which has the largest area.
uInt nchan() const
Get the number of channels in the beam array.
const GaussianBeam & getMedianAreaBeamForPol(IPosition &pos, uInt stokes) const
String: the storage and methods of handling collections of characters.
Bool empty() const
Is the beam set empty?
const GaussianBeam getSmallestMinorAxisBeam() const
Get the beam that has the smallest minor axis.
Bool operator!=(const ImageBeamSet &other) const
ImageBeamSet subset(const Slicer &imageSlicer, const CoordinateSystem &csys) const
Return a subset of the beam array.
static const GaussianBeam NULL_BEAM
this file contains all the compiler specific defines
Interconvert pixel and world coordinates.
static ImageBeamSet fromRecord(const Record &rec)
convert ImageBeamSet to and from record
void setBeam(Int chan, Int stokes, const GaussianBeam &beam)
Get a beam at the given 2-dim IPosition.