Polygon¶
- class lsst.afw.geom.Polygon¶
Bases:
Storable
Methods Summary
calculateArea
(self)calculateCenter
(self)calculatePerimeter
(self)contains
(*args, **kwargs)Overloaded function.
convexHull
(self)createImage
(*args, **kwargs)Overloaded function.
display
([xy0, frame, ctype])Display polygon on existing frame
getBBox
(self)getEdges
(self)getNumEdges
(self)getVertices
(self)intersection
(*args, **kwargs)Overloaded function.
intersectionSingle
(*args, **kwargs)Overloaded function.
isPersistable
(self)overlaps
(*args, **kwargs)Overloaded function.
plot
([axes])Plot polygon with matplotlib
readFits
(*args, **kwargs)Overloaded function.
subSample
(*args, **kwargs)Overloaded function.
symDifference
(*args, **kwargs)Overloaded function.
transform
(*args, **kwargs)Overloaded function.
union
(*args, **kwargs)Overloaded function.
unionSingle
(*args, **kwargs)Overloaded function.
writeFits
(*args, **kwargs)Overloaded function.
Methods Documentation
- calculateArea(self: lsst.afw.geom.Polygon) float ¶
- calculateCenter(self: lsst.afw.geom.Polygon) lsst.geom.Point2D ¶
- calculatePerimeter(self: lsst.afw.geom.Polygon) float ¶
- contains(*args, **kwargs)¶
Overloaded function.
contains(self: lsst.afw.geom.Polygon, arg0: lsst.geom.Point2D) -> bool
contains(self: lsst.afw.geom.Polygon, arg0: list[lsst.geom.Point2D]) -> list[bool]
contains(self: lsst.afw.geom.Polygon, arg0: list[lsst.geom.Point2I]) -> list[bool]
contains(self: lsst.afw.geom.Polygon, arg0: numpy.ndarray[numpy.float64], arg1: numpy.ndarray[numpy.float64]) -> object
contains(self: lsst.afw.geom.Polygon, arg0: numpy.ndarray[numpy.float32], arg1: numpy.ndarray[numpy.float32]) -> object
contains(self: lsst.afw.geom.Polygon, arg0: numpy.ndarray[numpy.int32], arg1: numpy.ndarray[numpy.int32]) -> object
- convexHull(self: lsst.afw.geom.Polygon) lsst.afw.geom.Polygon ¶
- createImage(*args, **kwargs)¶
Overloaded function.
createImage(self: lsst.afw.geom.Polygon, arg0: lsst.geom.Box2I) -> lsst::afw::image::Image<float>
createImage(self: lsst.afw.geom.Polygon, arg0: lsst.geom.Extent2I) -> lsst::afw::image::Image<float>
- display(xy0=None, frame=1, ctype=None)¶
Display polygon on existing frame
- getBBox(self: lsst.afw.geom.Polygon) lsst.geom.Box2D ¶
- getEdges(self: lsst.afw.geom.Polygon) list[tuple[lsst.geom.Point2D, lsst.geom.Point2D]] ¶
- getNumEdges(self: lsst.afw.geom.Polygon) int ¶
- getVertices(self: lsst.afw.geom.Polygon) list[lsst.geom.Point2D] ¶
- intersection(*args, **kwargs)¶
Overloaded function.
intersection(self: lsst.afw.geom.Polygon, arg0: lsst.afw.geom.Polygon) -> list[lsst.afw.geom.Polygon]
intersection(self: lsst.afw.geom.Polygon, arg0: lsst.geom.Box2D) -> list[lsst.afw.geom.Polygon]
- intersectionSingle(*args, **kwargs)¶
Overloaded function.
intersectionSingle(self: lsst.afw.geom.Polygon, arg0: lsst.afw.geom.Polygon) -> lsst.afw.geom.Polygon
intersectionSingle(self: lsst.afw.geom.Polygon, arg0: lsst.geom.Box2D) -> lsst.afw.geom.Polygon
- isPersistable(self: lsst.afw.geom.Polygon) bool ¶
- overlaps(*args, **kwargs)¶
Overloaded function.
overlaps(self: lsst.afw.geom.Polygon, arg0: lsst.afw.geom.Polygon) -> bool
overlaps(self: lsst.afw.geom.Polygon, arg0: lsst.geom.Box2D) -> bool
- plot(axes=None, **kwargs)¶
Plot polygon with matplotlib
- Parameters:
- axes
matplotlib.axes.Axes
Matplotlib axes to use, or None
- kwargsany
Additional arguments to
matplotlib.axes.Axes.plot
ormatplotlib.axes.Axes.scatter
.
- axes
- Returns:
- axes
matplotlib.axes.Axes
The axes used to make the plot (same as
axes
, if provided).
- axes
- static readFits(*args, **kwargs)¶
Overloaded function.
readFits(fileName: str, hdu: int = -2147483648) -> lsst.afw.geom.Polygon
readFits(manager: lsst.afw.fits._fits.MemFileManager, hdu: int = -2147483648) -> lsst.afw.geom.Polygon
- subSample(*args, **kwargs)¶
Overloaded function.
subSample(self: lsst.afw.geom.Polygon, arg0: int) -> lsst.afw.geom.Polygon
subSample(self: lsst.afw.geom.Polygon, arg0: float) -> lsst.afw.geom.Polygon
- symDifference(*args, **kwargs)¶
Overloaded function.
symDifference(self: lsst.afw.geom.Polygon, arg0: lsst.afw.geom.Polygon) -> list[lsst.afw.geom.Polygon]
symDifference(self: lsst.afw.geom.Polygon, arg0: lsst.geom.Box2D) -> list[lsst.afw.geom.Polygon]
- transform(*args, **kwargs)¶
Overloaded function.
transform(self: lsst.afw.geom.Polygon, arg0: lsst.afw.geom.TransformPoint2ToPoint2) -> lsst.afw.geom.Polygon
transform(self: lsst.afw.geom.Polygon, arg0: lsst.geom.AffineTransform) -> lsst.afw.geom.Polygon
- union(*args, **kwargs)¶
Overloaded function.
union(self: lsst.afw.geom.Polygon, arg0: lsst.afw.geom.Polygon) -> list[lsst.afw.geom.Polygon]
union(self: lsst.afw.geom.Polygon, arg0: lsst.geom.Box2D) -> list[lsst.afw.geom.Polygon]
- unionSingle(*args, **kwargs)¶
Overloaded function.
unionSingle(self: lsst.afw.geom.Polygon, arg0: lsst.afw.geom.Polygon) -> lsst.afw.geom.Polygon
unionSingle(self: lsst.afw.geom.Polygon, arg0: lsst.geom.Box2D) -> lsst.afw.geom.Polygon
- writeFits(*args, **kwargs)¶
Overloaded function.
writeFits(self: lsst.afw.geom.Polygon, fileName: str, mode: str = ‘w’) -> None
writeFits(self: lsst.afw.geom.Polygon, manager: lsst.afw.fits._fits.MemFileManager, mode: str = ‘w’) -> None