22 #ifndef ASTSHIM_PCDMAP_H 23 #define ASTSHIM_PCDMAP_H 88 :
Mapping(reinterpret_cast<AstMapping *>(_makeRawPcdMap(disco, pcdcen,
options))) {}
110 for (
auto axis = 1; axis < 3; ++axis) {
118 return copyImpl<PcdMap, AstPcdMap>();
122 explicit PcdMap(AstPcdMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
125 os <<
"this is a " <<
getClassName() <<
", which is not a PcdMap";
133 if (pcdcen.
size() != 2) {
135 os <<
"pcdcen.size() = " << pcdcen.
size() <<
"; must be 2";
std::shared_ptr< PcdMap > copy() const
Return a deep copy of this object.
AstObject const * getRawPtr() const
Get the raw AST pointer.
std::vector< double > getPcdCen() const
Get PcdMap_PcdCen PcdCen for both axes: centre coordinates of pincushion/barrel distortion.
AST wrapper classes and functions.
std::string getClassName() const
Get Class: the name of the class (e.g.
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.
An abstract base class for objects which transform one set of coordinates to another.
virtual std::shared_ptr< Object > copyPolymorphic() const override
Return a deep copy of this object.
PcdMap(double disco, std::vector< double > const &pcdcen, std::string const &options="")
Construct a PcdMap.
T static_pointer_cast(T... args)
PcdMap & operator=(PcdMap const &)=delete
A PcdMap is a non-linear Mapping which transforms 2-dimensional positions to correct for the radial d...
double getPcdCen(int axis) const
Get PcdMap_PcdCen PcdCen(axis) for one axis: centre coordinates of pincushion/barrel distortion...
std::string formatAxisAttr(std::string const &name, int axis)
Format an axis-specific attribute by appending the axis index.
double getD(std::string const &attrib) const
Get the value of an attribute as a double.
double getDisco() const
Get Disco: pincushion/barrel distortion coefficient.
Abstract base class for all AST objects.
PcdMap(AstPcdMap *rawptr)
Construct a PcdMap from a raw AST pointer.