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

Improve overscan correction for DECam raw data

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: obs_decam
    • Labels:
      None

      Description

      Currently, the default overscan correction from IsrTask is used for processing DECam raw data. Overscan subtraction is done one amplifier at a time.

      However, a bias jump occurs due to the simultaneous readout of the smaller ancillary CCDs on DECam, some images show discontinuity in the y direction across one amplifier, as in the example screen shot.

      This ticket is to improve overscan correction for DECam data so to mitigate this discontinuity in the ISR processing.

      Arrangement of CCDs on DECam: http://www.ctio.noao.edu/noao/sites/default/files/DECam/DECamPixelOrientation.png

      More details:

      There are 6 backplanes in the readout system, shown by the colors in DECamPixelOrientation.png. In raw data files, the CCD's backplane is noted in the header keyword "FPA". Examination of some images suggests that science CCDs on orange and yellow backplanes show bias jump at 2098 pixels from the y readout. That is the y size of the focus CCDs.

      Actions:

      For CCDs on the affected backplanes, divide the array into two pieces at the jump location, and do overscan correction on the upper and lower pieces separately.

        Attachments

        1. c52_AKIMA_SPLINE_order30.png
          c52_AKIMA_SPLINE_order30.png
          22 kB
        2. DECamPixelOrientation.png
          DECamPixelOrientation.png
          140 kB
        3. example_after.png
          example_after.png
          483 kB
        4. example_bias_jump.png
          example_bias_jump.png
          717 kB

          Issue Links

            Activity

            Hide
            hchiang2 Hsin-Fang Chiang added a comment -

            Tried high order splines and the jump is still quite obvious.

            I'll proceed with Paul Price's suggestion "for the troublesome amps only, cut them in two vertically and then feed each piece into IsrTask.overscanCorrection separately."

            Show
            hchiang2 Hsin-Fang Chiang added a comment - Tried high order splines and the jump is still quite obvious. I'll proceed with Paul Price 's suggestion "for the troublesome amps only, cut them in two vertically and then feed each piece into IsrTask.overscanCorrection separately."
            Hide
            price Paul Price added a comment -

            It might help to plot the overscan, which you can do by using the --debug command-line argument, and put in your debug.py (which sits somewhere on your PYTHONPATH):

            import lsstDebug
            print "Importing debug settings..."
            def DebugInfo(name):
                di = lsstDebug.getInfo(name)        # N.b. lsstDebug.Info(name) would call us recursively
                if name in (
                        "lsst.ip.isr.isr",
                              ):
                    di.display = True
                return di
            lsstDebug.Info = DebugInfo
            

            Would you please post one of the plots here?

            Show
            price Paul Price added a comment - It might help to plot the overscan, which you can do by using the --debug command-line argument, and put in your debug.py (which sits somewhere on your PYTHONPATH ): import lsstDebug print "Importing debug settings..." def DebugInfo(name): di = lsstDebug.getInfo(name) # N.b. lsstDebug.Info(name) would call us recursively if name in ( "lsst.ip.isr.isr", ): di.display = True return di lsstDebug.Info = DebugInfo Would you please post one of the plots here?
            Hide
            hchiang2 Hsin-Fang Chiang added a comment -

            Useful debug feature I didn't know about before! Thanks for mentioning it!

            This is with isr.overscanFitType='AKIMA_SPLINE' isr.overscanOrder=30 for ccdnum 52 (one with larger jump)

            Show
            hchiang2 Hsin-Fang Chiang added a comment - Useful debug feature I didn't know about before! Thanks for mentioning it! This is with isr.overscanFitType='AKIMA_SPLINE' isr.overscanOrder=30 for ccdnum 52 (one with larger jump)
            Hide
            hchiang2 Hsin-Fang Chiang added a comment -

            Paul Price would you mind reviewing this?

            Show
            hchiang2 Hsin-Fang Chiang added a comment - Paul Price would you mind reviewing this?
            Hide
            price Paul Price added a comment -

            Very nice! You were more thorough than I would have been (checking the header for the backplane, checking the readout corner). The only comment I would make is that I think you should use the entire 110 char width, e.g., write this:

                    lowerDataBBox = afwGeom.Box2I(
                        dataBox.getBegin(),
                        afwGeom.Extent2I(dataBox.getWidth(), yLower))
            

            as this:

                    lowerDataBBox = afwGeom.Box2I(dataBox.getBegin(), afwGeom.Extent2I(dataBox.getWidth(), yLower))
            

            I think the latter is easier to read. But if you disagree, just ignore me and merge anyway.

            Show
            price Paul Price added a comment - Very nice! You were more thorough than I would have been (checking the header for the backplane, checking the readout corner). The only comment I would make is that I think you should use the entire 110 char width, e.g., write this: lowerDataBBox = afwGeom.Box2I( dataBox.getBegin(), afwGeom.Extent2I(dataBox.getWidth(), yLower)) as this: lowerDataBBox = afwGeom.Box2I(dataBox.getBegin(), afwGeom.Extent2I(dataBox.getWidth(), yLower)) I think the latter is easier to read. But if you disagree, just ignore me and merge anyway.
            Hide
            price Paul Price added a comment -

            Oh, would you mind posting an "after" picture showing that the bias jump is fixed?

            Show
            price Paul Price added a comment - Oh, would you mind posting an "after" picture showing that the bias jump is fixed?
            Hide
            hchiang2 Hsin-Fang Chiang added a comment -

            Thank you for your review!

            Added an "after" screen shot of the same image.

            Changes merged to master.

            Show
            hchiang2 Hsin-Fang Chiang added a comment - Thank you for your review! Added an "after" screen shot of the same image. Changes merged to master.
            Hide
            price Paul Price added a comment -

            That looks nice — well done!

            Show
            price Paul Price added a comment - That looks nice — well done!

              People

              Assignee:
              hchiang2 Hsin-Fang Chiang
              Reporter:
              hchiang2 Hsin-Fang Chiang
              Reviewers:
              Paul Price
              Watchers:
              Hsin-Fang Chiang, Paul Price
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.