LSST Applications g0265f82a02+d6b5cd48b5,g02d81e74bb+a41d3748ce,g1470d8bcf6+6be6c9203b,g2079a07aa2+14824f138e,g212a7c68fe+a4f2ea4efa,g2305ad1205+72971fe858,g295015adf3+ab2c85acae,g2bbee38e9b+d6b5cd48b5,g337abbeb29+d6b5cd48b5,g3ddfee87b4+31b3a28dff,g487adcacf7+082e807817,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+b2918d57ae,g5a732f18d5+66d966b544,g64a986408d+a41d3748ce,g858d7b2824+a41d3748ce,g8a8a8dda67+a6fc98d2e7,g99cad8db69+7fe4acdf18,g9ddcbc5298+d4bad12328,ga1e77700b3+246acaaf9c,ga8c6da7877+84af8b3ff8,gb0e22166c9+3863383f4c,gb6a65358fc+d6b5cd48b5,gba4ed39666+9664299f35,gbb8dafda3b+d8d527deb2,gc07e1c2157+b2dbe6b631,gc120e1dc64+61440b2abb,gc28159a63d+d6b5cd48b5,gcf0d15dbbd+31b3a28dff,gdaeeff99f8+a38ce5ea23,ge6526c86ff+39927bb362,ge79ae78c31+d6b5cd48b5,gee10cc3b42+a6fc98d2e7,gf1cff7945b+a41d3748ce,v24.1.5.rc1
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: