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

Recent data using obs_decam retrieves incorrect wcs with butler.get("calexp_wcs")

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Labels:
      None
    • Story Points:
      4
    • Sprint:
      Arch 2018-11-05, Arch 2018-11-12
    • Team:
      Architecture

      Description

      While reviewing DM-16253 I re-processed DECam data through processCCD to test the metadata fix, but found that the reported wcs of the images was occasionally catastrophically wrong. The bug appears seemingly randomly when the fits header is read to create a wcs:

      for _i in range(40):
          wcs_test = butler_test.get('calexp_wcs', {'visit': 411735, 'ccdnum': 10})
          print(wcs_test.pixelToSky(-.5,-.5))
      (137.919516, -1.319873)
      (nan, nan)
      (137.919516, -1.319873)
      (138.379127, +87.701332)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (228.379127, -0.000000)
      (137.919516, -1.319873)
      (138.379127, +87.701332)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (138.379127, +87.701332)
      (137.919516, -1.319873)
      (228.379127, -0.000000)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (nan, nan)
      (138.379127, +87.701332)
      (318.379127, -87.701332)
      (nan, nan)
      (228.379127, -0.000000)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (137.919516, -1.319873)
      (228.379127, -0.000000)
      (137.919516, -1.319873)
      (228.379127, -0.000000)
      (228.379127, -0.000000)
      (nan, nan)
      (137.919516, -1.319873)
      

      The above values are random each time, and the order is not repeatable.

      If the full exposure is read in and the wcs is obtained from exposure.getWcs(), then it is correct each time. Also, the above command when run on data ingested in late January 2018 also produces correct results.

        Attachments

          Issue Links

            Activity

            Hide
            tjenness Tim Jenness added a comment -

            The demo is currently failing on this branch because some of the declinations in the catalog have shifted by a tiny amount (suggesting that we are putting coordinates in catalogs derived at some point from WCS in headers and not the real WCS).

            Show
            tjenness Tim Jenness added a comment - The demo is currently failing on this branch because some of the declinations in the catalog have shifted by a tiny amount (suggesting that we are putting coordinates in catalogs derived at some point from WCS in headers and not the real WCS).
            Hide
            rowen Russell Owen added a comment -

            This looks great. Two small suggestions on github.

            Show
            rowen Russell Owen added a comment - This looks great. Two small suggestions on github.
            Hide
            tjenness Tim Jenness added a comment -

            Russell Owen this evening I have had a go at using the PropertyList->FitsChan conversion directly without going through the string. It seems to work fine but it will need another review. If people prefer I merge the reviewed code and then put this improvement on a separate ticket please let me know.

            Show
            tjenness Tim Jenness added a comment - Russell Owen this evening I have had a go at using the PropertyList->FitsChan conversion directly without going through the string. It seems to work fine but it will need another review. If people prefer I merge the reviewed code and then put this improvement on a separate ticket please let me know.
            Hide
            tjenness Tim Jenness added a comment -

            (but I must remember to fix the demo – I assume I just copy in the new versions of the catalogs – it still surprises me that they are changing at all).

            Show
            tjenness Tim Jenness added a comment - (but I must remember to fix the demo – I assume I just copy in the new versions of the catalogs – it still surprises me that they are changing at all).
            Hide
            tjenness Tim Jenness added a comment -

            Merged. Jenkins passed.

            Show
            tjenness Tim Jenness added a comment - Merged. Jenkins passed.

              People

              Assignee:
              tjenness Tim Jenness
              Reporter:
              sullivan Ian Sullivan
              Reviewers:
              Russell Owen
              Watchers:
              Ian Sullivan, Jim Bosch, John Parejko, John Swinbank, Meredith Rawls, Russell Owen, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.