22 #ifndef ASTSHIM_SKYFRAME_H
23 #define ASTSHIM_SKYFRAME_H
125 :
Frame(reinterpret_cast<AstFrame *>(astSkyFrame(
"%s", options.c_str()))) {
170 std::vector<double> ret;
171 for (
int axis = 1; axis < 3; ++axis) {
183 std::vector<double> ret;
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)) {
252 std::ostringstream os;
253 os <<
"this is a " <<
getClassName() <<
", which is not a SkyFrame";
254 throw std::invalid_argument(os.str());
void setD(std::string const &attrib, double value)
Definition: Object.h:476
double getD(std::string const &attrib) const
Definition: Object.h:374
std::string const getC(std::string const &attrib) const
Definition: Object.h:361
std::string getClassName() const
Definition: Object.h:139
bool getB(std::string const &attrib) const
Definition: Object.h:348
AstObject const * getRawPtr() const
Definition: Object.h:292
int getI(std::string const &attrib) const
Definition: Object.h:400
void setC(std::string const &attrib, std::string const &value)
Definition: Object.h:464
void setB(std::string const &attrib, bool value)
Definition: Object.h:452
Definition: SkyFrame.h:66
std::shared_ptr< Mapping > skyOffsetMap()
Definition: SkyFrame.h:238
SkyFrame & operator=(SkyFrame const &)=delete
bool getNegLon() const
Get NegLon: display longitude values in the range [-pi,pi]?
Definition: SkyFrame.h:162
void setNegLon(bool negLon)
Set NegLon: display longitude values in the range [-pi,pi]?
Definition: SkyFrame.h:203
bool getAsTime(int axis) const
Get AsTime(axis) for one axis: format celestial coordinates as times?
Definition: SkyFrame.h:144
SkyFrame(std::string const &options="")
Definition: SkyFrame.h:124
SkyFrame(SkyFrame &&)=default
std::string getProjection() const
Get Projection: sky projection description.
Definition: SkyFrame.h:165
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: SkyFrame.h:245
void setSkyRef(std::vector< double > const &skyRef)
Set SkyRef: position defining location of the offset coordinate system.
Definition: SkyFrame.h:209
void setProjection(std::string const &projection)
Set Projection: sky projection description.
Definition: SkyFrame.h:206
std::vector< double > getSkyRefP() const
Definition: SkyFrame.h:182
double getSkyTol() const
Get SkyTol: smallest significant shift in sky coordinates.
Definition: SkyFrame.h:191
virtual ~SkyFrame()
Definition: SkyFrame.h:129
void setEquinox(double equinox)
Set Equinox: epoch of the mean equinox.
Definition: SkyFrame.h:200
SkyFrame & operator=(SkyFrame &&)=default
int getLatAxis() const
Get LatAxis: index of the latitude axis.
Definition: SkyFrame.h:156
bool getIsLonAxis(int axis) const
Get IsLonAxis(axis) for one axis: is the specified axis the longitude axis?
Definition: SkyFrame.h:153
bool getIsLatAxis(int axis) const
Get IsLatAxis(axis) for one axis: is the specified axis the latitude axis?
Definition: SkyFrame.h:150
SkyFrame(AstSkyFrame *rawptr)
Construct a SkyFrame from a raw AST pointer.
Definition: SkyFrame.h:250
void setSkyRefP(std::vector< double > const &skyRefP)
Set SkyRefP: position defining orientation of the offset coordinate system.
Definition: SkyFrame.h:220
void setSkyRefIs(std::string const &skyRefIs)
Set SkyRefIs: selects the nature of the offset coordinate system.
Definition: SkyFrame.h:217
SkyFrame(SkyFrame const &)=default
Copy constructor: make a deep copy.
void setAsTime(int axis, bool asTime)
Set AsTime(axis) for one axis: format celestial coordinates as times?
Definition: SkyFrame.h:197
void setSkyTol(double skyTol)
Set SkyTol: smallest significant shift in sky coordinates.
Definition: SkyFrame.h:228
int getLonAxis() const
Get LonAxis: index of the longitude axis.
Definition: SkyFrame.h:159
std::shared_ptr< SkyFrame > copy() const
Return a deep copy of this object.
Definition: SkyFrame.h:138
bool getAlignOffset() const
Get AlignOffset: align SkyFrames using the offset coordinate system?
Definition: SkyFrame.h:141
void setAlignOffset(bool alignOffset)
Set AlignOffset: align SkyFrames using the offset coordinate system?
Definition: SkyFrame.h:194
double getEquinox() const
Get Equinox: epoch of the mean equinox.
Definition: SkyFrame.h:147
std::string getSkyRefIs() const
Get SkyRefIs: selects the nature of the offset coordinate system.
Definition: SkyFrame.h:178
std::vector< double > getSkyRef() const
Definition: SkyFrame.h:169
std::string formatAxisAttr(std::string const &name, int axis)
Definition: utils.h:79
void assertEqual(T1 val1, std::string const &descr1, T2 val2, std::string const &descr2)
Definition: utils.h:48
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Definition: base.cc:49