Skip to content

Commit

Permalink
Save number of detector rotations
Browse files Browse the repository at this point in the history
  • Loading branch information
MorganSchmitz committed Jul 1, 2021
1 parent 1100690 commit 51e2bed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/lsst/pipe/tasks/processBrightStars.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ def warpStamps(self, stamps, pixCenters):
- ``xy0s``:
`list` [`geom.Point2I`] of coordinates of the bottom-left
pixels of each stamp, before rotation
- ``nb90Rots``: `int`, the number of 90 degrees rotations required
to compensate for detector orientation
"""
# warping control; only contains shiftingALg provided in config
warpCont = afwMath.WarpingControl(self.config.warpingKernelName)
Expand Down Expand Up @@ -425,7 +427,8 @@ def warpStamps(self, stamps, pixCenters):
destImage = afwMath.rotateImageBy90(destImage, nb90Rots)
warpedStars.append(destImage.clone())
warpTransforms.append(starWarper)
return pipeBase.Struct(warpedStars=warpedStars, warpTransforms=warpTransforms, xy0s=xy0s)
return pipeBase.Struct(warpedStars=warpedStars, warpTransforms=warpTransforms, xy0s=xy0s,
nb90Rots=nb90Rots)

@pipeBase.timeMethod
def run(self, inputExposure, refObjLoader=None, dataId=None, skyCorr=None):
Expand Down Expand Up @@ -490,6 +493,7 @@ def run(self, inputExposure, refObjLoader=None, dataId=None, skyCorr=None):
brightStarStamps = bSS.BrightStarStamps.initAndNormalize(brightStarList,
innerRadius=innerRadius,
outerRadius=outerRadius,
nb90Rots=warpOutputs.nb90Rots,
imCenter=self.modelCenter,
use_archive=True,
statsControl=statsControl,
Expand Down

0 comments on commit 51e2bed

Please sign in to comment.