Go to the documentation of this file.
29 #ifndef IMAGES_IMAGEINFO_H
30 #define IMAGES_IMAGEINFO_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Utilities/RecordTransformable.h>
35 #include <casacore/casa/Arrays/Vector.h>
36 #include <casacore/casa/Quanta/Quantum.h>
37 #include <casacore/casa/BasicSL/String.h>
39 #include <casacore/coordinates/Coordinates/CoordinateSystem.h>
41 #include <casacore/images/Images/ImageBeamSet.h>
44 #include <casacore/casa/iosfwd.h>
280 const String& imageName)
const;
uInt nchan() const
Get the number of channels in the beam array.
uInt setInfoSplitBeamSet(uInt ndone, const ImageInfo &concatInfo, const IPosition &shape, const CoordinateSystem &csys, Int concatAxis)
Reset the info and beamset of this image with the appropriate part of the beam set of the concat imag...
static void logMessage(Bool &warn, LogIO &os, Bool relax, const String &msg1, const String msg2=String())
If relax=True, give a warning message if warn=True and set to False.
Bool hasMultipleBeams() const
does this object contain multiple beams?
Bool getRestoringBeam(LoggerHolder &logger)
This method is not meant for common use.
ImageTypes
This enum defines the actual quantity being held in an image It's really only used for descriptive in...
void setBeam(Int channel, Int stokes, const GaussianBeam &beam)
Bool hasMultiBeam() const
Does this beam set contain multiple beams?
static Double getBeamAreaInPixels(const GaussianBeam &beam, const DirectionCoordinate &dc)
ImageInfo::ImageTypes imageType() const
Set and get the Image Type.
static String defaultObjectName()
void copy_other(const ImageInfo &other)
Common copy ctor/assignment operator code.
const ImageBeamSet & getBeamSet() const
Get the beam set associated with this object.
Bool fromFITS(Vector< String > &error, const RecordInterface &inRecord)
static Vector< String > keywordNamesFITS()
It might be useful to know what FITS keyword names are used in to/from FITS so we can remove them so ...
String objectName() const
Set and get the Image object name.
ImageInfo & setImageType(ImageTypes type)
void combineBeams(const ImageInfo &infoThat, const IPosition &shapeThis, const IPosition &shapeThat, const CoordinateSystem &csysThis, const CoordinateSystem &csysThat, Int axis, Bool relax, LogIO &os)
Combine beam sets for the concatenation of images and replace the beamset in this object by the resul...
ImageInfo(const ImageInfo &other)
Copy constructor (copy semantics)
virtual Bool fromRecord(String &error, const RecordInterface &inRecord)
Initialise the class from a Record representation.
Record beamToRecord(Int channel, Int stokes) const
Convert the given beam to a Record.
void removeRestoringBeam()
Remove all beams (global or per plane) associated with this object.
void setAllBeams(const uInt nChannels, const uInt nStokes, const GaussianBeam &beam)
Initialize all per-plane beams to the same value.
Bool hasSingleBeam() const
does this object contain a single beam
static ImageInfo::ImageTypes imageTypeFromFITS(Int fitsValue)
This function takes an unofficial fitsValue found on the Stokes axis and returns the appropriate Imag...
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape.
ImageInfo & setObjectName(const String &object)
virtual Bool toRecord(String &error, RecordInterface &outRecord) const
Functions to interconvert between an ImageInfo and a record.
void appendBeams(ImageInfo &infoThat, Int axis, Bool relax, LogIO &os, const CoordinateSystem &csysThis, const CoordinateSystem &csysThat, const IPosition &shapeThis, const IPosition &shapeThat)
Append the other beamset to this one.
GaussianBeam restoringBeam(Int channel=-1, Int stokes=-1) const
Set and get the beam.
ImageInfo & operator=(const ImageInfo &other)
Assignment (copy semantics)
this file contains all the compiler specific defines
static GaussianBeam defaultRestoringBeam()
Bool hasSingleBeam() const
Bool empty() const
Is the beam set empty?
Bool hasBeam() const
Does this object contain one or more beams?
void checkBeamSet(const CoordinateSystem &coords, const IPosition &shape, const String &imageName) const
Check if the beam set matches the coordinate axes sizes.
LatticeExprNode pa(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds 180/pi*atan2(left,right)/2.
void _setRestoringBeam(const Record &inRecord)
Set the restoring beam from the record.
void setBeam(Int channel, Int stokes, const Quantity &major, const Quantity &minor, const Quantity &pa)
Set the beam for a specific plane.
Bool toFITS(String &error, RecordInterface &outRecord) const
Functions to interconvert between an ImageInfo and FITS keywords (converted to a Record).
void setBeams(const ImageBeamSet &beams)
Set the per plane beams array directly.
uInt nChannels() const
Number of channels and stokes in per hyper-plane beam array.
String: the storage and methods of handling collections of characters.
static ImageTypes defaultImageType()
In some circumstances it might be useful to know what the defaults for the various values are so you ...
bool Bool
Define the standard types used by Casacore.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
uInt nstokes() const
Get the number of stokes in the beam array.
void mergeBeams(ImageBeamSet &beamsOut, const ImageInfo &infoThat, Bool relax, LogIO &os) const
Merge the beam sets and check if they match.
void concatPolBeams(ImageBeamSet &beamsOut, const ImageInfo &infoThat, Int npolThis, Int npolThat, Bool relax, LogIO &os) const
Concatenate the beam sets along the stokes axis.
ImageInfo()
Default constructor.
void setRestoringBeam(const Quantum< Double > &major, const Quantum< Double > &minor, const Quantum< Double > &pa)
void setRestoringBeam(const GaussianBeam &beam)
Set the single global restoring beam.
void concatFreqBeams(ImageBeamSet &beamsOut, const ImageInfo &infoThat, Int nchanThis, Int nchanThat, Bool relax, LogIO &os) const
Concatenate the beam sets along the frequency axis.
ostream & operator<<(ostream &os, const ImageInfo &info)
Output declaration - useful for debugging.
static ImageInfo::ImageTypes MiriadImageType(const String &type)
Convert the Miriad 'btype' strings to the ImageType.
static ImageInfo::ImageTypes imageType(String type)
Double getBeamAreaInPixels(Int channel, Int stokes, const DirectionCoordinate &) const
Get the beam area in terms of pixel size of the specified DirectionCoordinate.
void _checkBeamShape(uInt &nchan, uInt &npol, const IPosition &shape, const CoordinateSystem &csys) const
Check if the beam shape matches the coordinates.
static String imageType(ImageInfo::ImageTypes type)