|
std::ostream & | operator<< (std::ostream &os, GenericEndpoint const &endpoint) |
| Print "GenericEndpoint(_n_)" to the ostream where _n_ is the number of axes, e.g. "GenericAxes(4)". More...
|
|
std::ostream & | operator<< (std::ostream &os, Point2Endpoint const &endpoint) |
| Print "Point2Endpoint()" to the ostream. More...
|
|
std::ostream & | operator<< (std::ostream &os, SpherePointEndpoint const &endpoint) |
| Print "SpherePointEndpoint()" to the ostream. More...
|
|
Eigen::Matrix2d | makeCdMatrix (lsst::geom::Angle const &scale, lsst::geom::Angle const &orientation=0 *lsst::geom::degrees, bool flipX=false) |
| Make a WCS CD matrix. More...
|
|
std::shared_ptr< SkyWcs > | makeFlippedWcs (SkyWcs const &wcs, bool flipLR, bool flipTB, lsst::geom::Point2D const ¢er) |
| Return a copy of a FITS-WCS with pixel positions flipped around a specified center. More...
|
|
std::shared_ptr< SkyWcs > | makeModifiedWcs (TransformPoint2ToPoint2 const &pixelTransform, SkyWcs const &wcs, bool modifyActualPixels) |
| Create a new SkyWcs whose pixels are transformed by pixelTransform, as described below. More...
|
|
std::shared_ptr< SkyWcs > | makeSkyWcs (daf::base::PropertySet &metadata, bool strip=false) |
| Construct a SkyWcs from FITS keywords. More...
|
|
std::shared_ptr< SkyWcs > | makeSkyWcs (lsst::geom::Point2D const &crpix, lsst::geom::SpherePoint const &crval, Eigen::Matrix2d const &cdMatrix, std::string const &projection="TAN") |
| Construct a simple FITS SkyWcs with no distortion. More...
|
|
std::shared_ptr< SkyWcs > | makeSkyWcs (TransformPoint2ToPoint2 const &pixelsToFieldAngle, lsst::geom::Angle const &orientation, bool flipX, lsst::geom::SpherePoint const &boresight, std::string const &projection="TAN") |
| Construct a FITS SkyWcs from camera geometry. More...
|
|
std::shared_ptr< SkyWcs > | makeTanSipWcs (lsst::geom::Point2D const &crpix, lsst::geom::SpherePoint const &crval, Eigen::Matrix2d const &cdMatrix, Eigen::MatrixXd const &sipA, Eigen::MatrixXd const &sipB) |
| Construct a TAN-SIP SkyWcs with forward SIP distortion terms and an iterative inverse. More...
|
|
std::shared_ptr< SkyWcs > | makeTanSipWcs (lsst::geom::Point2D const &crpix, lsst::geom::SpherePoint const &crval, Eigen::Matrix2d const &cdMatrix, Eigen::MatrixXd const &sipA, Eigen::MatrixXd const &sipB, Eigen::MatrixXd const &sipAp, Eigen::MatrixXd const &sipBp) |
| Construct a TAN WCS with forward and inverse SIP distortion terms. More...
|
|
std::shared_ptr< TransformPoint2ToPoint2 > | makeWcsPairTransform (SkyWcs const &src, SkyWcs const &dst) |
| A Transform obtained by putting two SkyWcs objects "back to back". More...
|
|
std::shared_ptr< TransformPoint2ToSpherePoint > | getIntermediateWorldCoordsToSky (SkyWcs const &wcs, bool simplify=true) |
| Return a transform from intermediate world coordinates to sky. More...
|
|
std::shared_ptr< TransformPoint2ToPoint2 > | getPixelToIntermediateWorldCoords (SkyWcs const &wcs, bool simplify=true) |
| Return a transform from pixel coordinates to intermediate world coordinates. More...
|
|
std::ostream & | operator<< (std::ostream &os, SkyWcs const &wcs) |
| Print a SkyWcs to an ostream. More...
|
|
template<class FromEndpoint , class ToEndpoint > |
std::ostream & | operator<< (std::ostream &os, Transform< FromEndpoint, ToEndpoint > const &transform) |
| Print a Transform to an ostream. More...
|
|
lsst::geom::AffineTransform | linearizeTransform (TransformPoint2ToPoint2 const &original, lsst::geom::Point2D const &inPoint) |
| Approximate a Transform by its local linearization. More...
|
|
std::shared_ptr< TransformPoint2ToPoint2 > | makeTransform (lsst::geom::AffineTransform const &affine) |
| Wrap an lsst::geom::AffineTransform as a Transform. More...
|
|
std::shared_ptr< TransformPoint2ToPoint2 > | makeRadialTransform (std::vector< double > const &coeffs) |
| A purely radial polynomial distortion. More...
|
|
std::shared_ptr< TransformPoint2ToPoint2 > | makeRadialTransform (std::vector< double > const &forwardCoeffs, std::vector< double > const &inverseCoeffs) |
| A purely radial polynomial distortion. More...
|
|
std::shared_ptr< TransformPoint2ToPoint2 > | makeIdentityTransform () |
| Trivial Transform x → x. More...
|
|
std::shared_ptr< daf::base::PropertyList > | createTrivialWcsMetadata (std::string const &wcsName, lsst::geom::Point2I const &xy0) |
|
void | deleteBasicWcsMetadata (daf::base::PropertySet &metadata, std::string const &wcsName) |
|
Eigen::Matrix2d | getCdMatrixFromMetadata (daf::base::PropertySet &metadata) |
| Read a CD matrix from FITS WCS metadata. More...
|
|
lsst::geom::Point2I | getImageXY0FromMetadata (daf::base::PropertySet &metadata, std::string const &wcsName, bool strip=false) |
|
Eigen::MatrixXd | getSipMatrixFromMetadata (daf::base::PropertySet const &metadata, std::string const &name) |
|
bool | hasSipMatrix (daf::base::PropertySet const &metadata, std::string const &name) |
|
std::shared_ptr< daf::base::PropertyList > | makeSipMatrixMetadata (Eigen::MatrixXd const &matrix, std::string const &name) |
|
std::shared_ptr< daf::base::PropertyList > | makeSimpleWcsMetadata (lsst::geom::Point2D const &crpix, lsst::geom::SpherePoint const &crval, Eigen::Matrix2d const &cdMatrix, std::string const &projection="TAN") |
| Make FITS metadata for a simple FITS WCS (one with no distortion). More...
|
|
std::shared_ptr< daf::base::PropertyList > | makeTanSipMetadata (lsst::geom::Point2D const &crpix, lsst::geom::SpherePoint const &crval, Eigen::Matrix2d const &cdMatrix, Eigen::MatrixXd const &sipA, Eigen::MatrixXd const &sipB) |
| Make metadata for a TAN-SIP WCS without inverse matrices. More...
|
|
std::shared_ptr< daf::base::PropertyList > | makeTanSipMetadata (lsst::geom::Point2D const &crpix, lsst::geom::SpherePoint const &crval, Eigen::Matrix2d const &cdMatrix, Eigen::MatrixXd const &sipA, Eigen::MatrixXd const &sipB, Eigen::MatrixXd const &sipAp, Eigen::MatrixXd const &sipBp) |
| Make metadata for a TAN-SIP WCS. More...
|
|
| PYBIND11_MODULE (spanSet, mod) |
|
template void | SpanSet::setImage< std::uint16_t > (image::Image< std::uint16_t > &image, std::uint16_t val, lsst::geom::Box2I const ®ion=lsst::geom::Box2I(), bool doClip=false) const |
|
template void | SpanSet::setImage< std::uint64_t > (image::Image< std::uint64_t > &image, std::uint64_t val, lsst::geom::Box2I const ®ion=lsst::geom::Box2I(), bool doClip=false) const |
|
template void | SpanSet::setMask< image::MaskPixel > (image::Mask< image::MaskPixel > &target, image::MaskPixel bitmask) const |
|
template void | SpanSet::clearMask< image::MaskPixel > (image::Mask< image::MaskPixel > &target, image::MaskPixel bitmask) const |
|
template std::shared_ptr< SpanSet > | SpanSet::intersect< image::MaskPixel > (image::Mask< image::MaskPixel > const &other, image::MaskPixel bitmask) const |
|
template std::shared_ptr< SpanSet > | SpanSet::intersectNot< image::MaskPixel > (image::Mask< image::MaskPixel > const &other, image::MaskPixel bitmask) const |
|
template std::shared_ptr< SpanSet > | SpanSet::union_< image::MaskPixel > (image::Mask< image::MaskPixel > const &other, image::MaskPixel bitmask) const |
|
template std::ostream & | operator<<< GenericEndpoint, GenericEndpoint > (std::ostream &os, Transform< GenericEndpoint, GenericEndpoint > const &transform) |
|
template std::ostream & | operator<<< GenericEndpoint, Point2Endpoint > (std::ostream &os, Transform< GenericEndpoint, Point2Endpoint > const &transform) |
|
template std::ostream & | operator<<< GenericEndpoint, SpherePointEndpoint > (std::ostream &os, Transform< GenericEndpoint, SpherePointEndpoint > const &transform) |
|
template std::ostream & | operator<<< Point2Endpoint, GenericEndpoint > (std::ostream &os, Transform< Point2Endpoint, GenericEndpoint > const &transform) |
|
template std::ostream & | operator<<< Point2Endpoint, Point2Endpoint > (std::ostream &os, Transform< Point2Endpoint, Point2Endpoint > const &transform) |
|
template std::ostream & | operator<<< Point2Endpoint, SpherePointEndpoint > (std::ostream &os, Transform< Point2Endpoint, SpherePointEndpoint > const &transform) |
|
template std::ostream & | operator<<< SpherePointEndpoint, GenericEndpoint > (std::ostream &os, Transform< SpherePointEndpoint, GenericEndpoint > const &transform) |
|
template std::ostream & | operator<<< SpherePointEndpoint, Point2Endpoint > (std::ostream &os, Transform< SpherePointEndpoint, Point2Endpoint > const &transform) |
|
template std::ostream & | operator<<< SpherePointEndpoint, SpherePointEndpoint > (std::ostream &os, Transform< SpherePointEndpoint, SpherePointEndpoint > const &transform) |
|
Create a new SkyWcs whose pixels are transformed by pixelTransform, as described below.
If modifyActualPixels is true and the ACTUAL_PIXELS frame exists then pixelTransform is inserted just after the ACTUAL_PIXELS frame:
newActualPixelsToPixels = pixelTransform -> oldActualPixelsToPixels
This is appropriate for shifting a WCS, e.g. when writing FITS metadata for a subimage.
If modifyActualPixels is false or the ACTUAL_PIXELS frame does not exist then pixelTransform is inserted just after the PIXELS frame:
newPixelsToIwc = pixelTransform -> oldPixelsToIwc
This is appropriate for inserting a model for optical distortion.
Other than the change described above, the new SkyWcs will be just like the old one.
- Parameters
-
[in] | pixelTransform | Transform to insert |
[in] | wcs | Input WCS |
[in] | modifyActualPixels | Location at which to insert the transform; if true and the ACTUAL_PIXELS frame is present then insert just after the ACTUAL_PIXELS frame, else insert just after the PIXELS frame. |
- Returns
- the new WCS
Definition at line 441 of file SkyWcs.cc.
443 auto const pixelMapping = pixelTransform.getMapping();
444 auto oldFrameDict =
wcs.getFrameDict();
445 bool const hasActualPixels = oldFrameDict->hasDomain(
"ACTUAL_PIXELS");
446 auto const pixelFrame = oldFrameDict->getFrame(
"PIXELS",
false);
447 auto const iwcFrame = oldFrameDict->getFrame(
"IWC",
false);
448 auto const skyFrame = oldFrameDict->getFrame(
"SKY",
false);
449 auto const oldPixelToIwc = oldFrameDict->getMapping(
"PIXELS",
"IWC");
450 auto const iwcToSky = oldFrameDict->getMapping(
"IWC",
"SKY");
454 if (hasActualPixels) {
455 auto const actualPixelFrame = oldFrameDict->getFrame(
"ACTUAL_PIXELS",
false);
456 auto const oldActualPixelToPixels = oldFrameDict->getMapping(
"ACTUAL_PIXELS",
"PIXELS");
458 if (modifyActualPixels) {
459 newActualPixelsToPixels = pixelMapping->then(*oldActualPixelToPixels).simplified();
460 newPixelToIwc = oldPixelToIwc;
462 newActualPixelsToPixels = oldActualPixelToPixels;
463 newPixelToIwc = pixelMapping->then(*oldPixelToIwc).simplified();
466 std::make_shared<ast::FrameDict>(*actualPixelFrame, *newActualPixelsToPixels, *pixelFrame);
467 newFrameDict->addFrame(
"PIXELS", *newPixelToIwc, *iwcFrame);
469 newPixelToIwc = pixelMapping->then(*oldPixelToIwc).simplified();
470 newFrameDict = std::make_shared<ast::FrameDict>(*pixelFrame, *newPixelToIwc, *iwcFrame);
472 newFrameDict->addFrame(
"IWC", *iwcToSky, *
skyFrame);
473 return std::make_shared<SkyWcs>(*newFrameDict);
table::Key< table::Array< std::uint8_t > > wcs