LSST Applications  21.0.0-147-g0e635eb1+1acddb5be5,22.0.0+052faf71bd,22.0.0+1ea9a8b2b2,22.0.0+6312710a6c,22.0.0+729191ecac,22.0.0+7589c3a021,22.0.0+9f079a9461,22.0.1-1-g7d6de66+b8044ec9de,22.0.1-1-g87000a6+536b1ee016,22.0.1-1-g8e32f31+6312710a6c,22.0.1-10-gd060f87+016f7cdc03,22.0.1-12-g9c3108e+df145f6f68,22.0.1-16-g314fa6d+c825727ab8,22.0.1-19-g93a5c75+d23f2fb6d8,22.0.1-19-gb93eaa13+aab3ef7709,22.0.1-2-g8ef0a89+b8044ec9de,22.0.1-2-g92698f7+9f079a9461,22.0.1-2-ga9b0f51+052faf71bd,22.0.1-2-gac51dbf+052faf71bd,22.0.1-2-gb66926d+6312710a6c,22.0.1-2-gcb770ba+09e3807989,22.0.1-20-g32debb5+b8044ec9de,22.0.1-23-gc2439a9a+fb0756638e,22.0.1-3-g496fd5d+09117f784f,22.0.1-3-g59f966b+1e6ba2c031,22.0.1-3-g849a1b8+f8b568069f,22.0.1-3-gaaec9c0+c5c846a8b1,22.0.1-32-g5ddfab5d3+60ce4897b0,22.0.1-4-g037fbe1+64e601228d,22.0.1-4-g8623105+b8044ec9de,22.0.1-5-g096abc9+d18c45d440,22.0.1-5-g15c806e+57f5c03693,22.0.1-7-gba73697+57f5c03693,master-g6e05de7fdc+c1283a92b8,master-g72cdda8301+729191ecac,w.2021.39
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.