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"
208 explicit WcsMap(
int ncoord,
WcsType type,
int lonax,
int latax, std::string
const &options =
"")
209 :
Mapping(reinterpret_cast<AstMapping *>(
210 astWcsMap(ncoord, static_cast<int>(type), lonax, latax,
"%s", options.c_str()))) {}
235 std::stringstream os;
236 os <<
"PV" << i <<
"_" << m;
237 return getD(os.str());
241 int getPVMax(
int axis)
const {
return getI(detail::formatAxisAttr(
"PVMax", axis)); }
244 int getWcsAxis(
int lonlat)
const {
return getI(detail::formatAxisAttr(
"WcsAxis", lonlat)); }
251 return copyImpl<WcsMap, AstWcsMap>();
255 explicit WcsMap(AstWcsMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
257 std::ostringstream os;
258 os <<
"this is a " <<
getClass() <<
", which is not a WcsMap";
259 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:244
double getNatLon() const
get NatLon: native longitude of the reference point of a FITS-WCS projection.
Definition: WcsMap.h:226
WcsMap(int ncoord, WcsType type, int lonax, int latax, std::string const &options="")
Definition: WcsMap.h:208
std::string getClass() const
Definition: Object.h:118
WcsMap(AstWcsMap *rawptr)
Construct a WcsMap from a raw AST pointer.
Definition: WcsMap.h:255
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:234
double getD(std::string const &attrib) const
Definition: Object.h:348
WcsType getWcsType() const
Get WcsType: FITS-WCS projection type.
Definition: WcsMap.h:247
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: WcsMap.h:250
int getI(std::string const &attrib) const
Definition: Object.h:374
int getPVMax(int axis) const
Get PVMax(axis) for one axis: maximum number of FITS-WCS projection parameters.
Definition: WcsMap.h:241
double getNatLat() const
get NatLat: native latitude of the reference point of a FITS-WCS projection.
Definition: WcsMap.h:223
AstObject const * getRawPtr() const
Definition: Object.h:261