Go to the documentation of this file.
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; }
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); }
295 const uInt chan,
const uInt chanWidth,
const uInt freqPrec,
296 const uInt velWidth,
const uInt velPrec
uInt nchan() const
Get the number of channels in the beam array.
void setBeams(const Matrix< GaussianBeam > &beams)
Set the beams in this beam set.
ImageBeamSet(const ImageBeamSet &other)
The copy constructor (reference semantics).
void _replaceBeam(const GaussianBeam &beam, const IPosition &location1, const IPosition &location2, Bool overwriteMaxMin)
common code for replacing a beam in a multi-beam set
Bool hasMultiBeam() const
Does this beam set contain multiple beams?
ImageBeamSet(const Matrix< GaussianBeam > &beams)
Construct a beam set from an 2-D array of beams representing the frequency and stokes axis.
uInt nelements() const
Get the number of elements in the beam array.
const GaussianBeam getSmallestMinorAxisBeam() const
Get the beam that has the smallest minor axis.
LatticeExprNode log(const LatticeExprNode &expr)
static ImageBeamSet fromRecord(const Record &rec)
convert ImageBeamSet to and from record
ImageBeamSet subset(const Slicer &imageSlicer, const CoordinateSystem &csys) const
Return a subset of the beam array.
const Matrix< GaussianBeam > & getBeams() const
Get the beam array.
void resize(uInt nchan, uInt nstokes)
Resize the beam array.
static void _beamToStream(ostream &os, const GaussianBeam &beam, const Unit &unit)
Show the beam info.
void setBeam(Int chan, Int stokes, const GaussianBeam &beam)
Get a beam at the given 2-dim IPosition.
const GaussianBeam & getBeam(Int chan, Int stokes) const
Get the beam at the specified location.
Bool operator==(const ImageBeamSet &other) const
Beam sets are equal if the shapes and all corresponding beams are equal.
Array< GaussianBeam >::const_iterator BeamIter
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.
Matrix< GaussianBeam > _beams
const GaussianBeam & operator()(Int chan, Int stokes) const
static const GaussianBeam NULL_BEAM
const GaussianBeam & getMaxAreaBeamForPol(IPosition &pos, uInt stokes) const
ImageBeamSet(const GaussianBeam &beam)
construct an ImageBeamSet representing a single beam which is valid for all channels and stokes
ImageBeamSet()
Construct an empty beam set.
void rotate(const Quantity &angle, Bool unwrap=False)
Modify the beam set by rotating all beams counterclockwise through the specified angle.
const GaussianBeam & getBeam() const
Get the single global beam.
void set(const GaussianBeam &beam)
Set all beams to the same value.
const IPosition & shape() const
Get the shape of the beam array.
IPosition getMinAreaBeamPosition() const
Get the position of the beam with the minimum area.
Bool operator!=(const ImageBeamSet &other) const
this file contains all the compiler specific defines
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...
Bool hasSingleBeam() const
Bool empty() const
Is the beam set empty?
const GaussianBeam & getMedianAreaBeamForPol(IPosition &pos, uInt stokes) const
void summarize(LogIO &log, Bool verbose, const CoordinateSystem &csys) const
If verbose, log all beams, if not just summarize beam stats.
String: the storage and methods of handling collections of characters.
ImageBeamSet & operator=(const ImageBeamSet &other)
Assignment can change the shape (copy semantics).
bool Bool
Define the standard types used by Casacore.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
IPosition getMaxAreaBeamPosition() const
Get the position of the beam with the maximum area.
ImageBeamSet(uInt nchan, uInt nstokes, const GaussianBeam &beam=GaussianBeam::NULL_BEAM)
Create an ImageBeamSet of the specified shape with all GaussianBeams initialized to beam.
uInt nstokes() const
Get the number of stokes in the beam array.
GaussianBeam getMedianAreaBeam() const
Get the beam in the set which has the median area.
GaussianBeam getMinAreaBeam() const
Get the beam in the set which has the smallest area.
GaussianBeam getMaxAreaBeam() const
Get the beam in the set which has the largest area.
static const String & className()
Bool equivalent(const ImageBeamSet &that) const
Beam sets are equivalent if both have no beams or if the expanded sets are equal.
static const String _DEFAULT_AREA_UNIT