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 17, 2023
1 parent bd0558a commit 0f96b86
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 10 deletions.
15 changes: 8 additions & 7 deletions doc/versionHistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@
##################
Version History
##################
.. _lsst.ts.wep-7.0.1:

.. _lsst.ts.wep-8.0.0:

-------------
7.0.1
8.0.0
-------------

* Fix generateDonutDirectDetect when doDonutSelection is not run.
* Save all DonutStamps with images aligned with focal plane science sensors.
* This version will break compatibility in the closed loop with Phosim and ts_phosim going forward.


.. _lsst.ts.wep-8.0.0:
.. _lsst.ts.wep-7.0.1:

-------------
8.0.0
7.0.1
-------------

* Save all DonutStamps with images aligned with focal plane science sensors.
* This version will break compatibility in the closed loop with Phosim and ts_phosim going forward.
* Fix generateDonutDirectDetect when doDonutSelection is not run.

.. _lsst.ts.wep-7.0.0:

Expand Down
31 changes: 28 additions & 3 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,26 @@ def estimateZernikes(self, donutStampsExtra, donutStampsIntra):
blendOffsetsExtra = self.calcBlendOffsets(donutExtra, eulerZExtra)
blendOffsetsIntra = self.calcBlendOffsets(donutIntra, eulerZIntra)

# Transform image and coordinates from DVCS
# (Data Visualization Coordinate System)
# to ZCS (Zemax Coordinate System).
# Below we transform the image array and coordinates from the DVCS
# (Data Visualization 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 apply 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 0f96b86

Please sign in to comment.