casa
5.7.0-16
|
Represents a set of restoring beams associated with an image. Implements getCommonBeam() More...
#include <CasaImageBeamSet.h>
Public Member Functions | |
CasaImageBeamSet () | |
Construct an empty beam set. More... | |
CasaImageBeamSet (const casacore::Matrix< casacore::GaussianBeam > &beams) | |
Construct a beam set from an 2-D array of beams representing the frequency and stokes axis. More... | |
CasaImageBeamSet (const casacore::GaussianBeam &beam) | |
construct an CasaImageBeamSet representing a single beam which is valid for all channels and stokes More... | |
CasaImageBeamSet (casacore::uInt nchan, casacore::uInt nstokes, const casacore::GaussianBeam &beam=casacore::GaussianBeam::NULL_BEAM) | |
Create an CasaImageBeamSet of the specified shape with all GaussianBeams initialized to beam . More... | |
CasaImageBeamSet (const CasaImageBeamSet &other) | |
The copy constructor (reference semantics). More... | |
CasaImageBeamSet (const casacore::ImageBeamSet &other) | |
~CasaImageBeamSet () | |
CasaImageBeamSet & | operator= (const CasaImageBeamSet &other) |
Assignment can change the shape (copy semantics). More... | |
casacore::GaussianBeam | getCommonBeam () const |
Get a beam to which all other beams in the set can be convolved. More... | |
Public Member Functions inherited from casacore::ImageBeamSet | |
ImageBeamSet () | |
Construct an empty beam set. More... | |
ImageBeamSet (const Matrix< GaussianBeam > &beams) | |
Construct a beam set from an 2-D array of beams representing the frequency and stokes axis. More... | |
ImageBeamSet (const GaussianBeam &beam) | |
construct an ImageBeamSet representing a single beam which is valid for all channels and stokes More... | |
ImageBeamSet (uInt nchan, uInt nstokes, const GaussianBeam &beam=GaussianBeam::NULL_BEAM) | |
Create an ImageBeamSet of the specified shape with all GaussianBeams initialized to beam . More... | |
ImageBeamSet (const ImageBeamSet &other) | |
The copy constructor (reference semantics). More... | |
~ImageBeamSet () | |
ImageBeamSet & | operator= (const ImageBeamSet &other) |
Assignment can change the shape (copy semantics). More... | |
Bool | operator== (const ImageBeamSet &other) const |
Beam sets are equal if the shapes and all corresponding beams are equal. More... | |
Bool | operator!= (const ImageBeamSet &other) const |
Bool | equivalent (const ImageBeamSet &that) const |
Beam sets are equivalent if both have no beams or if the expanded sets are equal. More... | |
uInt | nelements () const |
Get the number of elements in the beam array. More... | |
uInt | size () const |
Bool | hasSingleBeam () const |
Bool | hasMultiBeam () const |
Does this beam set contain multiple beams? More... | |
Bool | empty () const |
Is the beam set empty? More... | |
const IPosition & | shape () const |
Get the shape of the beam array. More... | |
uInt | nchan () const |
Get the number of channels in the beam array. More... | |
uInt | nstokes () const |
Get the number of stokes in the beam array. More... | |
const GaussianBeam & | getBeam () const |
Get the single global beam. More... | |
const GaussianBeam & | getBeam (Int chan, Int stokes) const |
Get the beam at the specified location. More... | |
const GaussianBeam & | operator() (Int chan, Int stokes) const |
void | setBeam (Int chan, Int stokes, const GaussianBeam &beam) |
Get a beam at the given 2-dim IPosition. More... | |
void | resize (uInt nchan, uInt nstokes) |
Resize the beam array. More... | |
ImageBeamSet | subset (const Slicer &imageSlicer, const CoordinateSystem &csys) const |
Return a subset of the beam array. More... | |
const Matrix< GaussianBeam > & | getBeams () const |
Get the beam array. More... | |
void | setBeams (const Matrix< GaussianBeam > &beams) |
Set the beams in this beam set. More... | |
void | set (const GaussianBeam &beam) |
Set all beams to the same value. More... | |
GaussianBeam | getMinAreaBeam () const |
Get the beam in the set which has the smallest area. More... | |
GaussianBeam | getMaxAreaBeam () const |
Get the beam in the set which has the largest area. More... | |
GaussianBeam | getMedianAreaBeam () const |
Get the beam in the set which has the median area. More... | |
IPosition | getMinAreaBeamPosition () const |
Get the position of the beam with the minimum area. More... | |
IPosition | getMaxAreaBeamPosition () const |
Get the position of the beam with the maximum area. More... | |
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 stokes. More... | |
const GaussianBeam & | getMaxAreaBeamForPol (IPosition &pos, uInt stokes) const |
const GaussianBeam & | getMedianAreaBeamForPol (IPosition &pos, uInt stokes) const |
const GaussianBeam | getSmallestMinorAxisBeam () const |
Get the beam that has the smallest minor axis. More... | |
Record | toRecord () const |
void | summarize (LogIO &log, Bool verbose, const CoordinateSystem &csys) const |
If verbose, log all beams, if not just summarize beam stats. More... | |
void | rotate (const Quantity &angle, Bool unwrap=False) |
Modify the beam set by rotating all beams counterclockwise through the specified angle. More... | |
Static Public Member Functions | |
static const casacore::String & | className () |
Static Public Member Functions inherited from casacore::ImageBeamSet | |
static const String & | className () |
static ImageBeamSet | fromRecord (const Record &rec) |
convert ImageBeamSet to and from record More... | |
Static Private Member Functions | |
static void | _transformEllipseByScaling (casacore::Double &transformedMajor, casacore::Double &transformedMinor, casacore::Double &transformedPa, casacore::Double major, casacore::Double minor, casacore::Double pa, casacore::Double xScaleFactor, casacore::Double yScaleFactor) |
Additional Inherited Members | |
Public Types inherited from casacore::ImageBeamSet | |
typedef Array< GaussianBeam > ::const_iterator | BeamIter |
Represents a set of restoring beams associated with an image. Implements getCommonBeam()
Public interface
A Set of Beams associated with an Image.
Restoring beams are used many places in image analysis tasks.
Definition at line 64 of file CasaImageBeamSet.h.
casa::CasaImageBeamSet::CasaImageBeamSet | ( | ) |
Construct an empty beam set.
casa::CasaImageBeamSet::CasaImageBeamSet | ( | const casacore::Matrix< casacore::GaussianBeam > & | beams | ) |
Construct a beam set from an 2-D array of beams representing the frequency and stokes axis.
Axis length 1 means it is valid for all channels cq. stokes. If the image has 0 spectral channels or stokes, the corresponding length of the axis in the provided matrix should be 1.
casa::CasaImageBeamSet::CasaImageBeamSet | ( | const casacore::GaussianBeam & | beam | ) |
construct an CasaImageBeamSet representing a single beam which is valid for all channels and stokes
casa::CasaImageBeamSet::CasaImageBeamSet | ( | casacore::uInt | nchan, |
casacore::uInt | nstokes, | ||
const casacore::GaussianBeam & | beam = casacore::GaussianBeam::NULL_BEAM |
||
) |
Create an CasaImageBeamSet of the specified shape with all GaussianBeams initialized to beam
.
casa::CasaImageBeamSet::CasaImageBeamSet | ( | const CasaImageBeamSet & | other | ) |
The copy constructor (reference semantics).
casa::CasaImageBeamSet::CasaImageBeamSet | ( | const casacore::ImageBeamSet & | other | ) |
casa::CasaImageBeamSet::~CasaImageBeamSet | ( | ) |
|
staticprivate |
|
static |
casacore::GaussianBeam casa::CasaImageBeamSet::getCommonBeam | ( | ) | const |
Get a beam to which all other beams in the set can be convolved.
If all other beams can be convolved to the maximum area beam in the set, that beam will be returned. If not, this is guaranteed to be the minimum area beam to which all beams in the set can be convolved if all but one of the beams in the set can be convolved to the beam in the set with the largest area. Otherwise, the returned beam may or may not be the smallest possible beam to which all the beams in the set can be convolved.
CasaImageBeamSet& casa::CasaImageBeamSet::operator= | ( | const CasaImageBeamSet & | other | ) |
Assignment can change the shape (copy semantics).