Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-19731

Investigate inaccuracy of initial HSC WCSs

    Details

      Description

      Gen3 ingest needs to be able to generate inclusive on-sky regions for all visits, using raw WCS and potentially camera geometry.  As those initial WCSs are inaccurate, we expect to need to pad somehow to ensure the region always includes the true region, even if it's much larger.

      As a result, we need to look at the difference between some initial HSC WCSs and their post-astrometry counterparts.

      This investigation could also be informative for future attempts to fit initial astrometry with as few free parameters as possible.

        Attachments

          Issue Links

            Activity

            Hide
            jbosch Jim Bosch added a comment - - edited

            Thanks! I've added you as a watcher to all of the follow-ups.

            Paul Price also mentioned on the related Slack conversation that the HSC distortion is a function of the zenith angle, which is I think equivalent to what Colin Slater was saying. I think I've convinced myself that that can't be the entire problem here, as the distortion looks fine in the later plot in the notebook when there's no attempt to make a WCS out of it, but I could be wrong, and it could certainly at least be something that confuses some other issue.

            Show
            jbosch Jim Bosch added a comment - - edited Thanks! I've added you as a watcher to all of the follow-ups. Paul Price also mentioned on the related Slack conversation that the HSC distortion is a function of the zenith angle, which is I think equivalent to what Colin Slater was saying. I think I've convinced myself that that can't be the entire problem here, as the distortion looks fine in the later plot in the notebook when there's no attempt to make a WCS out of it, but I could be wrong, and it could certainly at least be something that confuses some other issue.
            Hide
            cmorrison Chris Morrison added a comment -

            I don't see anything very wrong with what you're doing in the notebook. I agree that something looks strange in the "distorted" correction vs joint cal wcs, as if the distorted calculation has incorrect sign in the how the distortion is applied. The three tickets you are spawning off this seem to be good starting points to look into the problem.

            I do recall looking over the initial WCSs in HSC when I started on the matcher project and saw that the initial WCS was fairly off compared to the "good" solution. If I remember, Colin Slater found that it could be improved by accounting for the "gravity vector" of the focal plane orientation though that may be orthogonal to this problem.

            I'm going to mark the ticket as reviewed. Please, add me as a watcher to the two bug fix tickets.

            Show
            cmorrison Chris Morrison added a comment - I don't see anything very wrong with what you're doing in the notebook. I agree that something looks strange in the "distorted" correction vs joint cal wcs, as if the distorted calculation has incorrect sign in the how the distortion is applied. The three tickets you are spawning off this seem to be good starting points to look into the problem. I do recall looking over the initial WCSs in HSC when I started on the matcher project and saw that the initial WCS was fairly off compared to the "good" solution. If I remember, Colin Slater found that it could be improved by accounting for the "gravity vector" of the focal plane orientation though that may be orthogonal to this problem. I'm going to mark the ticket as reviewed. Please, add me as a watcher to the two bug fix tickets.
            Hide
            jbosch Jim Bosch added a comment -

            Chris Morrison, could you take this small, non-standard review?

            There's no code here to be merged, but I'm hoping you can take a quick look at the attached notebook just to see if I've made any silly mistakes that would invalidate the conclusions in the last comment.

            Show
            jbosch Jim Bosch added a comment - Chris Morrison , could you take this small, non-standard review? There's no code here to be merged, but I'm hoping you can take a quick look at the attached notebook just to see if I've made any silly mistakes that would invalidate the conclusions in the last comment.
            Hide
            jbosch Jim Bosch added a comment - - edited

            I found some very interesting and unexpected things (see attached notebook).

            First off, the relevant number for Gen3 work is that we should pad by about 2000 pixels if we want to use the raw WCS to make a boundary that will definitely include the final WCS.  I've gone ahead and bumped that up to 4000 pixels just to be safe (in the new configs added to obs_subaru on DM-19638).

            It also looks like the boresight according to the raw WCSs is pretty good - it's a much, much smaller effect than the distortion.

            The surprising result is that it looks like neither of our approaches to using cameraGeom to distort a raw WCS work correctly:

            • makeDistortedTanWcs (which is used by ISR) seem to do the right thing in x (or at least x in the tract coordinate system I've projected everything onto, though it seems to also be x in the pixel coordinates of most CCDs).  But it moves things in the opposite direction in y, and seems to have the wrong curvature as well.  I first thought that this was a problem with the HSC cameraGeom, but that looks fine on closer inspection - instead it seems like a bug in makeDistortedTanWcs.
            • The makeSkyWcs overload that takes a PIXELS to FIELD_ANGLE transform, boresight position, and rotation angle has a scaling problem - it makes all detectors much larger and further from the boresight than they should be.  It seems like a units thing, but I don't know if it's an HSC-specific pixels vs. mm thing or a radians vs. degrees thing.

            The fact that both of these are broken also makes me worry about the TAN_PIXELS coordinate system we use to correct for distortion when doing single-frame matching and astrometric fitting; I haven't checked that here.

            Show
            jbosch Jim Bosch added a comment - - edited I found some very interesting and unexpected things (see attached notebook). First off, the relevant number for Gen3 work is that we should pad by about 2000 pixels if we want to use the raw WCS to make a boundary that will definitely include the final WCS.  I've gone ahead and bumped that up to 4000 pixels just to be safe (in the new configs added to obs_subaru on DM-19638 ). It also looks like the boresight according to the raw WCSs is pretty good - it's a much, much smaller effect than the distortion. The surprising result is that it looks like neither of our approaches to using cameraGeom to distort a raw WCS work correctly: makeDistortedTanWcs (which is used by ISR) seem to do the right thing in x (or at least x in the tract coordinate system I've projected everything onto, though it seems to also be x in the pixel coordinates of most CCDs).  But it moves things in the opposite direction in y, and seems to have the wrong curvature as well.  I first thought that this was a problem with the HSC cameraGeom, but that looks fine on closer inspection - instead it seems like a bug in makeDistortedTanWcs . The makeSkyWcs overload that takes a PIXELS to FIELD_ANGLE transform, boresight position, and rotation angle has a scaling problem - it makes all detectors much larger and further from the boresight than they should be.  It seems like a units thing, but I don't know if it's an HSC-specific pixels vs. mm thing or a radians vs. degrees thing. The fact that both of these are broken also makes me worry about the TAN_PIXELS coordinate system we use to correct for distortion when doing single-frame matching and astrometric fitting; I haven't checked that here.

              People

              • Assignee:
                jbosch Jim Bosch
                Reporter:
                jbosch Jim Bosch
                Reviewers:
                Chris Morrison
                Watchers:
                Chris Morrison, Jim Bosch, John Parejko
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel