LSSTApplications  17.0+124,17.0+14,17.0+73,18.0.0+37,18.0.0+80,18.0.0-4-g68ffd23+4,18.1.0-1-g0001055+12,18.1.0-1-g03d53ef+5,18.1.0-1-g1349e88+55,18.1.0-1-g2505f39+44,18.1.0-1-g5315e5e+4,18.1.0-1-g5e4b7ea+14,18.1.0-1-g7e8fceb+4,18.1.0-1-g85f8cd4+48,18.1.0-1-g8ff0b9f+4,18.1.0-1-ga2c679d+1,18.1.0-1-gd55f500+35,18.1.0-10-gb58edde+2,18.1.0-11-g0997b02+4,18.1.0-13-gfe4edf0b+12,18.1.0-14-g259bd21+21,18.1.0-19-gdb69f3f+2,18.1.0-2-g5f9922c+24,18.1.0-2-gd3b74e5+11,18.1.0-2-gfbf3545+32,18.1.0-26-g728bddb4+5,18.1.0-27-g6ff7ca9+2,18.1.0-3-g52aa583+25,18.1.0-3-g8ea57af+9,18.1.0-3-gb69f684+42,18.1.0-3-gfcaddf3+6,18.1.0-32-gd8786685a,18.1.0-4-gf3f9b77+6,18.1.0-5-g1dd662b+2,18.1.0-5-g6dbcb01+41,18.1.0-6-gae77429+3,18.1.0-7-g9d75d83+9,18.1.0-7-gae09a6d+30,18.1.0-9-gc381ef5+4,w.2019.45
LSSTDataManagementBasePackage
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
lsst::afw::geom Namespace Reference

Namespaces

 detail
 
 details
 
 ellipses
 
 polygon
 
 python
 
 skyWcs
 
 testUtils
 
 transform
 
 transformConfig
 
 transformFromString
 
 utils
 
 wcsUtils
 

Classes

class  BaseEndpoint
 Virtual base class for endpoints, which are helper classes for Transform. More...
 
class  BaseVectorEndpoint
 Base class for endpoints with Array = std::vector<Point> where Point has 2 dimensions. More...
 
class  GenericEndpoint
 A generic endpoint for data in the format used by ast::Mapping. More...
 
class  Point2Endpoint
 An endpoint for lsst::geom::Point2D. More...
 
class  SipApproximation
 A fitter and results class for approximating a general Transform in a form compatible with FITS WCS persistence. More...
 
class  SkyWcs
 A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixels. More...
 
class  Span
 A range of pixels within one row of an Image. More...
 
class  SpanPixelIterator
 An iterator that yields lsst::geom::Point2I and increases in the x direction. More...
 
class  SpanSet
 A compact representation of a collection of pixels. More...
 
class  SpherePointEndpoint
 An endpoint for lsst::geom::SpherePoint. More...
 
class  Transform
 Transform LSST spatial data, such as lsst::geom::Point2D and lsst::geom::SpherePoint, using an AST mapping. More...
 

Typedefs

using TransformPoint2ToPoint2 = Transform< Point2Endpoint, Point2Endpoint >
 
using TransformPoint2ToGeneric = Transform< Point2Endpoint, GenericEndpoint >
 
using TransformPoint2ToSpherePoint = Transform< Point2Endpoint, SpherePointEndpoint >
 

Enumerations

enum  Stencil { Stencil::CIRCLE, Stencil::BOX, Stencil::MANHATTAN }
 An enumeration class which describes the shapes. More...
 

Functions

std::ostreamoperator<< (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::ostreamoperator<< (std::ostream &os, Point2Endpoint const &endpoint)
 Print "Point2Endpoint()" to the ostream. More...
 
std::ostreamoperator<< (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< SkyWcsmakeFlippedWcs (SkyWcs const &wcs, bool flipLR, bool flipTB, lsst::geom::Point2D const &center)
 Return a copy of a FITS-WCS with pixel positions flipped around a specified center. More...
 
std::shared_ptr< SkyWcsmakeModifiedWcs (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< SkyWcsmakeSkyWcs (daf::base::PropertySet &metadata, bool strip=false)
 Construct a SkyWcs from FITS keywords. More...
 
std::shared_ptr< SkyWcsmakeSkyWcs (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< SkyWcsmakeSkyWcs (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< SkyWcsmakeTanSipWcs (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< SkyWcsmakeTanSipWcs (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< TransformPoint2ToPoint2makeWcsPairTransform (SkyWcs const &src, SkyWcs const &dst)
 A Transform obtained by putting two SkyWcs objects "back to back". More...
 
std::shared_ptr< TransformPoint2ToSpherePointgetIntermediateWorldCoordsToSky (SkyWcs const &wcs, bool simplify=true)
 Return a transform from intermediate world coordinates to sky. More...
 
std::shared_ptr< TransformPoint2ToPoint2getPixelToIntermediateWorldCoords (SkyWcs const &wcs, bool simplify=true)
 Return a transform from pixel coordinates to intermediate world coordinates. More...
 
std::ostreamoperator<< (std::ostream &os, SkyWcs const &wcs)
 Print a SkyWcs to an ostream (delegates to SkyWcs.toString()). More...
 
template<class FromEndpoint , class ToEndpoint >
std::ostreamoperator<< (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< TransformPoint2ToPoint2makeTransform (lsst::geom::AffineTransform const &affine)
 Wrap an lsst::geom::AffineTransform as a Transform. More...
 
std::shared_ptr< TransformPoint2ToPoint2makeRadialTransform (std::vector< double > const &coeffs)
 A purely radial polynomial distortion. More...
 
std::shared_ptr< TransformPoint2ToPoint2makeRadialTransform (std::vector< double > const &forwardCoeffs, std::vector< double > const &inverseCoeffs)
 A purely radial polynomial distortion. More...
 
std::shared_ptr< TransformPoint2ToPoint2makeIdentityTransform ()
 Trivial Transform x → x. More...
 
std::shared_ptr< daf::base::PropertyListcreateTrivialWcsMetadata (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::PropertyListmakeSipMatrixMetadata (Eigen::MatrixXd const &matrix, std::string const &name)
 
std::shared_ptr< daf::base::PropertyListmakeSimpleWcsMetadata (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::PropertyListmakeTanSipMetadata (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::PropertyListmakeTanSipMetadata (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 &region=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 &region=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< SpanSetSpanSet::intersect< image::MaskPixel > (image::Mask< image::MaskPixel > const &other, image::MaskPixel bitmask) const
 
template std::shared_ptr< SpanSetSpanSet::intersectNot< image::MaskPixel > (image::Mask< image::MaskPixel > const &other, image::MaskPixel bitmask) const
 
template std::shared_ptr< SpanSetSpanSet::union_< image::MaskPixel > (image::Mask< image::MaskPixel > const &other, image::MaskPixel bitmask) const
 
template std::ostreamoperator<<< GenericEndpoint, GenericEndpoint > (std::ostream &os, Transform< GenericEndpoint, GenericEndpoint > const &transform)
 
template std::ostreamoperator<<< GenericEndpoint, Point2Endpoint > (std::ostream &os, Transform< GenericEndpoint, Point2Endpoint > const &transform)
 
template std::ostreamoperator<<< GenericEndpoint, SpherePointEndpoint > (std::ostream &os, Transform< GenericEndpoint, SpherePointEndpoint > const &transform)
 
template std::ostreamoperator<<< Point2Endpoint, GenericEndpoint > (std::ostream &os, Transform< Point2Endpoint, GenericEndpoint > const &transform)
 
template std::ostreamoperator<<< Point2Endpoint, Point2Endpoint > (std::ostream &os, Transform< Point2Endpoint, Point2Endpoint > const &transform)
 
template std::ostreamoperator<<< Point2Endpoint, SpherePointEndpoint > (std::ostream &os, Transform< Point2Endpoint, SpherePointEndpoint > const &transform)
 
template std::ostreamoperator<<< SpherePointEndpoint, GenericEndpoint > (std::ostream &os, Transform< SpherePointEndpoint, GenericEndpoint > const &transform)
 
template std::ostreamoperator<<< SpherePointEndpoint, Point2Endpoint > (std::ostream &os, Transform< SpherePointEndpoint, Point2Endpoint > const &transform)
 
template std::ostreamoperator<<< SpherePointEndpoint, SpherePointEndpoint > (std::ostream &os, Transform< SpherePointEndpoint, SpherePointEndpoint > const &transform)
 

Variables

 AffineTransform
 
 Angle
 
 AngleUnit
 
 Box2D
 
 Box2I
 
 BoxD
 
 BoxI
 
 CoordinateExpr
 
 CoordinateExpr2
 
 CoordinateExpr3
 
 Extent
 
 Extent2D
 
 Extent2I
 
 Extent3D
 
 Extent3I
 
 ExtentBase2D
 
 ExtentBase2I
 
 ExtentBase3D
 
 ExtentBase3I = deprecate_pybind11(ExtentBase3I, reason="Replaced by lsst.geom.ExtentBase3I (will be removed before the release of v20.0)")
 
 ExtentD
 
 ExtentI
 
 LinearTransform
 
 Point
 
 Point2D
 
 Point2I
 
 Point3D
 
 Point3I
 
 PointBase2D
 
 PointBase2I
 
 PointBase3D = deprecate_pybind11(PointBase3D, reason="Replaced by lsst.geom.PointBase3D (will be removed before the release of v20.0)")
 
 PointBase3I
 
 PointD
 
 PointI
 
 SpherePoint
 
 arcsecToRad
 
 averageSpherePoint
 
 degToRad
 
 isAngle
 
 makeAffineTransformFromTriple
 
 masToRad
 
 radToArcsec
 
 radToDeg
 
 radToMas
 

Typedef Documentation

◆ TransformPoint2ToGeneric

Definition at line 301 of file Transform.h.

◆ TransformPoint2ToPoint2

Definition at line 300 of file Transform.h.

◆ TransformPoint2ToSpherePoint

Definition at line 302 of file Transform.h.

Enumeration Type Documentation

◆ Stencil

An enumeration class which describes the shapes.

A stencil is a shape used in creating SpanSets, erosion kernels, or dilation kernels. CIRCLE creates a circle shape, BOX creates a box shape, and MANHATTAN creates a diamond shape.

Enumerator
CIRCLE 
BOX 
MANHATTAN 

Definition at line 66 of file SpanSet.h.

Function Documentation

◆ createTrivialWcsMetadata()

std::shared_ptr< daf::base::PropertyList > lsst::afw::geom::createTrivialWcsMetadata ( std::string const &  wcsName,
lsst::geom::Point2I const &  xy0 
)

Definition at line 51 of file wcsUtils.cc.

52  {
53  std::shared_ptr<daf::base::PropertyList> wcsMetaData(new daf::base::PropertyList);
54 
55  wcsMetaData->set("CTYPE1" + wcsName, "LINEAR", "Type of projection");
56  wcsMetaData->set("CTYPE2" + wcsName, "LINEAR", "Type of projection");
57  wcsMetaData->set("CRPIX1" + wcsName, static_cast<double>(1), "Column Pixel Coordinate of Reference");
58  wcsMetaData->set("CRPIX2" + wcsName, static_cast<double>(1), "Row Pixel Coordinate of Reference");
59  wcsMetaData->set("CRVAL1" + wcsName, static_cast<double>(xy0[0]), "Column pixel of Reference Pixel");
60  wcsMetaData->set("CRVAL2" + wcsName, static_cast<double>(xy0[1]), "Row pixel of Reference Pixel");
61  wcsMetaData->set("CUNIT1" + wcsName, "PIXEL", "Column unit");
62  wcsMetaData->set("CUNIT2" + wcsName, "PIXEL", "Row unit");
63 
64  return wcsMetaData;
65 }

◆ deleteBasicWcsMetadata()

void lsst::afw::geom::deleteBasicWcsMetadata ( daf::base::PropertySet metadata,
std::string const &  wcsName 
)

Definition at line 67 of file wcsUtils.cc.

67  {
68  std::vector<std::string> const names = {"CRPIX1", "CRPIX2", "CRVAL1", "CRVAL2", "CTYPE1",
69  "CTYPE2", "CUNIT1", "CUNIT2", "CD1_1", "CD1_2",
70  "CD2_1", "CD2_2", "WCSAXES"};
71  for (auto const& name : names) {
72  if (metadata.exists(name + wcsName)) {
73  metadata.remove(name + wcsName);
74  }
75  }
76 }

◆ getCdMatrixFromMetadata()

Eigen::Matrix2d lsst::afw::geom::getCdMatrixFromMetadata ( daf::base::PropertySet metadata)

Read a CD matrix from FITS WCS metadata.

The elements of the returned matrix are in degrees

Exceptions
pex::exceptions::TypeErrorif no CD matrix coefficients found (missing coefficients are set to 0, as usual, but they cannot all be missing).

Definition at line 78 of file wcsUtils.cc.

78  {
79  Eigen::Matrix2d matrix;
80  bool found{false};
81  for (int i = 0; i < 2; ++i) {
82  for (int j = 0; j < 2; ++j) {
83  std::string const cardName = "CD" + std::to_string(i + 1) + "_" + std::to_string(j + 1);
84  if (metadata.exists(cardName)) {
85  matrix(i, j) = metadata.getAsDouble(cardName);
86  found = true;
87  } else {
88  matrix(i, j) = 0.0;
89  }
90  }
91  }
92  if (!found) {
93  throw LSST_EXCEPT(pex::exceptions::TypeError, "No CD matrix coefficients found");
94  }
95  return matrix;
96 }
T to_string(T... args)
STL class.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48

◆ getImageXY0FromMetadata()

lsst::geom::Point2I lsst::afw::geom::getImageXY0FromMetadata ( daf::base::PropertySet metadata,
std::string const &  wcsName,
bool  strip = false 
)

Definition at line 98 of file wcsUtils.cc.

99  {
100  int x0 = 0; // Our value of X0
101  int y0 = 0; // Our value of Y0
102 
103  if (metadata.exists("CRPIX1" + wcsName) && metadata.exists("CRPIX2" + wcsName) &&
104  metadata.exists("CRVAL1" + wcsName) && metadata.exists("CRVAL2" + wcsName) &&
105  (metadata.getAsDouble("CRPIX1" + wcsName) == 1.0) &&
106  (metadata.getAsDouble("CRPIX2" + wcsName) == 1.0)) {
107  x0 = static_cast<int>(std::lround(metadata.getAsDouble("CRVAL1" + wcsName)));
108  y0 = static_cast<int>(std::lround(metadata.getAsDouble("CRVAL2" + wcsName)));
109  if (strip) {
110  deleteBasicWcsMetadata(metadata, wcsName);
111  }
112  }
113  return lsst::geom::Point2I(x0, y0);
114 }
Point< int, 2 > Point2I
Definition: Point.h:321
void deleteBasicWcsMetadata(daf::base::PropertySet &metadata, std::string const &wcsName)
Definition: wcsUtils.cc:67
T lround(T... args)
bool strip
Definition: fits.cc:901

◆ getIntermediateWorldCoordsToSky()

std::shared_ptr< TransformPoint2ToSpherePoint > lsst::afw::geom::getIntermediateWorldCoordsToSky ( SkyWcs const &  wcs,
bool  simplify = true 
)

Return a transform from intermediate world coordinates to sky.

Definition at line 538 of file SkyWcs.cc.

539  {
540  auto iwcToSky = wcs.getFrameDict()->getMapping("IWC", "SKY");
541  return std::make_shared<TransformPoint2ToSpherePoint>(*iwcToSky, simplify);
542 }
table::Key< table::Array< std::uint8_t > > wcs
Definition: SkyWcs.cc:71

◆ getPixelToIntermediateWorldCoords()

std::shared_ptr< TransformPoint2ToPoint2 > lsst::afw::geom::getPixelToIntermediateWorldCoords ( SkyWcs const &  wcs,
bool  simplify = true 
)

Return a transform from pixel coordinates to intermediate world coordinates.

The pixel frame is is the base frame: cameraGeom::ACTUAL_PIXELS, if present, else cameraGeom::PIXELS.

Definition at line 544 of file SkyWcs.cc.

544  {
545  auto pixelToIwc = wcs.getFrameDict()->getMapping(ast::FrameSet::BASE, "IWC");
546  return std::make_shared<TransformPoint2ToPoint2>(*pixelToIwc, simplify);
547 }
table::Key< table::Array< std::uint8_t > > wcs
Definition: SkyWcs.cc:71
static int constexpr BASE
index of base frame
Definition: FrameSet.h:104

◆ getSipMatrixFromMetadata()

Eigen::MatrixXd lsst::afw::geom::getSipMatrixFromMetadata ( daf::base::PropertySet const &  metadata,
std::string const &  name 
)

Definition at line 116 of file wcsUtils.cc.

116  {
117  std::string cardName = name + "_ORDER";
118  if (!metadata.exists(cardName)) {
120  "metadata does not contain SIP matrix " + name + ": " + cardName + " not found");
121  };
122  int order = metadata.getAsInt(cardName);
123  if (order < 0) {
125  "matrix order = " + std::to_string(order) + " < 0");
126  }
127  Eigen::MatrixXd matrix(order + 1, order + 1);
128  auto const coeffName = name + "_";
129  for (int i = 0; i <= order; ++i) {
130  for (int j = 0; j <= order; ++j) {
131  std::string const cardName = getSipCoeffCardName(coeffName, i, j);
132  if (metadata.exists(cardName)) {
133  matrix(i, j) = metadata.getAsDouble(cardName);
134  } else {
135  matrix(i, j) = 0.0;
136  }
137  }
138  }
139  return matrix;
140 }
T to_string(T... args)
STL class.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
Reports errors from accepting an object of an unexpected or inappropriate type.
Definition: Runtime.h:167

◆ hasSipMatrix()

bool lsst::afw::geom::hasSipMatrix ( daf::base::PropertySet const &  metadata,
std::string const &  name 
)

Definition at line 142 of file wcsUtils.cc.

142  {
143  std::string cardName = name + "_ORDER";
144  if (!metadata.exists(cardName)) {
145  return false;
146  }
147  return metadata.getAsInt(cardName) >= 0;
148 }
STL class.

◆ linearizeTransform()

lsst::geom::AffineTransform lsst::afw::geom::linearizeTransform ( TransformPoint2ToPoint2 const &  original,
lsst::geom::Point2D const &  inPoint 
)

Approximate a Transform by its local linearization.

Template Parameters
FromEndpoint,ToEndpointThe endpoints of the transform.
Parameters
originalthe Transform to linearize
inPointthe point at which a linear approximation is desired
Returns
an lsst::geom::AffineTransform whose value and Jacobian at inPoint match those of original. It may be invertible; in general, linearizations are invertible if the Jacobian at inPoint is invertible.
Exceptions
pex::exceptions::InvalidParameterErrorThrown if original does not have a well-defined value and Jacobian at inPoint
Exception Safety
Not exception safe.

Definition at line 132 of file transformFactory.cc.

133  {
134  auto outPoint = original.applyForward(inPoint);
135  Eigen::Matrix2d jacobian = original.getJacobian(inPoint);
136  for (int i = 0; i < 2; ++i) {
137  if (!std::isfinite(outPoint[i])) {
138  std::ostringstream buffer;
139  buffer << "Transform ill-defined: " << inPoint << " -> " << outPoint;
140  throw LSST_EXCEPT(pex::exceptions::InvalidParameterError, buffer.str());
141  }
142  }
143  if (!jacobian.allFinite()) {
144  std::ostringstream buffer;
145  buffer << "Transform not continuous at " << inPoint << ": J = " << jacobian;
146  throw LSST_EXCEPT(pex::exceptions::InvalidParameterError, buffer.str());
147  }
148 
149  // y(x) = J (x - x0) + y0 = J x + (y0 - J x0)
150  auto offset = outPoint.asEigen() - jacobian * inPoint.asEigen();
151  return lsst::geom::AffineTransform(jacobian, offset);
152 }
T str(T... args)
T isfinite(T... args)
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48

◆ makeCdMatrix()

Eigen::Matrix2d lsst::afw::geom::makeCdMatrix ( lsst::geom::Angle const &  scale,
lsst::geom::Angle const &  orientation = 0 * lsst::geom::degrees,
bool  flipX = false 
)

Make a WCS CD matrix.

Parameters
[in]scalePixel scale as an angle on sky/pixels
[in]orientationPosition angle of pixel +Y, measured from N through E. At 0 degrees, +Y is along N and +X is along W/E if flipX false/true At 90 degrees, +Y is along E and +X is along N/S if flipX false/true
[in]flipXFlip x axis? See orientation for details.
Returns
the CD matrix, where element (i-1, j-1) corresponds to FITS keyword CDi_j and i, j have range [1, 2]

Definition at line 138 of file SkyWcs.cc.

139  {
140  Eigen::Matrix2d cdMatrix;
141  double orientRad = orientation.asRadians();
142  double scaleDeg = scale.asDegrees();
143  double xmult = flipX ? 1.0 : -1.0;
144  cdMatrix(0, 0) = std::cos(orientRad) * scaleDeg * xmult;
145  cdMatrix(0, 1) = std::sin(orientRad) * scaleDeg;
146  cdMatrix(1, 0) = -std::sin(orientRad) * scaleDeg * xmult;
147  cdMatrix(1, 1) = std::cos(orientRad) * scaleDeg;
148  return cdMatrix;
149 }
def scale(algorithm, min, max=None, frame=None)
Definition: ds9.py:109
T sin(T... args)
T cos(T... args)

◆ makeFlippedWcs()

std::shared_ptr< SkyWcs > lsst::afw::geom::makeFlippedWcs ( SkyWcs const &  wcs,
bool  flipLR,
bool  flipTB,
lsst::geom::Point2D const &  center 
)

Return a copy of a FITS-WCS with pixel positions flipped around a specified center.

Parameters
[in]wcsThe initial WCS
[in]flipLRFlip pixel positions left/right about center
[in]flipTBFlip pixel positions top/bottom about center
[in]centerCenter pixel position of flip

Definition at line 452 of file SkyWcs.cc.

453  {
454  double const dx = 1000; // any "reasonable" number of pixels will do
455  std::vector<double> inLL = {center[0] - dx, center[1] - dx};
456  std::vector<double> inUR = {center[0] + dx, center[1] + dx};
457  std::vector<double> outLL(inLL);
458  std::vector<double> outUR(inUR);
459  if (flipLR) {
460  outLL[0] = inUR[0];
461  outUR[0] = inLL[0];
462  }
463  if (flipTB) {
464  outLL[1] = inUR[1];
465  outUR[1] = inLL[1];
466  }
467  auto const flipPix = TransformPoint2ToPoint2(ast::WinMap(inLL, inUR, outLL, outUR));
468  return makeModifiedWcs(flipPix, wcs, true);
469 }
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.
Definition: SkyWcs.cc:471
table::Key< table::Array< std::uint8_t > > wcs
Definition: SkyWcs.cc:71
Transform< Point2Endpoint, Point2Endpoint > TransformPoint2ToPoint2
Definition: Transform.h:300
A WinMap is a linear Mapping which transforms a rectangular window in one coordinate system into a si...
Definition: WinMap.h:45

◆ makeIdentityTransform()

std::shared_ptr< TransformPoint2ToPoint2 > lsst::afw::geom::makeIdentityTransform ( )

Trivial Transform x → x.

Returns
a Transform mapping any lsst::geom::Point2D to itself. The Transform's inverse shall be itself.
Exception Safety
Provides basic exception safety.

Definition at line 214 of file transformFactory.cc.

214  {
215  return std::make_shared<TransformPoint2ToPoint2>(ast::UnitMap(2));
216 }
A UnitMap is a unit (null) Mapping that has no effect on the coordinates supplied to it...
Definition: UnitMap.h:44

◆ makeModifiedWcs()

std::shared_ptr< SkyWcs > lsst::afw::geom::makeModifiedWcs ( TransformPoint2ToPoint2 const &  pixelTransform,
SkyWcs const &  wcs,
bool  modifyActualPixels 
)

Create a new SkyWcs whose pixels are transformed by pixelTransform, as described below.

If modifyActualPixels is true and the cameraGeom::ACTUAL_PIXELS frame exists then pixelTransform is inserted just after the cameraGeom::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 cameraGeom::ACTUAL_PIXELS frame does not exist then pixelTransform is inserted just after the cameraGeom::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]pixelTransformTransform to insert
[in]wcsInput WCS
[in]modifyActualPixelsLocation at which to insert the transform; if true and the cameraGeom::ACTUAL_PIXELS frame is present then insert just after the cameraGeom::ACTUAL_PIXELS frame, else insert just after the cameraGeom::PIXELS frame.
Returns
the new WCS

Definition at line 471 of file SkyWcs.cc.

472  {
473  auto const pixelMapping = pixelTransform.getMapping();
474  auto oldFrameDict = wcs.getFrameDict();
475  bool const hasActualPixels = oldFrameDict->hasDomain("ACTUAL_PIXELS");
476  auto const pixelFrame = oldFrameDict->getFrame("PIXELS", false);
477  auto const iwcFrame = oldFrameDict->getFrame("IWC", false);
478  auto const skyFrame = oldFrameDict->getFrame("SKY", false);
479  auto const oldPixelToIwc = oldFrameDict->getMapping("PIXELS", "IWC");
480  auto const iwcToSky = oldFrameDict->getMapping("IWC", "SKY");
481 
482  std::shared_ptr<ast::FrameDict> newFrameDict;
483  std::shared_ptr<ast::Mapping> newPixelToIwc;
484  if (hasActualPixels) {
485  auto const actualPixelFrame = oldFrameDict->getFrame("ACTUAL_PIXELS", false);
486  auto const oldActualPixelToPixels = oldFrameDict->getMapping("ACTUAL_PIXELS", "PIXELS");
487  std::shared_ptr<ast::Mapping> newActualPixelsToPixels;
488  if (modifyActualPixels) {
489  newActualPixelsToPixels = pixelMapping->then(*oldActualPixelToPixels).simplified();
490  newPixelToIwc = oldPixelToIwc;
491  } else {
492  newActualPixelsToPixels = oldActualPixelToPixels;
493  newPixelToIwc = pixelMapping->then(*oldPixelToIwc).simplified();
494  }
495  newFrameDict =
496  std::make_shared<ast::FrameDict>(*actualPixelFrame, *newActualPixelsToPixels, *pixelFrame);
497  newFrameDict->addFrame("PIXELS", *newPixelToIwc, *iwcFrame);
498  } else {
499  newPixelToIwc = pixelMapping->then(*oldPixelToIwc).simplified();
500  newFrameDict = std::make_shared<ast::FrameDict>(*pixelFrame, *newPixelToIwc, *iwcFrame);
501  }
502  newFrameDict->addFrame("IWC", *iwcToSky, *skyFrame);
503  return std::make_shared<SkyWcs>(*newFrameDict);
504 }
table::Key< table::Array< std::uint8_t > > wcs
Definition: SkyWcs.cc:71

◆ makeRadialTransform() [1/2]

std::shared_ptr< TransformPoint2ToPoint2 > lsst::afw::geom::makeRadialTransform ( std::vector< double > const &  coeffs)

A purely radial polynomial distortion.

The Transform transforms an input \(x\) to

\[ \frac{x}{r} \sum_{i=1}^{N} \mathrm{coeffs[i]} \ r^i \]

where \(r\) is the magnitude of \(x\).

Parameters
coeffsradial polynomial coefficients. May be an empty vector to represent the identity transformation; otherwise must have size > 1, coeffs[0] = 0, and coeffs[1] ≠ 0.
Returns
the radial distortion represented by coeffs. The Transform shall have an inverse, which may be approximate.
Exceptions
pex::exceptions::InvalidParameterErrorThrown if coeffs does not have the required format.
Exception Safety
Provides basic exception safety.

Definition at line 165 of file transformFactory.cc.

165  {
166  if (!areRadialCoefficients(coeffs)) {
167  std::ostringstream buffer;
168  buffer << "Invalid coefficient vector: " << coeffs;
169  throw LSST_EXCEPT(pex::exceptions::InvalidParameterError, buffer.str());
170  }
171 
172  if (coeffs.empty()) {
173  return std::make_shared<TransformPoint2ToPoint2>(ast::UnitMap(2));
174  } else {
175  // distortion is a radial polynomial with center at focal plane center;
176  // the polynomial has an iterative inverse
177  std::vector<double> center = {0.0, 0.0};
178  ast::PolyMap const distortion = makeOneDDistortion(coeffs);
179  return std::make_shared<TransformPoint2ToPoint2>(*ast::makeRadialMapping(center, distortion));
180  }
181 }
A UnitMap is a unit (null) Mapping that has no effect on the coordinates supplied to it...
Definition: UnitMap.h:44
T str(T... args)
std::shared_ptr< Mapping > makeRadialMapping(std::vector< double > const &center, Mapping const &mapping1d)
Construct a radially symmetric mapping from a 1-dimensional mapping.
Definition: functional.cc:48
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
PolyMap is a Mapping which performs a general polynomial transformation.
Definition: PolyMap.h:49

◆ makeRadialTransform() [2/2]

std::shared_ptr< TransformPoint2ToPoint2 > lsst::afw::geom::makeRadialTransform ( std::vector< double > const &  forwardCoeffs,
std::vector< double > const &  inverseCoeffs 
)

A purely radial polynomial distortion.

Similar to makeRadialTransform(std::vector<double> const &), but allows the user to provide an inverse.

Parameters
forwardCoeffsradial polynomial coefficients. May be an empty vector to represent the identity transformation; otherwise must have size > 1, coeffs[0] = 0, and coeffs[1] ≠ 0.
inverseCoeffscoefficients for the inverse transform, as above. Does not need to have the same degree as forwardCoeffs, but either both must be empty or neither must be empty.
Returns
the radial distortion represented by coeffs. The Transform shall have an inverse, whose accuracy is determined by the relationship between forwardCoeffs and inverseCoeffs.
Exceptions
pex::exceptions::InvalidParameterErrorThrown if forwardCoeffs or inverseCoeffs does not have the required format.
Exception Safety
Provides basic exception safety.

Definition at line 183 of file transformFactory.cc.

184  {
185  if (forwardCoeffs.empty() != inverseCoeffs.empty()) {
186  throw LSST_EXCEPT(
187  pex::exceptions::InvalidParameterError,
188  "makeRadialTransform must have either both empty or both non-empty coefficient vectors.");
189  }
190  if (forwardCoeffs.empty()) {
191  // no forward or inverse coefficients, so no distortion
192  return std::make_shared<TransformPoint2ToPoint2>(ast::UnitMap(2));
193  }
194 
195  if (!areRadialCoefficients(forwardCoeffs)) {
196  std::ostringstream buffer;
197  buffer << "Invalid forward coefficient vector: " << forwardCoeffs;
198  throw LSST_EXCEPT(pex::exceptions::InvalidParameterError, buffer.str());
199  }
200  if (!areRadialCoefficients(inverseCoeffs)) {
201  std::ostringstream buffer;
202  buffer << "Invalid inverse coefficient vector: " << inverseCoeffs;
203  throw LSST_EXCEPT(pex::exceptions::InvalidParameterError, buffer.str());
204  }
205  // distortion is a 1-d radial polynomial centered at focal plane center;
206  // the polynomial has coefficients specified for both the forward and inverse directions
207  std::vector<double> center = {0.0, 0.0};
208  ast::PolyMap const forward = makeOneDDistortion(forwardCoeffs);
209  auto inverse = makeOneDDistortion(inverseCoeffs).inverted();
210  auto distortion = ast::TranMap(forward, *inverse);
211  return std::make_shared<TransformPoint2ToPoint2>(*ast::makeRadialMapping(center, distortion));
212 }
T empty(T... args)
A UnitMap is a unit (null) Mapping that has no effect on the coordinates supplied to it...
Definition: UnitMap.h:44
T str(T... args)
std::shared_ptr< Mapping > makeRadialMapping(std::vector< double > const &center, Mapping const &mapping1d)
Construct a radially symmetric mapping from a 1-dimensional mapping.
Definition: functional.cc:48
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
PolyMap is a Mapping which performs a general polynomial transformation.
Definition: PolyMap.h:49
TranMap is a Mapping which combines the forward transformation of a supplied Mapping with the inverse...
Definition: TranMap.h:49
T forward(T... args)

◆ makeSimpleWcsMetadata()

std::shared_ptr< daf::base::PropertyList > lsst::afw::geom::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).

This can also be used as a starting point for creating metadata for more sophisticated FITS WCS.

Parameters
[in]crpixCenter of projection on the CCD using the LSST convention: 0, 0 is the lower left pixel of the image
[in]crvalCenter of projection on the sky
[in]cdMatrixCD matrix where element (i-1, j-1) corresponds to FITS keyword CDi_j and i, j have range [1, 2]
[in]projectionThe name of the FITS WCS projection, e.g. "TAN" or "STG"

Definition at line 172 of file wcsUtils.cc.

175  {
176  auto pl = std::make_shared<daf::base::PropertyList>();
177  pl->add("RADESYS", "ICRS");
178  pl->add("EQUINOX", 2000); // not needed, but may help some older code
179  pl->add("CTYPE1", "RA---" + projection);
180  pl->add("CTYPE2", "DEC--" + projection);
181  pl->add("CRPIX1", crpix[0] + 1);
182  pl->add("CRPIX2", crpix[1] + 1);
183  pl->add("CRVAL1", crval[0].asDegrees());
184  pl->add("CRVAL2", crval[1].asDegrees());
185  pl->add("CUNIT1", "deg");
186  pl->add("CUNIT2", "deg");
187  for (int i = 0; i < 2; ++i) {
188  for (int j = 0; j < 2; ++j) {
189  if (cdMatrix(i, j) != 0.0) {
190  std::string name = "CD" + std::to_string(i + 1) + "_" + std::to_string(j + 1);
191  pl->add(name, cdMatrix(i, j));
192  }
193  }
194  }
195  return pl;
196 }
table::PointKey< double > crpix
Definition: OldWcs.cc:131
T to_string(T... args)
table::PointKey< double > crval
Definition: OldWcs.cc:130
STL class.

◆ makeSipMatrixMetadata()

std::shared_ptr< daf::base::PropertyList > lsst::afw::geom::makeSipMatrixMetadata ( Eigen::MatrixXd const &  matrix,
std::string const &  name 
)

Definition at line 150 of file wcsUtils.cc.

151  {
152  if (matrix.rows() != matrix.cols() || matrix.rows() < 1) {
154  "Matrix must be square and at least 1 x 1; dimensions = " +
155  std::to_string(matrix.rows()) + " x " + std::to_string(matrix.cols()));
156  }
157  int const order = matrix.rows() - 1;
158  auto metadata = std::make_shared<daf::base::PropertyList>();
159  std::string cardName = name + "_ORDER";
160  metadata->set(cardName, order);
161  auto const coeffName = name + "_";
162  for (int i = 0; i <= order; ++i) {
163  for (int j = 0; j <= order; ++j) {
164  if (matrix(i, j) != 0.0) {
165  metadata->set(getSipCoeffCardName(coeffName, i, j), matrix(i, j));
166  }
167  }
168  }
169  return metadata;
170 }
T to_string(T... args)
STL class.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
Reports errors from accepting an object of an unexpected or inappropriate type.
Definition: Runtime.h:167

◆ makeSkyWcs() [1/3]

std::shared_ptr< SkyWcs > lsst::afw::geom::makeSkyWcs ( daf::base::PropertySet metadata,
bool  strip = false 
)

Construct a SkyWcs from FITS keywords.

This function is preferred over calling the SkyWcs metadata constructor directly because it allows us to change SkyWcs to an abstract base class in the future, without affecting code that constructs a WCS from FITS metadata.

Parameters
[in]metadataFITS header metadata
[in]stripIf true: strip items from metadata used to create the WCS, such as RADESYS, EQUINOX, CTYPE12, CRPIX12, CRVAL12, etc. Always keep keywords that might be wanted for other purpposes, including NAXIS12 and date-related keywords such as "DATE-OBS" and "TIMESYS" (but not "EQUINOX").
Exceptions
lsst::pex::exceptions::TypeErrorif the metadata does not describe a celestial WCS.

Definition at line 506 of file SkyWcs.cc.

506  {
507  return std::make_shared<SkyWcs>(metadata, strip);
508 }
bool strip
Definition: fits.cc:901

◆ makeSkyWcs() [2/3]

std::shared_ptr< SkyWcs > lsst::afw::geom::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.

Parameters
[in]crpixCenter of projection on the CCD using the LSST convention: 0, 0 is the lower left pixel of the parent image
[in]crvalCenter of projection on the sky
[in]cdMatrixCD matrix, where element (i-1, j-1) corresponds to FITS keyword CDi_j and i, j have range [1, 2]. May be computed by calling makeCdMatrix.
[in]projectionThe name of the FITS WCS projection, e.g. "TAN" or "STG"

Definition at line 510 of file SkyWcs.cc.

511  {
512  auto metadata = makeSimpleWcsMetadata(crpix, crval, cdMatrix, projection);
513  return std::make_shared<SkyWcs>(*metadata);
514 }
table::PointKey< double > crpix
Definition: OldWcs.cc:131
table::PointKey< double > crval
Definition: OldWcs.cc:130
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).
Definition: wcsUtils.cc:172

◆ makeSkyWcs() [3/3]

std::shared_ptr< SkyWcs > lsst::afw::geom::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.

Parameters
[in]pixelsToFieldAngleTransformation from pixels to field angle (in radians).
[in]orientationPosition angle of focal plane +Y, measured from N through E at crval. At 0 degrees, +Y is along N and +X is along W/E if flipX false/true. At 90 degrees, +Y is along E and +X is along N/S if flipX false/true.
[in]flipXFlip x axis? See orientation for details.
[in]boresightICRS sky position at the boresight (field angle (0, 0)).
[in]projectionThe name of the FITS WCS projection, e.g. "TAN" or "STG".
Returns
a SkyWcs whose sky origin is the boresight and pixel origin is focal plane (0, 0).
Note
Unlike makeCdMatrix, orientation is with respect to the focal plane axes, not the CCD axes. This is because field angle is defined with respect to focal plane axes.

Definition at line 516 of file SkyWcs.cc.

518  {
519  auto frameDict = makeSkyWcsFrameDict(pixelsToFieldAngle, orientation, flipX, boresight, projection);
520  return std::make_shared<SkyWcs>(frameDict);
521 }

◆ makeTanSipMetadata() [1/2]

std::shared_ptr< daf::base::PropertyList > lsst::afw::geom::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.

Parameters
[in]crpixCenter of projection on the CCD using the LSST convention: 0, 0 is the lower left pixel of the parent image
[in]crvalCenter of projection on the sky
[in]cdMatrixCD matrix, where element (i-1, j-1) corresponds to FITS keyword CDi_j and i, j have range [1, 2]. May be computed by calling makeCdMatrix.
[in]sipAForward distortion matrix for axis 1
[in]sipBForward distortion matrix for axis 2

Definition at line 198 of file wcsUtils.cc.

202  {
203  auto metadata = makeSimpleWcsMetadata(crpix, crval, cdMatrix, "TAN-SIP");
204  metadata->combine(makeSipMatrixMetadata(sipA, "A"));
205  metadata->combine(makeSipMatrixMetadata(sipB, "B"));
206  return metadata;
207 }
table::PointKey< double > crpix
Definition: OldWcs.cc:131
table::PointKey< double > crval
Definition: OldWcs.cc:130
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).
Definition: wcsUtils.cc:172
std::shared_ptr< daf::base::PropertyList > makeSipMatrixMetadata(Eigen::MatrixXd const &matrix, std::string const &name)
Definition: wcsUtils.cc:150

◆ makeTanSipMetadata() [2/2]

std::shared_ptr< daf::base::PropertyList > lsst::afw::geom::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.

Parameters
[in]crpixCenter of projection on the CCD using the LSST convention: 0, 0 is the lower left pixel of the parent image
[in]crvalCenter of projection on the sky
[in]cdMatrixCD matrix, where element (i-1, j-1) corresponds to FITS keyword CDi_j and i, j have range [1, 2]. May be computed by calling makeCdMatrix.
[in]sipAForward distortion matrix for axis 1
[in]sipBForward distortion matrix for axis 2
[in]sipApReverse distortion matrix for axis 1
[in]sipBpReverse distortion matrix for axis 2

Definition at line 209 of file wcsUtils.cc.

212  {
213  auto metadata = makeTanSipMetadata(crpix, crval, cdMatrix, sipA, sipB);
214  metadata->combine(makeSipMatrixMetadata(sipAp, "AP"));
215  metadata->combine(makeSipMatrixMetadata(sipBp, "BP"));
216  return metadata;
217 }
table::PointKey< double > crpix
Definition: OldWcs.cc:131
table::PointKey< double > crval
Definition: OldWcs.cc:130
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.
Definition: wcsUtils.cc:198
std::shared_ptr< daf::base::PropertyList > makeSipMatrixMetadata(Eigen::MatrixXd const &matrix, std::string const &name)
Definition: wcsUtils.cc:150

◆ makeTanSipWcs() [1/2]

std::shared_ptr< SkyWcs > lsst::afw::geom::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.

Parameters
[in]crpixCenter of projection on the CCD using the LSST convention: 0, 0 is the lower left pixel of the parent image
[in]crvalCenter of projection on the sky
[in]cdMatrixCD matrix, where element (i-1, j-1) corresponds to FITS keyword CDi_j and i, j have range [1, 2]. May be computed by calling makeCdMatrix.
[in]sipAForward distortion matrix for axis 1
[in]sipBForward distortion matrix for axis 2

Definition at line 523 of file SkyWcs.cc.

525  {
526  auto metadata = makeTanSipMetadata(crpix, crval, cdMatrix, sipA, sipB);
527  return std::make_shared<SkyWcs>(*metadata);
528 }
table::PointKey< double > crpix
Definition: OldWcs.cc:131
table::PointKey< double > crval
Definition: OldWcs.cc:130
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.
Definition: wcsUtils.cc:198

◆ makeTanSipWcs() [2/2]

std::shared_ptr< SkyWcs > lsst::afw::geom::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.

Parameters
[in]crpixCenter of projection on the CCD using the LSST convention: 0, 0 is the lower left pixel of the parent image
[in]crvalCenter of projection on the sky
[in]cdMatrixCD matrix, where element (i-1, j-1) corresponds to FITS keyword CDi_j and i, j have range [1, 2]. May be computed by calling makeCdMatrix.
[in]sipAForward distortion matrix for axis 1
[in]sipBForward distortion matrix for axis 2
[in]sipApReverse distortion matrix for axis 1
[in]sipBpReverse distortion matrix for axis 2

Definition at line 530 of file SkyWcs.cc.

533  {
534  auto metadata = makeTanSipMetadata(crpix, crval, cdMatrix, sipA, sipB, sipAp, sipBp);
535  return std::make_shared<SkyWcs>(*metadata);
536 }
table::PointKey< double > crpix
Definition: OldWcs.cc:131
table::PointKey< double > crval
Definition: OldWcs.cc:130
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.
Definition: wcsUtils.cc:198

◆ makeTransform()

std::shared_ptr< TransformPoint2ToPoint2 > lsst::afw::geom::makeTransform ( lsst::geom::AffineTransform const &  affine)

Wrap an lsst::geom::AffineTransform as a Transform.

Parameters
affineThe lsst::geom::AffineTransform to wrap.
Returns
a Transform that that maps any lsst::geom::Point2D x to affine(x). It shall be invertible iff affine is invertible.
Exception Safety
Provides basic exception safety.

Definition at line 154 of file transformFactory.cc.

154  {
155  auto const offset = lsst::geom::Point2D(affine.getTranslation());
156  auto const jacobian = affine.getLinear().getMatrix();
157 
158  Point2Endpoint toEndpoint;
159  auto const map = ast::MatrixMap(toNdArray(jacobian))
160  .then(ast::ShiftMap(toEndpoint.dataFromPoint(offset)))
161  .simplified();
162  return std::make_shared<TransformPoint2ToPoint2>(*map);
163 }
MatrixMap is a form of Mapping which performs a general linear transformation.
Definition: MatrixMap.h:42
SeriesMap then(Mapping const &next) const
Return a series compound mapping this(first(input)) containing shallow copies of the original...
Definition: Mapping.cc:37
Point< double, 2 > Point2D
Definition: Point.h:324
std::shared_ptr< Mapping > simplified() const
Return a simplied version of the mapping (which may be a compound Mapping such as a CmpMap)...
Definition: Mapping.h:248
ShiftMap is a linear Mapping which shifts each axis by a specified constant value.
Definition: ShiftMap.h:40

◆ makeWcsPairTransform()

std::shared_ptr< TransformPoint2ToPoint2 > lsst::afw::geom::makeWcsPairTransform ( SkyWcs const &  src,
SkyWcs const &  dst 
)

A Transform obtained by putting two SkyWcs objects "back to back".

Parameters
srcthe WCS for the source pixels
dstthe WCS for the destination pixels
Returns
a Transform whose forward transformation converts from src pixels to dst pixels, and whose inverse transformation converts in the opposite direction.
Exception Safety
Provides basic exception safety.

Definition at line 151 of file SkyWcs.cc.

151  {
152  auto const dstInverse = dst.getTransform()->inverted();
153  return src.getTransform()->then(*dstInverse);
154 }
std::shared_ptr< RecordT > src
Definition: Match.cc:48

◆ operator<<() [1/5]

template<class FromEndpoint , class ToEndpoint >
std::ostream & lsst::afw::geom::operator<< ( std::ostream os,
Transform< FromEndpoint, ToEndpoint > const &  transform 
)

Print a Transform to an ostream.

The format is "Transform<_fromEndpoint_, _toEndpoint_>" where fromEndpoint and toEndpoint are the appropriate endpoint printed to the ostream; for example "Transform<GenericEndpoint(4), Point2Endpoint()>"

Definition at line 189 of file Transform.cc.

189  {
190  os << "Transform<" << transform.getFromEndpoint() << ", " << transform.getToEndpoint() << ">";
191  return os;
192 };
std::ostream * os
Definition: Schema.cc:746

◆ operator<<() [2/5]

std::ostream & lsst::afw::geom::operator<< ( std::ostream os,
GenericEndpoint const &  endpoint 
)

Print "GenericEndpoint(_n_)" to the ostream where _n_ is the number of axes, e.g. "GenericAxes(4)".

Definition at line 240 of file Endpoint.cc.

240  {
241  os << "GenericEndpoint(" << endpoint.getNAxes() << ")";
242  return os;
243 }
std::ostream * os
Definition: Schema.cc:746

◆ operator<<() [3/5]

std::ostream & lsst::afw::geom::operator<< ( std::ostream os,
Point2Endpoint const &  endpoint 
)

Print "Point2Endpoint()" to the ostream.

Definition at line 245 of file Endpoint.cc.

245  {
246  os << "Point2Endpoint()";
247  return os;
248 }
std::ostream * os
Definition: Schema.cc:746

◆ operator<<() [4/5]

std::ostream & lsst::afw::geom::operator<< ( std::ostream os,
SpherePointEndpoint const &  endpoint 
)

Print "SpherePointEndpoint()" to the ostream.

Definition at line 250 of file Endpoint.cc.

250  {
251  os << "SpherePointEndpoint()";
252  return os;
253 }
std::ostream * os
Definition: Schema.cc:746

◆ operator<<() [5/5]

std::ostream & lsst::afw::geom::operator<< ( std::ostream os,
SkyWcs const &  wcs 
)

Print a SkyWcs to an ostream (delegates to SkyWcs.toString()).

Definition at line 549 of file SkyWcs.cc.

549  {
550  os << wcs.toString();
551  return os;
552 };
table::Key< table::Array< std::uint8_t > > wcs
Definition: SkyWcs.cc:71
std::ostream * os
Definition: Schema.cc:746

◆ operator<<< GenericEndpoint, GenericEndpoint >()

template std::ostream& lsst::afw::geom::operator<<< GenericEndpoint, GenericEndpoint > ( std::ostream os,
Transform< GenericEndpoint, GenericEndpoint > const &  transform 
)

◆ operator<<< GenericEndpoint, Point2Endpoint >()

template std::ostream& lsst::afw::geom::operator<<< GenericEndpoint, Point2Endpoint > ( std::ostream os,
Transform< GenericEndpoint, Point2Endpoint > const &  transform 
)

◆ operator<<< GenericEndpoint, SpherePointEndpoint >()

template std::ostream& lsst::afw::geom::operator<<< GenericEndpoint, SpherePointEndpoint > ( std::ostream os,
Transform< GenericEndpoint, SpherePointEndpoint > const &  transform 
)

◆ operator<<< Point2Endpoint, GenericEndpoint >()

template std::ostream& lsst::afw::geom::operator<<< Point2Endpoint, GenericEndpoint > ( std::ostream os,
Transform< Point2Endpoint, GenericEndpoint > const &  transform 
)

◆ operator<<< Point2Endpoint, Point2Endpoint >()

template std::ostream& lsst::afw::geom::operator<<< Point2Endpoint, Point2Endpoint > ( std::ostream os,
Transform< Point2Endpoint, Point2Endpoint > const &  transform 
)

◆ operator<<< Point2Endpoint, SpherePointEndpoint >()

template std::ostream& lsst::afw::geom::operator<<< Point2Endpoint, SpherePointEndpoint > ( std::ostream os,
Transform< Point2Endpoint, SpherePointEndpoint > const &  transform 
)

◆ operator<<< SpherePointEndpoint, GenericEndpoint >()

template std::ostream& lsst::afw::geom::operator<<< SpherePointEndpoint, GenericEndpoint > ( std::ostream os,
Transform< SpherePointEndpoint, GenericEndpoint > const &  transform 
)

◆ operator<<< SpherePointEndpoint, Point2Endpoint >()

template std::ostream& lsst::afw::geom::operator<<< SpherePointEndpoint, Point2Endpoint > ( std::ostream os,
Transform< SpherePointEndpoint, Point2Endpoint > const &  transform 
)

◆ operator<<< SpherePointEndpoint, SpherePointEndpoint >()

template std::ostream& lsst::afw::geom::operator<<< SpherePointEndpoint, SpherePointEndpoint > ( std::ostream os,
Transform< SpherePointEndpoint, SpherePointEndpoint > const &  transform 
)

◆ PYBIND11_MODULE()

lsst::afw::geom::PYBIND11_MODULE ( spanSet  ,
mod   
)

Definition at line 195 of file spanSet.cc.

195  {
196  using MaskPixel = image::MaskPixel;
197 
198  py::module::import("lsst.geom");
199  py::module::import("lsst.afw.geom.span");
200 
201  py::enum_<Stencil>(mod, "Stencil")
202  .value("CIRCLE", Stencil::CIRCLE)
203  .value("BOX", Stencil::BOX)
204  .value("MANHATTAN", Stencil::MANHATTAN);
205 
206  PySpanSet cls(mod, "SpanSet");
207 
208  /* SpanSet Constructors */
209  cls.def(py::init<>());
210  cls.def(py::init<lsst::geom::Box2I>(), "box"_a);
211  cls.def(py::init<std::vector<Span>, bool>(), "spans"_a, "normalize"_a = true);
212 
213  table::io::python::addPersistableMethods<SpanSet>(cls);
214 
215  /* SpanSet Methods */
216  cls.def("getArea", &SpanSet::getArea);
217  cls.def("getBBox", &SpanSet::getBBox);
218  cls.def("isContiguous", &SpanSet::isContiguous);
219  cls.def("shiftedBy", (std::shared_ptr<SpanSet>(SpanSet::*)(int, int) const) & SpanSet::shiftedBy);
220  cls.def("shiftedBy",
221  (std::shared_ptr<SpanSet>(SpanSet::*)(lsst::geom::Extent2I const &) const) & SpanSet::shiftedBy);
222  cls.def("clippedTo", &SpanSet::clippedTo);
223  cls.def("transformedBy",
224  (std::shared_ptr<SpanSet>(SpanSet::*)(lsst::geom::LinearTransform const &) const) &
225  SpanSet::transformedBy);
226  cls.def("transformedBy",
227  (std::shared_ptr<SpanSet>(SpanSet::*)(lsst::geom::AffineTransform const &) const) &
228  SpanSet::transformedBy);
229  cls.def("transformedBy", (std::shared_ptr<SpanSet>(SpanSet::*)(TransformPoint2ToPoint2 const &) const) &
230  SpanSet::transformedBy);
231  cls.def("overlaps", &SpanSet::overlaps);
232  cls.def("contains", (bool (SpanSet::*)(SpanSet const &) const) & SpanSet::contains);
233  cls.def("contains", (bool (SpanSet::*)(lsst::geom::Point2I const &) const) & SpanSet::contains);
234  cls.def("computeCentroid", &SpanSet::computeCentroid);
235  cls.def("computeShape", &SpanSet::computeShape);
236  cls.def("dilated", (std::shared_ptr<SpanSet>(SpanSet::*)(int, Stencil) const) & SpanSet::dilated,
237  "radius"_a, "stencil"_a = Stencil::CIRCLE);
238  cls.def("dilated", (std::shared_ptr<SpanSet>(SpanSet::*)(SpanSet const &) const) & SpanSet::dilated);
239  cls.def("eroded", (std::shared_ptr<SpanSet>(SpanSet::*)(int, Stencil) const) & SpanSet::eroded,
240  "radius"_a, "stencil"_a = Stencil::CIRCLE);
241  cls.def("eroded", (std::shared_ptr<SpanSet>(SpanSet::*)(SpanSet const &) const) & SpanSet::eroded);
242  cls.def("intersect", (std::shared_ptr<SpanSet>(SpanSet::*)(SpanSet const &) const) & SpanSet::intersect);
243  cls.def("intersectNot",
244  (std::shared_ptr<SpanSet>(SpanSet::*)(SpanSet const &) const) & SpanSet::intersectNot);
245  cls.def("union", (std::shared_ptr<SpanSet>(SpanSet::*)(SpanSet const &) const) & SpanSet::union_);
246  cls.def_static("fromShape",
247  (std::shared_ptr<SpanSet>(*)(int, Stencil, lsst::geom::Point2I)) & SpanSet::fromShape,
248  "radius"_a, "stencil"_a = Stencil::CIRCLE, "offset"_a = lsst::geom::Point2I());
249  cls.def_static("fromShape",
250  [](int r, Stencil s, std::pair<int, int> point) {
251  return SpanSet::fromShape(r, s, lsst::geom::Point2I(point.first, point.second));
252  },
253  "radius"_a, "stencil"_a = Stencil::CIRCLE, "offset"_a = std::pair<int, int>(0, 0));
254  cls.def_static("fromShape",
255  (std::shared_ptr<SpanSet>(*)(geom::ellipses::Ellipse const &)) & SpanSet::fromShape);
256  cls.def("split", &SpanSet::split);
257  cls.def("findEdgePixels", &SpanSet::findEdgePixels);
258  cls.def("indices", [](SpanSet const &self) -> std::pair<std::vector<int>, std::vector<int>> {
259  std::vector<int> yind;
260  std::vector<int> xind;
261  yind.reserve(self.getArea());
262  xind.reserve(self.getArea());
263  for (auto const &span : self) {
264  auto y = span.getY();
265  for (int x = span.getX0(); x <= span.getX1(); ++x) {
266  yind.push_back(y);
267  xind.push_back(x);
268  }
269  }
270  return std::make_pair(yind, xind);
271  });
272 
273  /* SpanSet Operators */
274  cls.def("__eq__", [](SpanSet const &self, SpanSet const &other) -> bool { return self == other; },
275  py::is_operator());
276  cls.def("__ne__", [](SpanSet const &self, SpanSet const &other) -> bool { return self != other; },
277  py::is_operator());
278  cls.def("__iter__", [](SpanSet &self) { return py::make_iterator(self.begin(), self.end()); },
279  py::keep_alive<0, 1>());
280  cls.def("__len__", [](SpanSet const &self) -> decltype(self.size()) { return self.size(); });
281  cls.def("__contains__", [](SpanSet &self, SpanSet const &other) -> bool { return self.contains(other); });
282  cls.def("__contains__",
283  [](SpanSet &self, lsst::geom::Point2I &other) -> bool { return self.contains(other); });
284  cls.def("__repr__", [](SpanSet const &self) -> std::string {
286  image::Mask<MaskPixel> tempMask(self.getBBox());
287  self.setMask(tempMask, static_cast<MaskPixel>(1));
288  auto array = tempMask.getArray();
289  auto dims = array.getShape();
290  for (std::size_t i = 0; i < dims[0]; ++i) {
291  os << "[";
292  for (std::size_t j = 0; j < dims[1]; ++j) {
293  os << array[i][j];
294  if (j != dims[1] - 1) {
295  os << ", ";
296  }
297  }
298  os << "]" << std::endl;
299  }
300  return os.str();
301  });
302  cls.def("__str__", [](SpanSet const &self) -> std::string {
304  for (auto const &span : self) {
305  os << span.getY() << ": " << span.getMinX() << ".." << span.getMaxX() << std::endl;
306  }
307  return os.str();
308  });
309  // Instantiate all the templates
310 
311  declareMaskMethods<MaskPixel>(cls);
312 
313  declareImageTypes<std::uint16_t>(cls);
314  declareImageTypes<std::uint64_t>(cls);
315  declareImageTypes<int>(cls);
316  declareImageTypes<float>(cls);
317  declareImageTypes<double>(cls);
318 
319  // Extra instantiation for flatten unflatten methods
320  declareFlattenMethod<long>(cls);
321  declareUnflattenMethod<long>(cls);
322 
323  declarefromMask<MaskPixel>(cls);
324 }
Stencil
An enumeration class which describes the shapes.
Definition: SpanSet.h:66
An affine coordinate transformation consisting of a linear transformation and an offset.
def init()
Definition: tests.py:64
T endl(T... args)
int y
Definition: SpanSet.cc:49
ItemVariant const * other
Definition: Schema.cc:56
Transform< Point2Endpoint, Point2Endpoint > TransformPoint2ToPoint2
Definition: Transform.h:300
STL class.
T push_back(T... args)
Represent a 2-dimensional array of bitmask pixels.
Definition: Mask.h:77
T str(T... args)
T make_pair(T... args)
std::int32_t MaskPixel
default type for Masks and MaskedImage Masks
double x
STL class.
T begin(T... args)
std::ostream * os
Definition: Schema.cc:746
int end
A 2D linear coordinate transformation.
T reserve(T... args)

◆ SpanSet::clearMask< image::MaskPixel >()

◆ SpanSet::intersect< image::MaskPixel >()

◆ SpanSet::intersectNot< image::MaskPixel >()

◆ SpanSet::setImage< std::uint16_t >()

template void lsst::afw::geom::SpanSet::setImage< std::uint16_t > ( image::Image< std::uint16_t > &  image,
std::uint16_t  val,
lsst::geom::Box2I const &  region = lsst::geom::Box2I(),
bool  doClip = false 
) const

◆ SpanSet::setImage< std::uint64_t >()

template void lsst::afw::geom::SpanSet::setImage< std::uint64_t > ( image::Image< std::uint64_t > &  image,
std::uint64_t  val,
lsst::geom::Box2I const &  region = lsst::geom::Box2I(),
bool  doClip = false 
) const

◆ SpanSet::setMask< image::MaskPixel >()

◆ SpanSet::union_< image::MaskPixel >()

Variable Documentation

◆ AffineTransform

Initial value:
1 = deprecate_pybind11(AffineTransform,
2  reason="Replaced by lsst.geom.AffineTransform (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 43 of file __init__.py.

◆ Angle

Initial value:
1 = deprecate_pybind11(Angle,
2  reason="Replaced by lsst.geom.Angle (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 45 of file __init__.py.

◆ AngleUnit

Initial value:
1 = deprecate_pybind11(AngleUnit,
2  reason="Replaced by lsst.geom.AngleUnit (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 47 of file __init__.py.

◆ arcsecToRad

lsst.afw.geom.arcsecToRad
Initial value:
1 = deprecate_pybind11(arcsecToRad,
2  reason="Replaced by lsst.geom.arcsecToRad (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 110 of file __init__.py.

◆ averageSpherePoint

lsst.afw.geom.averageSpherePoint
Initial value:
1 = deprecate_pybind11(averageSpherePoint,
2  reason="Replaced by lsst.geom.averageSpherePoint (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 112 of file __init__.py.

◆ Box2D

Initial value:
1 = deprecate_pybind11(Box2D,
2  reason="Replaced by lsst.geom.Box2D (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 49 of file __init__.py.

◆ Box2I

Initial value:
1 = deprecate_pybind11(Box2I,
2  reason="Replaced by lsst.geom.Box2I (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 51 of file __init__.py.

◆ BoxD

lsst.afw.geom.BoxD
Initial value:
1 = deprecate_pybind11(BoxD,
2  reason="Replaced by lsst.geom.BoxD (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 53 of file __init__.py.

◆ BoxI

lsst.afw.geom.BoxI
Initial value:
1 = deprecate_pybind11(BoxI,
2  reason="Replaced by lsst.geom.BoxI (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 55 of file __init__.py.

◆ CoordinateExpr

lsst.afw.geom.CoordinateExpr
Initial value:
1 = deprecate_pybind11(CoordinateExpr,
2  reason="Replaced by lsst.geom.CoordinateExpr (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 58 of file __init__.py.

◆ CoordinateExpr2

lsst.afw.geom.CoordinateExpr2
Initial value:
1 = deprecate_pybind11(CoordinateExpr2,
2  reason="Replaced by lsst.geom.CoordinateExpr2 (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 60 of file __init__.py.

◆ CoordinateExpr3

lsst.afw.geom.CoordinateExpr3
Initial value:
1 = deprecate_pybind11(CoordinateExpr3,
2  reason="Replaced by lsst.geom.CoordinateExpr3 (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 62 of file __init__.py.

◆ degToRad

lsst.afw.geom.degToRad
Initial value:
1 = deprecate_pybind11(degToRad,
2  reason="Replaced by lsst.geom.degToRad (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 114 of file __init__.py.

◆ Extent

Initial value:
1 = deprecate_pybind11(Extent,
2  reason="Replaced by lsst.geom.Extent (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 64 of file __init__.py.

◆ Extent2D

lsst.afw.geom.Extent2D
Initial value:
1 = deprecate_pybind11(Extent2D,
2  reason="Replaced by lsst.geom.Extent2D (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 66 of file __init__.py.

◆ Extent2I

lsst.afw.geom.Extent2I
Initial value:
1 = deprecate_pybind11(Extent2I,
2  reason="Replaced by lsst.geom.Extent2I (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 68 of file __init__.py.

◆ Extent3D

lsst.afw.geom.Extent3D
Initial value:
1 = deprecate_pybind11(Extent3D,
2  reason="Replaced by lsst.geom.Extent3D (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 70 of file __init__.py.

◆ Extent3I

lsst.afw.geom.Extent3I
Initial value:
1 = deprecate_pybind11(Extent3I,
2  reason="Replaced by lsst.geom.Extent3I (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 72 of file __init__.py.

◆ ExtentBase2D

lsst.afw.geom.ExtentBase2D
Initial value:
1 = deprecate_pybind11(ExtentBase2D,
2  reason="Replaced by lsst.geom.ExtentBase2D (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 74 of file __init__.py.

◆ ExtentBase2I

lsst.afw.geom.ExtentBase2I
Initial value:
1 = deprecate_pybind11(ExtentBase2I,
2  reason="Replaced by lsst.geom.ExtentBase2I (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 76 of file __init__.py.

◆ ExtentBase3D

lsst.afw.geom.ExtentBase3D
Initial value:
1 = deprecate_pybind11(ExtentBase3D,
2  reason="Replaced by lsst.geom.ExtentBase3D (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 78 of file __init__.py.

◆ ExtentBase3I

lsst.afw.geom.ExtentBase3I = deprecate_pybind11(ExtentBase3I, reason="Replaced by lsst.geom.ExtentBase3I (will be removed before the release of v20.0)")

Definition at line 80 of file __init__.py.

◆ ExtentD

lsst.afw.geom.ExtentD
Initial value:
1 = deprecate_pybind11(ExtentD,
2  reason="Replaced by lsst.geom.ExtentD (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 81 of file __init__.py.

◆ ExtentI

lsst.afw.geom.ExtentI
Initial value:
1 = deprecate_pybind11(ExtentI,
2  reason="Replaced by lsst.geom.ExtentI (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 83 of file __init__.py.

◆ isAngle

lsst.afw.geom.isAngle
Initial value:
1 = deprecate_pybind11(isAngle,
2  reason="Replaced by lsst.geom.isAngle (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 116 of file __init__.py.

◆ LinearTransform

Initial value:
1 = deprecate_pybind11(LinearTransform,
2  reason="Replaced by lsst.geom.LinearTransform (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 85 of file __init__.py.

◆ makeAffineTransformFromTriple

lsst.afw.geom.makeAffineTransformFromTriple
Initial value:
1 = deprecate_pybind11(makeAffineTransformFromTriple,
2  reason="Replaced by lsst.geom.makeAffineTransformFromTriple (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 118 of file __init__.py.

◆ masToRad

lsst.afw.geom.masToRad
Initial value:
1 = deprecate_pybind11(masToRad,
2  reason="Replaced by lsst.geom.masToRad (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 120 of file __init__.py.

◆ Point

Initial value:
1 = deprecate_pybind11(Point,
2  reason="Replaced by lsst.geom.Point (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 87 of file __init__.py.

◆ Point2D

lsst.afw.geom.Point2D
Initial value:
1 = deprecate_pybind11(Point2D,
2  reason="Replaced by lsst.geom.Point2D (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 89 of file __init__.py.

◆ Point2I

lsst.afw.geom.Point2I
Initial value:
1 = deprecate_pybind11(Point2I,
2  reason="Replaced by lsst.geom.Point2I (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 91 of file __init__.py.

◆ Point3D

lsst.afw.geom.Point3D
Initial value:
1 = deprecate_pybind11(Point3D,
2  reason="Replaced by lsst.geom.Point3D (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 93 of file __init__.py.

◆ Point3I

lsst.afw.geom.Point3I
Initial value:
1 = deprecate_pybind11(Point3I,
2  reason="Replaced by lsst.geom.Point3I (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 95 of file __init__.py.

◆ PointBase2D

lsst.afw.geom.PointBase2D
Initial value:
1 = deprecate_pybind11(PointBase2D,
2  reason="Replaced by lsst.geom.PointBase2D (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 97 of file __init__.py.

◆ PointBase2I

lsst.afw.geom.PointBase2I
Initial value:
1 = deprecate_pybind11(PointBase2I,
2  reason="Replaced by lsst.geom.PointBase2I (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 99 of file __init__.py.

◆ PointBase3D

lsst.afw.geom.PointBase3D = deprecate_pybind11(PointBase3D, reason="Replaced by lsst.geom.PointBase3D (will be removed before the release of v20.0)")

Definition at line 101 of file __init__.py.

◆ PointBase3I

lsst.afw.geom.PointBase3I
Initial value:
1 = deprecate_pybind11(PointBase3I,
2  reason="Replaced by lsst.geom.PointBase3I (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 102 of file __init__.py.

◆ PointD

lsst.afw.geom.PointD
Initial value:
1 = deprecate_pybind11(PointD,
2  reason="Replaced by lsst.geom.PointD (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 104 of file __init__.py.

◆ PointI

lsst.afw.geom.PointI
Initial value:
1 = deprecate_pybind11(PointI,
2  reason="Replaced by lsst.geom.PointI (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 106 of file __init__.py.

◆ radToArcsec

lsst.afw.geom.radToArcsec
Initial value:
1 = deprecate_pybind11(radToArcsec,
2  reason="Replaced by lsst.geom.radToArcsec (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 122 of file __init__.py.

◆ radToDeg

lsst.afw.geom.radToDeg
Initial value:
1 = deprecate_pybind11(radToDeg,
2  reason="Replaced by lsst.geom.radToDeg (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 124 of file __init__.py.

◆ radToMas

lsst.afw.geom.radToMas
Initial value:
1 = deprecate_pybind11(radToMas,
2  reason="Replaced by lsst.geom.radToMas (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 126 of file __init__.py.

◆ SpherePoint

Initial value:
1 = deprecate_pybind11(SpherePoint,
2  reason="Replaced by lsst.geom.SpherePoint (will be removed before the release of v20.0)")
def deprecate_pybind11(func, reason, category=FutureWarning)
Definition: deprecated.py:26

Definition at line 108 of file __init__.py.