Skip to content

Commit

Permalink
Remove ZCS conversions now that ts_ofc works exclusively in CCS.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbkalmbach authored and Bryce Kalmbach committed Dec 11, 2023
1 parent 9bb8e00 commit c476b82
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 51 deletions.
8 changes: 8 additions & 0 deletions doc/versionHistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
Version History
##################

.. _lsst.ts.wep-8.1.0:

-------------
8.1.0
-------------

* Remove Zemax Coordinate System (ZCS) conversions now that ts_ofc works exclusively in Camera Coordinate System (CCS).

.. _lsst.ts.wep-8.0.4:

-------------
Expand Down
33 changes: 14 additions & 19 deletions python/lsst/ts/wep/task/calcZernikesTask.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,36 +237,31 @@ def estimateZernikes(self, donutStampsExtra, donutStampsIntra):

# 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
# CCS (Camera 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.
# This transformation below incorporates the DVCS to CCS
# conversion as a transpose.
#
# DVCS CCS ZCS
# x y y
# ^ ^ ^
# | | |
# | | |
# | | |
# |----------> y |----------> x x <----------|
# DVCS CCS
# x y
# ^ ^
# | |
# | |
# | |
# |----------> y |----------> x

wfEsti.setImg(
np.array([-fieldXYExtra[1], fieldXYExtra[0]]),
np.array([fieldXYExtra[1], fieldXYExtra[0]]),
DefocalType.Extra,
filterLabel=getFilterTypeFromBandLabel(donutExtra.bandpass),
image=np.fliplr(donutExtra.stamp_im.image.array.T),
image=donutExtra.stamp_im.image.array.T,
blendOffsets=blendOffsetsExtra.tolist(),
)
wfEsti.setImg(
np.array([-fieldXYIntra[1], fieldXYIntra[0]]),
np.array([fieldXYIntra[1], fieldXYIntra[0]]),
DefocalType.Intra,
filterLabel=getFilterTypeFromBandLabel(donutIntra.bandpass),
image=np.fliplr(donutIntra.stamp_im.image.array.T),
image=donutIntra.stamp_im.image.array.T,
blendOffsets=blendOffsetsIntra.tolist(),
)
wfEsti.reset()
Expand Down
32 changes: 16 additions & 16 deletions tests/task/test_calcZernikesTaskCwfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,22 @@ def testEstimateCornerZernikes(self):
trueZernCoeffR04 = np.array(
[
-0.35353452,
-0.07365128,
0.07365128,
0.62222451,
-0.06206281,
-0.09065757,
0.09065757,
0.21722746,
-0.20491936,
0.20491936,
0.00849322,
-0.01150489,
0.02599147,
-0.02599147,
-0.00150702,
-0.14100845,
0.02294787,
0.14100845,
-0.02294787,
0.02284791,
0.02116483,
-0.02116483,
-0.02537743,
0.01866772,
-0.01866772,
0.01653037,
-0.00552862,
]
Expand All @@ -199,23 +199,23 @@ def testEstimateCornerZernikes(self):
trueZernCoeffR40 = np.array(
[
-3.83610201e-01,
-2.06528254e-01,
2.06528254e-01,
5.42893431e-01,
7.74255848e-02,
3.40529812e-02,
-3.40529812e-02,
5.45565149e-02,
8.65849308e-02,
-8.65849308e-02,
1.75029212e-02,
-1.40149246e-04,
4.11223127e-02,
-4.11223127e-02,
-2.42644902e-03,
-1.52392233e-01,
-1.24547354e-02,
-2.33075716e-02,
1.24547354e-02,
2.33075716e-02,
7.35477674e-04,
1.93518814e-02,
-1.93518814e-02,
-3.65768735e-03,
4.12718699e-02,
-4.12718699e-02,
-6.93386734e-03,
]
)
Expand Down
32 changes: 16 additions & 16 deletions tests/task/test_calcZernikesTaskLatiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,43 +140,43 @@ def testEstimateZernikes(self):
[
[
8.51874706e-03,
1.14889498e-01,
-1.14889498e-01,
-4.59798303e-02,
1.17980813e-02,
5.47971263e-03,
-5.47971263e-03,
-3.37311212e-02,
-1.68802493e-02,
1.68802493e-02,
-3.78572402e-02,
1.05657862e-02,
1.10063567e-04,
-1.10063567e-04,
-8.53572243e-03,
-1.01936034e-02,
1.75246804e-03,
1.01936034e-02,
-1.75246804e-03,
-1.78255049e-03,
-8.62521565e-04,
8.62521565e-04,
-5.23579524e-04,
4.45220226e-03,
-4.45220226e-03,
2.38692144e-03,
9.67399215e-03,
],
[
-2.40261395e-02,
1.10103556e-01,
-1.10103556e-01,
-1.31705158e-03,
8.44028035e-03,
3.96194900e-04,
-3.96194900e-04,
-3.09416580e-02,
-2.19351288e-02,
2.19351288e-02,
-3.03180146e-02,
6.07601745e-03,
1.00489422e-03,
-1.00489422e-03,
-1.02136815e-02,
-7.33892033e-03,
1.18980188e-03,
7.33892033e-03,
-1.18980188e-03,
-2.71901549e-04,
3.58675079e-04,
-3.58675079e-04,
3.15012317e-04,
5.05772823e-03,
-5.05772823e-03,
1.09876495e-03,
7.51209259e-03,
],
Expand Down

0 comments on commit c476b82

Please sign in to comment.