LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Static Protected Attributes | List of all members
lsst.ip.isr.vignette.VignetteTask Class Reference
Inheritance diagram for lsst.ip.isr.vignette.VignetteTask:

Public Member Functions

 run (self, exposure=None, doUpdateMask=True, maskPlane="NO_DATA", vignetteValue=None, log=None)
 

Static Public Attributes

 ConfigClass = VignetteConfig
 

Static Protected Attributes

str _DefaultName = "isrVignette"
 

Detailed Description

Define a simple circular vignette pattern and optionally update mask
plane.

Definition at line 69 of file vignette.py.

Member Function Documentation

◆ run()

lsst.ip.isr.vignette.VignetteTask.run ( self,
exposure = None,
doUpdateMask = True,
maskPlane = "NO_DATA",
vignetteValue = None,
log = None )
Generate circular vignette pattern.

Parameters
----------
exposure : `lsst.afw.image.Exposure`, optional
    Exposure to construct, apply, and optionally mask vignette for.
doUpdateMask : `bool`, optional
    If true, the mask will be updated to mask the vignetted region.
maskPlane : `str`, optional
    Mask plane to assign vignetted pixels to.
vignetteValue : `float` or `None`, optional
    Value to assign to the image array pixels within the ``polygon``
    region.  If `None`, image pixel values are not replaced.
log : `logging.Logger`, optional
    Log object to write to.

Returns
-------
polygon : `lsst.afw.geom.Polygon`
    Polygon defining the boundary of the vignetted region.

Definition at line 76 of file vignette.py.

76 def run(self, exposure=None, doUpdateMask=True, maskPlane="NO_DATA", vignetteValue=None, log=None):
77 """Generate circular vignette pattern.
78
79 Parameters
80 ----------
81 exposure : `lsst.afw.image.Exposure`, optional
82 Exposure to construct, apply, and optionally mask vignette for.
83 doUpdateMask : `bool`, optional
84 If true, the mask will be updated to mask the vignetted region.
85 maskPlane : `str`, optional
86 Mask plane to assign vignetted pixels to.
87 vignetteValue : `float` or `None`, optional
88 Value to assign to the image array pixels within the ``polygon``
89 region. If `None`, image pixel values are not replaced.
90 log : `logging.Logger`, optional
91 Log object to write to.
92
93 Returns
94 -------
95 polygon : `lsst.afw.geom.Polygon`
96 Polygon defining the boundary of the vignetted region.
97 """
98 theta = np.linspace(0, 2*np.pi, num=self.config.numPolygonPoints, endpoint=False)
99 x = self.config.radius*np.cos(theta) + self.config.xCenter
100 y = self.config.radius*np.sin(theta) + self.config.yCenter
101 points = np.array([x, y]).transpose()
102 fpPolygon = afwGeom.Polygon([geom.Point2D(x1, y1) for x1, y1 in reversed(points)])
103 if exposure is None:
104 return fpPolygon
105
106 # Exposure was provided, so attach the validPolygon associated with the
107 # vignetted region.
108 setValidPolygonCcdIntersect(exposure, fpPolygon, log=log)
109
110 if doUpdateMask:
111 polygon = exposure.getInfo().getValidPolygon()
112 maskVignettedRegion(exposure, polygon, maskPlane="NO_DATA", vignetteValue=vignetteValue, log=log)
113 return fpPolygon
114
115
Cartesian polygons.
Definition Polygon.h:59

Member Data Documentation

◆ _DefaultName

str lsst.ip.isr.vignette.VignetteTask._DefaultName = "isrVignette"
staticprotected

Definition at line 74 of file vignette.py.

◆ ConfigClass

lsst.ip.isr.vignette.VignetteTask.ConfigClass = VignetteConfig
static

Definition at line 73 of file vignette.py.


The documentation for this class was generated from the following file: