lsst.afw.geom

Using lsst.afw.geom

Contributing

lsst.afw.geom is developed at https://github.com/lsst/afw. You can find Jira issues for this module under the afw component.

Python API reference

lsst.afw.geom Package

Functions

calculateSipWcsHeader(wcs, order, bbox, spacing)

Generate a SIP WCS header approximating a given SkyWcs

computePixelToDistortedPixel(...)

Compute the transform pixelToDistortedPixel, which applies optical distortion specified by focalPlaneToFieldAngle.

createTrivialWcsMetadata(wcsName, xy0)

deleteBasicWcsMetadata(metadata, wcsName)

getCdMatrixFromMetadata(metadata)

getImageXY0FromMetadata(metadata, wcsName[, ...])

getIntermediateWorldCoordsToSky(wcs[, simplify])

getPixelToIntermediateWorldCoords(wcs[, ...])

getSipMatrixFromMetadata(metadata, name)

Extract a SIP matrix from FITS TAN-SIP WCS metadata.

hasSipMatrix(metadata, name)

linearizeTransform(original, point)

makeCdMatrix(scale[, orientation, flipX])

makeFlippedWcs(wcs, flipLR, flipTB, center)

makeHpxWcs(hips_order, pixel[, shift_order])

Make a SkyWcs object with HEALPix grid projection (HPX).

makeIdentityTransform()

makeModifiedWcs(pixelTransform, wcs, ...)

makeRadialTransform(*args, **kwargs)

Overloaded function.

makeSimpleWcsMetadata(crpix, crval, cdMatrix)

makeSipMatrixMetadata(matrix, name)

makeSkyWcs(*args, **kwargs)

Overloaded function.

makeTanSipMetadata(*args, **kwargs)

Overloaded function.

makeTanSipWcs(*args, **kwargs)

Overloaded function.

makeTransform(affine)

makeWcsPairTransform(src, dst)

transformFromString(data)

Read a Transform from a string that was saved using Transform.writeString

wcsAlmostEqualOverBBox(wcs0, wcs1, bbox[, ...])

Test if two WCS are almost equal over a grid of pixel positions.

Classes

AffineTransformConfig(*args, **kw)

A Config representing an affine Transform.

Ellipse

GenericEndpoint

IdentityTransformConfig(*args, **kw)

A Config representing a Transform that does nothing.

MultiTransformConfig(*args, **kw)

A Config representing a chain of consecutive Transforms.

OneTransformConfig(*args, **kw)

A Config representing a single Transform in a compound Transform.

Point2Endpoint

Polygon

Quadrupole

RadialTransformConfig(*args, **kw)

A Config representing a radially symmetric Transform.

SipApproximation

SkyWcs

Span

SpanIterator

SpanSet

SpherePointEndpoint

Stencil

Members:

TransformConfig(*args, **kw)

Config that identifies Transforms by keyword.

TransformGenericToGeneric

TransformGenericToPoint2

TransformGenericToSpherePoint

TransformPoint2ToGeneric

TransformPoint2ToPoint2

TransformPoint2ToSpherePoint

TransformSpherePointToGeneric

TransformSpherePointToPoint2

TransformSpherePointToSpherePoint

Class Inheritance Diagram

digraph inheritanceb5cc23fb53 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "AffineTransformConfig" [URL="../../../py-api/lsst.afw.geom.AffineTransformConfig.html#lsst.afw.geom.AffineTransformConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A Config representing an affine ``Transform``."]; "Config" -> "AffineTransformConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "BaseCore" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "pybind11_object" -> "BaseCore" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Config" [URL="../../../py-api/lsst.pex.config.Config.html#lsst.pex.config.Config",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class for configuration (*config*) objects."]; "Ellipse" [URL="../../../py-api/lsst.afw.geom.Ellipse.html#lsst.afw.geom.Ellipse",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pybind11_object" -> "Ellipse" [arrowsize=0.5,style="setlinewidth(0.5)"]; "GenericEndpoint" [URL="../../../py-api/lsst.afw.geom.GenericEndpoint.html#lsst.afw.geom.GenericEndpoint",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "_BaseEndpointGeneric" -> "GenericEndpoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "IdentityTransformConfig" [URL="../../../py-api/lsst.afw.geom.IdentityTransformConfig.html#lsst.afw.geom.IdentityTransformConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A Config representing a ``Transform`` that does nothing."]; "Config" -> "IdentityTransformConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MultiTransformConfig" [URL="../../../py-api/lsst.afw.geom.MultiTransformConfig.html#lsst.afw.geom.MultiTransformConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A Config representing a chain of consecutive ``Transforms``."]; "Config" -> "MultiTransformConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "OneTransformConfig" [URL="../../../py-api/lsst.afw.geom.OneTransformConfig.html#lsst.afw.geom.OneTransformConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A Config representing a single ``Transform`` in a compound ``Transform``."]; "Config" -> "OneTransformConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Persistable" [URL="../../../py-api/lsst.afw.table.io.Persistable.html#lsst.afw.table.io.Persistable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pybind11_object" -> "Persistable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Point2Endpoint" [URL="../../../py-api/lsst.afw.geom.Point2Endpoint.html#lsst.afw.geom.Point2Endpoint",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "_BaseVectorEndpointPoint2" -> "Point2Endpoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Polygon" [URL="../../../py-api/lsst.afw.geom.Polygon.html#lsst.afw.geom.Polygon",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Storable" -> "Polygon" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Quadrupole" [URL="../../../py-api/lsst.afw.geom.Quadrupole.html#lsst.afw.geom.Quadrupole",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "BaseCore" -> "Quadrupole" [arrowsize=0.5,style="setlinewidth(0.5)"]; "RadialTransformConfig" [URL="../../../py-api/lsst.afw.geom.RadialTransformConfig.html#lsst.afw.geom.RadialTransformConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A Config representing a radially symmetric ``Transform``."]; "Config" -> "RadialTransformConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SipApproximation" [URL="../../../py-api/lsst.afw.geom.SipApproximation.html#lsst.afw.geom.SipApproximation",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pybind11_object" -> "SipApproximation" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SkyWcs" [URL="../../../py-api/lsst.afw.geom.SkyWcs.html#lsst.afw.geom.SkyWcs",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Storable" -> "SkyWcs" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Span" [URL="../../../py-api/lsst.afw.geom.Span.html#lsst.afw.geom.Span",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pybind11_object" -> "Span" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SpanIterator" [URL="../../../py-api/lsst.afw.geom.SpanIterator.html#lsst.afw.geom.SpanIterator",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pybind11_object" -> "SpanIterator" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SpanSet" [URL="../../../py-api/lsst.afw.geom.SpanSet.html#lsst.afw.geom.SpanSet",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "pybind11_object" -> "SpanSet" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SpherePointEndpoint" [URL="../../../py-api/lsst.afw.geom.SpherePointEndpoint.html#lsst.afw.geom.SpherePointEndpoint",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "_BaseVectorEndpointSpherePoint" -> "SpherePointEndpoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Stencil" [URL="../../../py-api/lsst.afw.geom.Stencil.html#lsst.afw.geom.Stencil",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Members:"]; "pybind11_object" -> "Stencil" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Storable" [URL="../../../py-api/lsst.afw.typehandling.Storable.html#lsst.afw.typehandling.Storable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Persistable" -> "Storable" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TransformConfig" [URL="../../../py-api/lsst.afw.geom.TransformConfig.html#lsst.afw.geom.TransformConfig",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Config that identifies ``Transforms`` by keyword."]; "Config" -> "TransformConfig" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TransformGenericToGeneric" [URL="../../../py-api/lsst.afw.geom.TransformGenericToGeneric.html#lsst.afw.geom.TransformGenericToGeneric",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Persistable" -> "TransformGenericToGeneric" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TransformGenericToPoint2" [URL="../../../py-api/lsst.afw.geom.TransformGenericToPoint2.html#lsst.afw.geom.TransformGenericToPoint2",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Persistable" -> "TransformGenericToPoint2" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TransformGenericToSpherePoint" [URL="../../../py-api/lsst.afw.geom.TransformGenericToSpherePoint.html#lsst.afw.geom.TransformGenericToSpherePoint",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Persistable" -> "TransformGenericToSpherePoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TransformPoint2ToGeneric" [URL="../../../py-api/lsst.afw.geom.TransformPoint2ToGeneric.html#lsst.afw.geom.TransformPoint2ToGeneric",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Persistable" -> "TransformPoint2ToGeneric" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TransformPoint2ToPoint2" [URL="../../../py-api/lsst.afw.geom.TransformPoint2ToPoint2.html#lsst.afw.geom.TransformPoint2ToPoint2",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Persistable" -> "TransformPoint2ToPoint2" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TransformPoint2ToSpherePoint" [URL="../../../py-api/lsst.afw.geom.TransformPoint2ToSpherePoint.html#lsst.afw.geom.TransformPoint2ToSpherePoint",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Persistable" -> "TransformPoint2ToSpherePoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TransformSpherePointToGeneric" [URL="../../../py-api/lsst.afw.geom.TransformSpherePointToGeneric.html#lsst.afw.geom.TransformSpherePointToGeneric",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Persistable" -> "TransformSpherePointToGeneric" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TransformSpherePointToPoint2" [URL="../../../py-api/lsst.afw.geom.TransformSpherePointToPoint2.html#lsst.afw.geom.TransformSpherePointToPoint2",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Persistable" -> "TransformSpherePointToPoint2" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TransformSpherePointToSpherePoint" [URL="../../../py-api/lsst.afw.geom.TransformSpherePointToSpherePoint.html#lsst.afw.geom.TransformSpherePointToSpherePoint",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "Persistable" -> "TransformSpherePointToSpherePoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "_BaseEndpointGeneric" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "pybind11_object" -> "_BaseEndpointGeneric" [arrowsize=0.5,style="setlinewidth(0.5)"]; "_BaseEndpointPoint2" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "pybind11_object" -> "_BaseEndpointPoint2" [arrowsize=0.5,style="setlinewidth(0.5)"]; "_BaseEndpointSpherePoint" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "pybind11_object" -> "_BaseEndpointSpherePoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "_BaseVectorEndpointPoint2" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "_BaseEndpointPoint2" -> "_BaseVectorEndpointPoint2" [arrowsize=0.5,style="setlinewidth(0.5)"]; "_BaseVectorEndpointSpherePoint" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; "_BaseEndpointSpherePoint" -> "_BaseVectorEndpointSpherePoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "pybind11_object" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; }

lsst.afw.geom.testUtils Module

Functions

makeSipIwcToPixel(metadata)

Make an IWC to pixel transform with SIP distortion from FITS-WCS metadata

makeSipPixelToIwc(metadata)

Make a pixel to IWC transform with SIP distortion from FITS-WCS metadata

Classes

BoxGrid(box, numColRow)

Divide a box into nx by ny sub-boxes that tile the region

Class Inheritance Diagram

digraph inheritanced892ef40a6 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "BoxGrid" [URL="../../../py-api/lsst.afw.geom.testUtils.BoxGrid.html#lsst.afw.geom.testUtils.BoxGrid",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Divide a box into nx by ny sub-boxes that tile the region"]; }