22 #ifndef ASTSHIM_WCSMAP_H
23 #define ASTSHIM_WCSMAP_H
29 #include "astshim/base.h"
30 #include "astshim/detail/utils.h"
31 #include "astshim/Mapping.h"
209 explicit WcsMap(
int ncoord,
WcsType type,
int lonax,
int latax, std::string
const &options =
"")
210 :
Mapping(reinterpret_cast<AstMapping *>(
211 astWcsMap(ncoord, static_cast<int>(type), lonax, latax,
"%s", options.c_str()))) {}
236 std::stringstream os;
237 os <<
"PV" << i <<
"_" << m;
238 return getD(os.str());
242 int getPVMax(
int axis)
const {
return getI(detail::formatAxisAttr(
"PVMax", axis)); }
248 return std::make_pair(
getI(detail::formatAxisAttr(
"WcsAxis", 1)),
249 getI(detail::formatAxisAttr(
"WcsAxis", 2)));
257 return copyImpl<WcsMap, AstWcsMap>();
261 explicit WcsMap(AstWcsMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
263 std::ostringstream os;
264 os <<
"this is a " <<
getClassName() <<
", which is not a WcsMap";
265 throw std::invalid_argument(os.str());
WcsMap(int ncoord, WcsType type, int lonax, int latax, std::string const &options="")
Definition: WcsMap.h:209
double getNatLat() const
get NatLat: native latitude of the reference point of a FITS-WCS projection.
Definition: WcsMap.h:224
WcsType getWcsType() const
Get WcsType: FITS-WCS projection type.
Definition: WcsMap.h:253
double getPVi_m(int i, int m) const
Definition: WcsMap.h:235
AstObject const * getRawPtr() const
Definition: Object.h:286
std::pair< int, int > getWcsAxis() const
Definition: WcsMap.h:247
WcsType
Definition: WcsMap.h:48
std::shared_ptr< WcsMap > copy() const
Return a deep copy of this object.
Definition: WcsMap.h:221
int getPVMax(int axis) const
Get PVMax(axis) for one axis: maximum number of FITS-WCS projection parameters.
Definition: WcsMap.h:242
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: WcsMap.h:256
double getD(std::string const &attrib) const
Definition: Object.h:373
int getI(std::string const &attrib) const
Definition: Object.h:399
double getNatLon() const
get NatLon: native longitude of the reference point of a FITS-WCS projection.
Definition: WcsMap.h:227
std::string getClassName() const
Definition: Object.h:133
WcsMap(AstWcsMap *rawptr)
Construct a WcsMap from a raw AST pointer.
Definition: WcsMap.h:261