LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Classes | Functions | Variables
lsst.afw.cameraGeom._amplifier Namespace Reference

Classes

class  AmplifierGeometryComparison
 
class  Amplifier
 

Functions

def transform (self, *outOffset=None, outFlipX=False, outFlipY=False)
 

Variables

dictionary ReadoutCornerValNameDict
 
dictionary ReadoutCornerNameValDict
 

Function Documentation

◆ transform()

def lsst.afw.cameraGeom._amplifier.transform (   self,
outOffset = None,
  outFlipX = False,
  outFlipY = False 
)
Transform an amplifier builder (in-place) by applying shifts and
flips.

Parameters
----------
outOffset : `lsst.geom.Extent2I`, optional
    Post-transformation return value for ``self.getRawXYOffset()``.
    The default is ``(0, 0)``, which shifts the amplifier to its
    position in the assembled (but still untrimmed) raw image.
outFlipX : `bool`, optional
    Post-transformation return value for ``self.getRawFlipX()``.  The
    default is `False`, which flips the amplifier to its correct
    X orientation in the assembled raw image.
outFlipX : `bool`, optional
    Post-transformation return value for ``self.getRawFlipY()``.  The
    default is `False`, which flips the amplifier to its correct
    Y orientation in the assembled raw image.

Returns
-------
self : `AmplifierBuilder`
    Returned to enable method chaining, e.g.
    ``amplifier.rebuild().transform().finish()``.

Definition at line 132 of file _amplifier.py.

132 def transform(self, *, outOffset=None, outFlipX=False, outFlipY=False):
133  """Transform an amplifier builder (in-place) by applying shifts and
134  flips.
135 
136  Parameters
137  ----------
138  outOffset : `lsst.geom.Extent2I`, optional
139  Post-transformation return value for ``self.getRawXYOffset()``.
140  The default is ``(0, 0)``, which shifts the amplifier to its
141  position in the assembled (but still untrimmed) raw image.
142  outFlipX : `bool`, optional
143  Post-transformation return value for ``self.getRawFlipX()``. The
144  default is `False`, which flips the amplifier to its correct
145  X orientation in the assembled raw image.
146  outFlipX : `bool`, optional
147  Post-transformation return value for ``self.getRawFlipY()``. The
148  default is `False`, which flips the amplifier to its correct
149  Y orientation in the assembled raw image.
150 
151  Returns
152  -------
153  self : `AmplifierBuilder`
154  Returned to enable method chaining, e.g.
155  ``amplifier.rebuild().transform().finish()``.
156  """
157  if outOffset is None:
158  outOffset = Extent2I(0, 0)
159  bbox = self.getRawBBox()
160  awidth, aheight = bbox.getDimensions()
161  #
162  # Figure out how far flipping the amp LR and/or TB offsets the bboxes
163  #
164  boxMin0 = bbox.getMin() # initial position of rawBBox's LLC corner
165  if self.getRawFlipX() != outFlipX:
166  bbox.flipLR(awidth)
167  if self.getRawFlipY() != outFlipY:
168  bbox.flipTB(aheight)
169  shift = boxMin0 - bbox.getMin()
170 
171  for bboxName in ("",
172  "HorizontalOverscan",
173  "Data",
174  "VerticalOverscan",
175  "Prescan"):
176  bbox = getattr(self, f"getRaw{bboxName}BBox")()
177  if self.getRawFlipX() != outFlipX:
178  bbox.flipLR(awidth)
179  if self.getRawFlipY() != outFlipY:
180  bbox.flipTB(aheight)
181  bbox.shift(self.getRawXYOffset() + shift - outOffset)
182 
183  getattr(self, f"setRaw{bboxName}BBox")(bbox)
184  #
185  # All of these have now been transferred to the amp geometry
186  #
187  self.setRawXYOffset(outOffset)
188  self.setRawFlipX(outFlipX)
189  self.setRawFlipY(outFlipY)
190  return self
def transform(self, *outOffset=None, outFlipX=False, outFlipY=False)
Definition: _amplifier.py:132
Extent< int, 2 > Extent2I
Definition: Extent.h:397

Variable Documentation

◆ ReadoutCornerNameValDict

dictionary lsst.afw.cameraGeom._amplifier.ReadoutCornerNameValDict
Initial value:
1 = {val: key for key, val in
2  ReadoutCornerValNameDict.items()}

Definition at line 37 of file _amplifier.py.

◆ ReadoutCornerValNameDict

dictionary lsst.afw.cameraGeom._amplifier.ReadoutCornerValNameDict
Initial value:
1 = {
2  ReadoutCorner.LL: "LL",
3  ReadoutCorner.LR: "LR",
4  ReadoutCorner.UR: "UR",
5  ReadoutCorner.UL: "UL",
6 }

Definition at line 31 of file _amplifier.py.