22 #include "pybind11/pybind11.h" 27 #include "numpy/arrayobject.h" 28 #include "ndarray/pybind11.h" 30 #include "lsst/daf/base.h" 35 namespace py = pybind11;
45 py::module mod(
"frameSetUtils");
47 py::module::import(
"lsst.daf.base");
48 py::module::import(
"lsst.afw.geom.angle");
49 py::module::import(
"lsst.afw.geom.coordinates");
50 py::module::import(
"lsst.afw.geom.spherePoint");
53 if (_import_array() < 0) {
54 PyErr_SetString(PyExc_ImportError,
"numpy.core.multiarray failed to import");
58 mod.def(
"getSkyFrame",
getSkyFrame,
"frameSet"_a,
"index"_a,
"copy"_a);
60 mod.def(
"readFitsWcs",
readFitsWcs,
"metadata"_a,
"strip"_a =
true);
61 mod.def(
"readLsstSkyWcs",
readLsstSkyWcs,
"metadata"_a,
"strip"_a =
true);
std::shared_ptr< daf::base::PropertyList > makeTanWcsMetadata(Point2D const &crpix, coord::IcrsCoord const &crval, Eigen::Matrix2d const &cdMatrix)
Make FITS metadata for a pure tangent WCS.
std::shared_ptr< ast::SkyFrame > getSkyFrame(ast::FrameSet const &frameSet, int index, bool copy)
Get the specified frame of a FrameSet as a SkyFrame.
PYBIND11_PLUGIN(_cameraPoint)
A base class for image defects.
std::shared_ptr< ast::FrameSet > readLsstSkyWcs(daf::base::PropertyList &metadata, bool strip=true)
Read an LSST sky WCS FrameSet from a FITS header: 0,0 is the lower left corner of the parent image...
std::shared_ptr< ast::FrameSet > readFitsWcs(daf::base::PropertyList &metadata, bool strip=true)
Read a FITS convention WCS FrameSet from FITS metadata.