Skip to content

Commit

Permalink
Update calcZernikes with depreacation of config and more documentatio…
Browse files Browse the repository at this point in the history
…n on coord. transform.
  • Loading branch information
jbkalmbach committed Oct 12, 2023
1 parent 7d67487 commit 59c316a
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions python/lsst/ts/wep/task/calcZernikesTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ class CalcZernikesTaskConfig(
instPixelSize = pexConfig.Field(
doc="Instrument Pixel Size in m", dtype=float, default=10.0e-6
)
transposeImages = pexConfig.Field(
doc="Specify whether to transpose the intra- and extra-focal images. \
(The default is to do the transpose).",
dtype=bool,
default=True,
optional=True,
deprecated="This field is no longer used. Will be removed after the end of October 2023."
)


class CalcZernikesTask(pipeBase.PipelineTask):
Expand Down Expand Up @@ -227,9 +235,25 @@ def estimateZernikes(self, donutStampsExtra, donutStampsIntra):
blendOffsetsExtra = self.calcBlendOffsets(donutExtra, eulerZExtra)
blendOffsetsIntra = self.calcBlendOffsets(donutIntra, eulerZIntra)

# Transform image and coordinates from DVCS
# Below we transform the image array and coordinates from the DVCS
# (Data Visualization Coordinate System)
# to ZCS (Zemax Coordinate System).
# to the ZCS (Zemax Coordinate System). More information about these
# coordinate systems is available here: sitcomtn-003.lsst.io.
# This transformation below incorporates two different coordinate
# conversions: 1) DVCS to CCS is a transpose and 2) CCS to ZCS is
# an x -> -x conversion that we can incorporate as a left-right flip.
# In a future update to ts_ofc we will update the sensitivity matrix
# to use the CCS and we can then remove the left-right flip. That is
# why the current version keeps this as a two-part transformation.
#
# DVCS CCS ZCS
# x y y
# ^ ^ ^
# | | |
# | | |
# | | |
# |----------> y |----------> x x <----------|

wfEsti.setImg(
np.array([-fieldXYExtra[1], fieldXYExtra[0]]),
DefocalType.Extra,
Expand Down

0 comments on commit 59c316a

Please sign in to comment.