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;
void concatPolBeams(ImageBeamSet &beamsOut, const ImageInfo &infoThat, Int npolThis, Int npolThat, Bool relax, LogIO &os) const
Concatenate the beam sets along the stokes axis.
A Vector of integers, for indexing into Array<T> objects.
A 1-D Specialization of the Array class.
Bool fromFITS(Vector< String > &error, const RecordInterface &inRecord)
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.
ImageInfo & setObjectName(const String &object)
void setRestoringBeam(const GaussianBeam &beam)
Set the single global restoring beam.
static String defaultObjectName()
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
void concatFreqBeams(ImageBeamSet &beamsOut, const ImageInfo &infoThat, Int nchanThis, Int nchanThat, Bool relax, LogIO &os) const
Concatenate the beam sets along the frequency axis.
const ImageBeamSet & getBeamSet() const
Get the beam set associated with this object.
ostream-like interface to creating log messages.
Bool hasMultiBeam() const
Does this beam set contain multiple beams?
Bool getRestoringBeam(LoggerHolder &logger)
This method is not meant for common use.
Bool hasSingleBeam() const
Represents a Gaussian restoring beam associated with an image.
void setBeam(Int channel, Int stokes, const Quantity &major, const Quantity &minor, const Quantity &pa)
Set the beam for a specific plane.
void removeRestoringBeam()
Remove all beams (global or per plane) associated with this object.
LatticeExprNode pa(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds 180/pi*atan2(left,right)/2.
Interconvert pixel positions and directions (e.g. RA/DEC).
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 ...
void setAllBeams(const uInt nChannels, const uInt nStokes, const GaussianBeam &beam)
Initialize all per-plane beams to the same value.
Represents a set of restoring beams associated with an image.
ImageInfo & setImageType(ImageTypes type)
void mergeBeams(ImageBeamSet &beamsOut, const ImageInfo &infoThat, Bool relax, LogIO &os) const
Merge the beam sets and check if they match.
void checkBeamShape(uInt &nchan, uInt &npol, const ImageInfo &info, const IPosition &shape, const CoordinateSystem &csys) const
Check if the beam shape matches the coordinates.
Bool hasSingleBeam() const
does this object contain a single beam
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
void setRestoringBeam(const Quantum< Double > &major, const Quantum< Double > &minor, const Quantum< Double > &pa)
static ImageInfo::ImageTypes imageTypeFromFITS(Int fitsValue)
This function takes an unofficial fitsValue found on the Stokes axis and returns the appropriate Imag...
Record beamToRecord(Int channel, Int stokes) const
Convert the given beam to a Record.
uInt nstokes() const
Get the number of stokes in the beam array.
virtual Bool toRecord(String &error, RecordInterface &outRecord) const
Functions to interconvert between an ImageInfo and a record.
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
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.
static ImageTypes defaultImageType()
In some circumstances it might be useful to know what the defaults for the various values are so you ...
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?
static GaussianBeam defaultRestoringBeam()
ImageTypes
This enum defines the actual quantity being held in an image It's really only used for descriptive in...
ImageInfo()
Default constructor.
Bool hasBeam() const
Does this object contain one or more beams?
uInt nchan() const
Get the number of channels in the beam array.
ImageInfo::ImageTypes imageType() const
Set and get the Image Type.
String: the storage and methods of handling collections of characters.
static ImageInfo::ImageTypes MiriadImageType(const String &type)
Convert the Miriad 'btype' strings to the ImageType.
void copy_other(const ImageInfo &other)
Common copy ctor/assignment operator code.
Bool empty() const
Is the beam set empty?
Double getBeamAreaInPixels(Int channel, Int stokes, const DirectionCoordinate &) const
Get the beam area in terms of pixel size of the specified DirectionCoordinate.
void _setRestoringBeam(const Record &inRecord)
Set the restoring beam from the record.
Abstract base class for Record classes.
GaussianBeam restoringBeam(Int channel=-1, Int stokes=-1) const
Set and get the beam.
String objectName() const
Set and get the Image object name.
Class holding a hierarchy of loggers.
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 & operator=(const ImageInfo &other)
Assignment (copy semantics)
Miscellaneous information related to an image.
uInt nChannels() const
Number of channels and stokes in per hyper-plane beam array.
this file contains all the compiler specific defines
virtual Bool fromRecord(String &error, const RecordInterface &inRecord)
Initialise the class from a Record representation.
Interconvert pixel and world coordinates.
void checkBeamSet(const CoordinateSystem &coords, const IPosition &shape, const String &imageName) const
Check if the beam set matches the coordinate axes sizes.