# Try out cameraGeom+boresight+rotation approach to initial WCSs

XMLWordPrintable

## Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s: None
• Labels:
None
• Story Points:
6
• Team:

## Description

We're hoping to start attaching improved initial WCSs using cameraGeom + boresight and rotation (DM-20154), but this depends on the quality of:

• the cameraGeom models
• the boresights from the raw headers
• the rotation angles (when appropriate) from the headers

Looking at the "easy" dataset Lauren MacArthur has been collecting, pick one full visit from each of (HSC, DECam, CFHT, LSST/DC2), and:

• Process the data through at least CalibrateTask (so we can consider those fitted WCSs "truth", at least for now, because "easy" means we should be getting good fits).
• For each detector, load the raw and apply the new function to create the from-raw WCS that John Parejko will provide as a Python snippet.
• Compare the fitted WCS and from-raw WCS.  I recommend starting by looking at how the calexp bounding boxes transform onto the sky (the notebook attached to DM-19731 does this for HSC and may be useful as a starting point).  But looking at other points is of course fine, too, and would avoid some rotational degeneracies.

We're interested in the following questions:

• Does the from-raw WCS function not run at all for one of the cameras of interest, because:
• the Visitinfo doesn't include boresight or rotation?
• the cameraGeom lacks a coordinate system we need?
• If the function appears to work but produces garbage, is it because:
• the VisitInfo boresight values are bad?
• the Visitinfo rotation values are bad (or perhaps inconsistently defined across cameras)?
• the cameraGeom does not attempt to include optical distortion at all?
• the cameraGeom has distortion, but it's not very good?
• all of the above appear in order, but there's a scaling problem aligned with the zenith direction (i.e atmospheric refraction, which this model doesn't account for but perhaps could)?

I think I already know that the answer for HSC will be "it appears to work but produces garbage because the cameraGeom distortion has a units problem".  It would be nice to hack something together to address that problem, in order to see if there are other problems, but I haven't thought much about how best to do that.

## Attachments

1. DM-19731-CFHT.ipynb
132 kB
2. DM-19731-DECam.ipynb
171 kB
3. DM-19731-HSC.ipynb
200 kB
4. DM-19731-LSST.ipynb
277 kB
5. image.png
36 kB
6. image-2019-06-20-17-10-26-155.png
242 kB
7. image-2019-06-20-17-13-47-893.png
47 kB
8. image-2019-06-20-17-35-27-994.png
126 kB
9. image-2019-06-20-17-36-04-636.png
61 kB
10. image-2019-06-20-17-50-49-534.png
152 kB
11. image-2019-06-24-17-03-42-808.png
378 kB
12. image-2019-06-24-17-04-18-163.png
378 kB
13. image-2019-06-24-17-04-37-289.png
62 kB
14. image-2019-06-24-17-05-04-227.png
62 kB

## Activity

Hide
John Parejko added a comment -

Tim Jenness: is there a design document for YamlCamera anywhere? Does it need an RFC?

Show
John Parejko added a comment - Tim Jenness : is there a design document for YamlCamera anywhere? Does it need an RFC?
Hide
Jim Bosch added a comment -

Isn't the plan to migrate all camera geometries to YamlCamera for consistency?

Yes.  I just don't want that work blocking any of this work.

Show
Jim Bosch added a comment - Isn't the plan to migrate all camera geometries to YamlCamera for consistency? Yes.  I just don't want that work blocking any of this work.
Hide
Chris Morrison added a comment -

Some shift/rotation means just that. There appears to be a shift and a rotation that is still needed to align the CFHT ccds correctly. The pointing precision of DECam is known to be off as well.

Show
Chris Morrison added a comment - Some shift/rotation means just that. There appears to be a shift and a rotation that is still needed to align the CFHT ccds correctly. The pointing precision of DECam is known to be off as well.
Hide
Chris Morrison added a comment - - edited

Plotted a LSST DC2 visit from Lauren MacArthur's "easy" sample. Looks like distorted and raw are plotted directly top of each other with the calexp being slightly shifted relative to the two. It looks as if the makeInitialWcs function (which creates initial) is currently not working properly here. Regardless of the flip applied to the data, the focal plane is plotted the same.

Show
Chris Morrison added a comment - - edited Plotted a LSST DC2 visit from Lauren MacArthur 's "easy" sample. Looks like distorted and raw are plotted directly top of each other with the calexp being slightly shifted relative to the two. It looks as if the makeInitialWcs function (which creates initial) is currently not working properly here. Regardless of the flip applied to the data, the focal plane is plotted the same.
Hide
Chris Morrison added a comment - - edited

Attacked the notebooks used to create the above plots to this ticket. All are adapted from the the notebook used in the ticket DM-19731.

Show
Chris Morrison added a comment - - edited Attacked the notebooks used to create the above plots to this ticket. All are adapted from the the notebook used in the ticket DM-19731 .

## People

• Assignee:
Chris Morrison
Reporter:
Jim Bosch
Watchers:
Chris Morrison, Jim Bosch, John Parejko, Lauren MacArthur, Tim Jenness