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

HSC camera in obs_subaru has the incorrect pixel scale

    Details

    • Type: Bug
    • Status: Won't Fix
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: obs_subaru
    • Labels:
      None
    • Templates:
    • Story Points:
      1
    • Team:
      Data Release Production

      Description

      The pixel scale in `obs_subaru` is set to 1.0, making focal plane to sky transformations impossible without external information. For example, with code I borrowed from Robert Lupton: (Note that it requires `testdata_jointcal` to be `setup`)

       
      import lsst.daf.persistence as dafPersistence
      import lsst.afw.geom as afwGeom
      import lsst.utils
      import numpy as np
      import astshim
      import os
      import lsst.afw.cameraGeom as cameraGeom
       
      dataDir = lsst.utils.getPackageDir('testdata_jointcal')
       
      butler = dafPersistence.Butler(os.path.join(dataDir, 'hsc'))
      camera = butler.get('camera')
      detector = camera[1]
       
      boresight = afwGeom.Point2D(0.0, 0.0)
      rotation = 0*afwGeom.degrees
       
      trans = camera.getTransform(detector.makeCameraSys(cameraGeom.PIXELS),
      detector.makeCameraSys(cameraGeom.FIELD_ANGLE))
      polyMap = trans.getMapping()
      radToDeg = astshim.ZoomMap(2, 180/np.pi) # convert from radians to degrees
      polyMap = polyMap.then(radToDeg)
       
      pixelFrame = astshim.Frame(2, "Domain=PIXELS")
      iwcFrame = astshim.Frame(2, "Domain=IWC")
       
      frameDict = astshim.FrameDict(pixelFrame, polyMap, iwcFrame)
       
      crpix = afwGeom.PointD(0, 0)
      crval = afwGeom.SpherePoint(*boresight, afwGeom.degrees)
      cd = afwGeom.makeCdMatrix(1.0*afwGeom.degrees, -(rotation + 90*afwGeom.degrees), True)
      iwcToSkyWcs = afwGeom.makeSkyWcs(crpix, crval, cd)
       
      iwcToSkyMap = iwcToSkyWcs.getFrameDict().getMapping("PIXELS", "SKY")
      skyFrame = iwcToSkyWcs.getFrameDict().getFrame("SKY")
       
      frameDict.addFrame("IWC", iwcToSkyMap, skyFrame)
       
      wcs = afwGeom.SkyWcs(frameDict)
       
      print(wcs.getPixelScale().asArcseconds())
       

      This returns "1.0 arcseconds" which is clearly wrong. Using decam instead of hsc above returns "0.2634 arcseconds" which is correct.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                erykoff Eli Rykoff
                Watchers:
                Eli Rykoff, John Parejko, Lauren MacArthur, Robert Lupton
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel