22 #ifndef ASTSHIM_SKYFRAME_H 23 #define ASTSHIM_SKYFRAME_H 125 :
Frame(reinterpret_cast<AstFrame *>(astSkyFrame(
"%s", options.c_str()))) {
171 for (
int axis = 1; axis < 3; ++axis) {
184 for (
int axis = 1; axis < 3; ++axis) {
211 for (
int i = 0; i < 2; ++i) {
222 for (
int i = 0; i < 2; ++i) {
239 auto *rawMap =
reinterpret_cast<AstObject *
>(astSkyOffsetMap(
getRawPtr()));
241 return Object::fromAstObject<Mapping>(rawMap,
false);
246 return copyImpl<SkyFrame, AstSkyFrame>();
250 explicit SkyFrame(AstSkyFrame *rawptr) :
Frame(reinterpret_cast<AstFrame *>(rawptr)) {
253 os <<
"this is a " <<
getClassName() <<
", which is not a SkyFrame";
virtual std::shared_ptr< Object > copyPolymorphic() const override
Return a deep copy of this object.
SkyFrame & operator=(SkyFrame const &)=delete
std::shared_ptr< SkyFrame > copy() const
Return a deep copy of this object.
bool getIsLatAxis(int axis) const
Get IsLatAxis(axis) for one axis: is the specified axis the latitude axis?
AstObject const * getRawPtr() const
Get the raw AST pointer.
bool getNegLon() const
Get NegLon: display longitude values in the range [-pi,pi]?
void setB(std::string const &attrib, bool value)
Set the value of an attribute as a bool.
void setAlignOffset(bool alignOffset)
Set AlignOffset: align SkyFrames using the offset coordinate system?
int getI(std::string const &attrib) const
Get the value of an attribute as an int.
AST wrapper classes and functions.
std::string getClassName() const
Get Class: the name of the class (e.g.
std::string getSkyRefIs() const
Get SkyRefIs: selects the nature of the offset coordinate system.
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.
void setSkyTol(double skyTol)
Set SkyTol: smallest significant shift in sky coordinates.
double getSkyTol() const
Get SkyTol: smallest significant shift in sky coordinates.
void setNegLon(bool negLon)
Set NegLon: display longitude values in the range [-pi,pi]?
int getLatAxis() const
Get LatAxis: index of the latitude axis.
double getEquinox() const
Get Equinox: epoch of the mean equinox.
SkyFrame(std::string const &options="")
Construct a SkyFrame.
std::vector< double > getSkyRefP() const
Get SkyRefP for both axes: position defining orientation of the offset coordinate system...
SkyFrame is a specialised form of Frame which describes celestial longitude/latitude coordinate syste...
bool getB(std::string const &attrib) const
Get the value of an attribute as a bool.
Frame is used to represent a coordinate system.
bool getAsTime(int axis) const
Get AsTime(axis) for one axis: format celestial coordinates as times?
void setC(std::string const &attrib, std::string const &value)
Set the value of an attribute as a string.
bool getIsLonAxis(int axis) const
Get IsLonAxis(axis) for one axis: is the specified axis the longitude axis?
void setAsTime(int axis, bool asTime)
Set AsTime(axis) for one axis: format celestial coordinates as times?
T static_pointer_cast(T... args)
table::Key< double > equinox
void setEquinox(double equinox)
Set Equinox: epoch of the mean equinox.
int getLonAxis() const
Get LonAxis: index of the longitude axis.
void setProjection(std::string const &projection)
Set Projection: sky projection description.
void setD(std::string const &attrib, double value)
Set the value of an attribute as a double.
std::string formatAxisAttr(std::string const &name, int axis)
Format an axis-specific attribute by appending the axis index.
void setSkyRefP(std::vector< double > const &skyRefP)
Set SkyRefP: position defining orientation of the offset coordinate system.
double getD(std::string const &attrib) const
Get the value of an attribute as a double.
std::shared_ptr< Mapping > skyOffsetMap()
Get a sky offset map.
void assertEqual(T1 val1, std::string const &descr1, T2 val2, std::string const &descr2)
SkyFrame(AstSkyFrame *rawptr)
Construct a SkyFrame from a raw AST pointer.
std::string const getC(std::string const &attrib) const
Get the value of an attribute as a string.
void setSkyRefIs(std::string const &skyRefIs)
Set SkyRefIs: selects the nature of the offset coordinate system.
Abstract base class for all AST objects.
void setSkyRef(std::vector< double > const &skyRef)
Set SkyRef: position defining location of the offset coordinate system.
std::vector< double > getSkyRef() const
Get SkyRef for both axes: position defining location of the offset coordinate system.
std::string getProjection() const
Get Projection: sky projection description.
bool getAlignOffset() const
Get AlignOffset: align SkyFrames using the offset coordinate system?