22 #ifndef ASTSHIM_WCSMAP_H
23 #define ASTSHIM_WCSMAP_H
28 #include "astshim/base.h"
29 #include "astshim/detail/utils.h"
30 #include "astshim/Mapping.h"
207 explicit WcsMap(
int ncoord,
WcsType type,
int lonax,
int latax, std::string
const & options=
"") :
208 Mapping(reinterpret_cast<AstMapping *>(
209 astWcsMap(ncoord, static_cast<int>(type), lonax, latax, options.c_str())))
220 std::shared_ptr<WcsMap>
copy()
const {
237 std::stringstream os;
238 os <<
"PV" << i <<
"_" << m;
239 return getD(os.str());
244 return getI(detail::formatAxisAttr(
"PVMax", axis));
249 return getI(detail::formatAxisAttr(
"WcsAxis", lonlat));
257 return _copyImpl<WcsMap, AstWcsMap>();
262 Mapping(reinterpret_cast<AstMapping *>(rawptr))
265 std::ostringstream os;
266 os <<
"this is a " <<
getClass() <<
", which is not a WcsMap";
267 throw std::invalid_argument(os.str());
int getWcsAxis(int lonlat) const
Get WcsAxis(lonlat) for lon or lat: FITS-WCS projection axis.
Definition: WcsMap.h:248
double getNatLon() const
get NatLon: native longitude of the reference point of a FITS-WCS projection.
Definition: WcsMap.h:228
WcsMap(int ncoord, WcsType type, int lonax, int latax, std::string const &options="")
Definition: WcsMap.h:207
std::string getClass() const
Definition: Object.h:117
WcsMap(AstWcsMap *rawptr)
Construct a WcsMap from a raw AST pointer.
Definition: WcsMap.h:261
WcsType
Definition: WcsMap.h:47
std::shared_ptr< WcsMap > copy() const
Return a deep copy of this object.
Definition: WcsMap.h:220
double getPVi_m(int i, int m) const
Definition: WcsMap.h:236
double getD(std::string const &attrib) const
Definition: Object.h:360
virtual std::shared_ptr< Object > _copyPolymorphic() const override
Definition: WcsMap.h:256
WcsType getWcsType() const
Get WcsType: FITS-WCS projection type.
Definition: WcsMap.h:253
int getI(std::string const &attrib) const
Definition: Object.h:386
int getPVMax(int axis) const
Get PVMax(axis) for one axis: maximum number of FITS-WCS projection parameters.
Definition: WcsMap.h:243
double getNatLat() const
get NatLat: native latitude of the reference point of a FITS-WCS projection.
Definition: WcsMap.h:225
AstObject const * getRawPtr() const
Definition: Object.h:260