29 #ifndef COMPONENTS_TWOSIDEDSHAPE_H
30 #define COMPONENTS_TWOSIDEDSHAPE_H
41 class DirectionCoordinate;
44 class RecordInterface;
46 template <
class T>
class Vector;
A Measure: astronomical direction.
std::vector< double > Vector
Base class for component shapes with two sides.
const casacore::Quantum< casacore::Double > & minorAxisError() const
TwoSidedShape()
The constructors and assignment operator are protected as only derived classes should use them...
Shape
The shapes of all the components.
casacore::Vector< casacore::Double > widthToCartesian(const casacore::Quantum< casacore::Double > &width, const casacore::Quantum< casacore::Double > &pa, const casacore::MDirection &dirRef, const casacore::DirectionCoordinate &dirCoord, const casacore::Vector< casacore::Double > &pixelCen) const
virtual casacore::Double sample(const casacore::MDirection &direction, const casacore::MVAngle &pixelLatSize, const casacore::MVAngle &pixelLongSize) const =0
Calculate the proportion of the flux that is in a pixel of specified size centered in the specified d...
virtual void setOptParameters(const casacore::Vector< casacore::Double > &newOptParms)
void setErrors(const casacore::Quantum< casacore::Double > &majorAxisError, const casacore::Quantum< casacore::Double > &minorAxisError, const casacore::Quantum< casacore::Double > &positionAngleError)
set/get the errors on the shape parameters.
virtual casacore::DComplex visibility(const casacore::Vector< casacore::Double > &uvw, const casacore::Double &frequency) const =0
Return the Fourier transform of the component at the specified point in the spatial frequency domain...
casacore::Quantum< casacore::Double > itsMajErr
virtual casacore::String sizeToString() const =0
Get the string containing the various size quantities of a component.
casacore::MDirection directionFromCartesian(casacore::Double width, casacore::Double pa, const casacore::DirectionCoordinate &dirCoord, const casacore::Vector< casacore::Double > &pixelCen) const
virtual casacore::uInt nParameters() const
set/get the shape parameters associated with this shape.
const casacore::Quantum< casacore::Double > & majorAxisError() const
virtual ComponentType::Shape type() const =0
return the actual component type.
virtual casacore::Vector< casacore::Double > errors() const
void setWidth(const casacore::Quantum< casacore::Double > &majorAxis, const casacore::Quantum< casacore::Double > &minorAxis, const casacore::Quantum< casacore::Double > &positionAngle)
set/get the width and orientation of the Shape.
casacore::Quantum< casacore::Double > minorAxis() const
virtual casacore::Bool toRecord(casacore::String &errorMessage, casacore::RecordInterface &record) const
Convert the class to an Record representation.
const casacore::Quantum< casacore::Double > & positionAngleError() const
LatticeExprNode pa(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds 180/pi*atan2(left,right)/2.
Base class for component shapes.
Interconvert pixel positions and directions (e.g. RA/DEC).
virtual casacore::Double positionAngleInRad() const =0
std::complex< Double > DComplex
virtual casacore::Bool ok() const
casacore::Function which checks the internal data of this class for correct dimensionality and consis...
casacore::Quantum< casacore::Double > itsMinErr
bool Bool
Define the standard types used by Casacore.
casacore::Unit itsMajUnit
casacore::Double axialRatio() const
casacore::Quantum< casacore::Double > itsPaErr
virtual casacore::Vector< casacore::Double > toPixel(const casacore::DirectionCoordinate &dirCoord) const
Convert component shape to absolute pixels (longitude, latitude, major axis, minor axis...
virtual ~TwoSidedShape()
a virtual destructor is needed so that the actual destructor in the derived class will be used...
casacore::Quantum< casacore::Double > positionAngle() const
virtual casacore::Bool isSymmetric() const
determine whether the shape is symmetric or not.
virtual casacore::Vector< casacore::Double > optParameters() const
casacore::Unit itsMinUnit
virtual casacore::Bool fromRecord(casacore::String &errorMessage, const casacore::RecordInterface &record)
This functions convert between a casacore::Record and a shape derived from this class.
String: the storage and methods of handling collections of characters.
virtual void setWidthInRad(const casacore::Double majorAxis, const casacore::Double minorAxis, const casacore::Double positionAngle)=0
set/get the width and orientation of the Shape.
virtual void setParameters(const casacore::Vector< casacore::Double > &newParms)
casacore::Quantum< casacore::Double > majorAxis() const
Abstract base class for Record classes.
TwoSidedShape & operator=(const TwoSidedShape &other)
virtual ComponentShape * clone() const =0
Return a pointer to a copy of this object upcast to a ComponentShape object.
casacore::Double axialRatioError() const
virtual casacore::Double minorAxisInRad() const =0
Class to handle angle type conversions and I/O.
virtual casacore::Vector< casacore::Double > parameters() const
virtual casacore::Bool convertUnit(casacore::String &errorMessage, const casacore::RecordInterface &record)
Convert the parameters of the component to the specified units.
virtual casacore::Double majorAxisInRad() const =0
virtual casacore::Bool fromPixel(const casacore::Vector< casacore::Double > ¶meters, const casacore::DirectionCoordinate &dirCoord)
Fill the shape from the vector (longitude, latitude, major axis, minor axis, position angle [positive...
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.