27 #ifndef IMAGES_IMAGEBEAMSET_H
28 #define IMAGES_IMAGEBEAMSET_H
38 class SpectralCoordinate;
40 class CoordinateSystem;
140 {
return _beams.size() == 1; }
144 {
return _beams.size() > 1; }
148 {
return _beams.empty(); }
153 {
return _beams.shape(); }
158 {
return _beams.shape()[0]; }
163 {
return _beams.shape()[1]; }
175 {
return getBeam (chan, stokes); }
289 const uInt chan,
const uInt chanWidth,
const uInt freqPrec,
290 const uInt velWidth,
const uInt velPrec
A Vector of integers, for indexing into Array<T> objects.
IPosition getMaxAreaBeamPosition() const
Get the position of the beam with the maximum area.
LatticeExprNode log(const LatticeExprNode &expr)
uInt nstokes() const
Get the number of stokes in 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).
void summarize(LogIO &log, Bool verbose, const CoordinateSystem &csys) const
If verbose, log all beams, if not just summarize beam stats.
Bool equivalent(const ImageBeamSet &that) const
Beam sets are equivalent if both have no beams or if the expanded sets are equal. ...
const IPosition & shape() const
Get the shape of the beam array.
void setBeams(const Matrix< GaussianBeam > &beams)
Set the beams in this beam set.
static const String & className()
GaussianBeam getMinAreaBeam() const
Get the beam in the set which has the smallest area.
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...
const GaussianBeam & operator()(Int chan, Int stokes) const
void rotate(const Quantity &angle, Bool unwrap=False)
Modify the beam set by rotating all beams counterclockwise through the specified angle.
A 2-D Specialization of the Array class.
ostream-like interface to creating log messages.
const GaussianBeam & getMaxAreaBeamForPol(IPosition &pos, uInt stokes) const
ImageBeamSet()
Construct an empty beam set.
ostream & operator<<(ostream &os, const std::pair< T, U > &p)
static void _beamToStream(ostream &os, const GaussianBeam &beam, const Unit &unit)
Show the beam info.
void set(const GaussianBeam &beam)
Set all beams to the same value.
Represents a Gaussian restoring beam associated with an image.
Bool empty() const
Is the beam set empty?
Bool hasSingleBeam() const
IPosition getMinAreaBeamPosition() const
Get the position of the beam with the minimum area.
const GaussianBeam & getBeam() const
Get the single global beam.
Represents a set of restoring beams associated with an image.
GaussianBeam getMedianAreaBeam() const
Get the beam in the set which has the median area.
static void _chanInfoToStream(ostream &os, const SpectralCoordinate *spCoord, const uInt chan, const uInt chanWidth, const uInt freqPrec, const uInt velWidth, const uInt velPrec)
Show the spectral info.
Array< GaussianBeam >::const_iterator BeamIter
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
ImageBeamSet subset(const Slicer &imageSlicer, const CoordinateSystem &csys) const
Return a subset of the beam array.
Matrix< GaussianBeam > _beams
Bool operator!=(const ImageBeamSet &other) const
const Matrix< GaussianBeam > & getBeams() const
Get the beam array.
Bool operator==(const ImageBeamSet &other) const
Beam sets are equal if the shapes and all corresponding beams are equal.
Specify which elements to extract from an n-dimensional array.
Interconvert pixel and frequency values.
GaussianBeam getMaxAreaBeam() const
Get the beam in the set which has the largest area.
static const String _DEFAULT_AREA_UNIT
Bool hasMultiBeam() const
Does this beam set contain multiple beams?
String: the storage and methods of handling collections of characters.
static const GaussianBeam NULL_BEAM
const GaussianBeam & getMedianAreaBeamForPol(IPosition &pos, uInt stokes) const
const GaussianBeam getSmallestMinorAxisBeam() const
Get the beam that has the smallest minor axis.
uInt nelements() const
Get the number of elements in the beam array.
Interconvert pixel and world coordinates.
static ImageBeamSet fromRecord(const Record &rec)
convert ImageBeamSet to and from record
uInt nchan() const
Get the number of channels in the beam array.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
void setBeam(Int chan, Int stokes, const GaussianBeam &beam)
Get a beam at the given 2-dim IPosition.