LSST Applications g00274db5b6+edbf708997,g00d0e8bbd7+edbf708997,g199a45376c+5137f08352,g1fd858c14a+1d4b6db739,g262e1987ae+f4d9505c4f,g29ae962dfc+7156fb1a53,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3e17d7035e+5b3adc59f5,g3fd5ace14f+852fa6fbcb,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+9f17e571f4,g67b6fd64d1+6dc8069a4c,g74acd417e5+ae494d68d9,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+536efcc10a,g7cc15d900a+d121454f8d,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d7436a09f+28c28d8d6d,g8ea07a8fe4+db21c37724,g92c671f44c+9f17e571f4,g98df359435+b2e6376b13,g99af87f6a8+b0f4ad7b8d,gac66b60396+966efe6077,gb88ae4c679+7dec8f19df,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gc24b5d6ed1+9f17e571f4,gca7fc764a6+6dc8069a4c,gcc769fe2a4+97d0256649,gd7ef33dd92+6dc8069a4c,gdab6d2f7ff+ae494d68d9,gdbb4c4dda9+9f17e571f4,ge410e46f29+6dc8069a4c,geaed405ab2+e194be0d2b,w.2025.47
LSST Data Management Base Package
Loading...
Searching...
No Matches
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, doUpdatePolygon=True)
 

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 62 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,
doUpdatePolygon = True )
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.
doUpdatePolygon : `bool`, optional
    If true, the valid polygon will be updated.

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

Definition at line 69 of file vignette.py.

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

Member Data Documentation

◆ _DefaultName

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

Definition at line 67 of file vignette.py.

◆ ConfigClass

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

Definition at line 66 of file vignette.py.


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