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

    • Bug
    • Status: Done
    • Resolution: Done
    • None
    • afw
    • None
    • 4
    • Arch 2018-11-05, Arch 2018-11-12
    • 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

            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).

            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).
            rowen Russell Owen added a comment -

            This looks great. Two small suggestions on github.

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

            rowen 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.

            tjenness Tim Jenness added a comment - rowen 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.
            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).

            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).
            tjenness Tim Jenness added a comment -

            Merged. Jenkins passed.

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

            People

              tjenness Tim Jenness
              sullivan Ian Sullivan
              Russell Owen
              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.