Details

    • Templates:
    • Story Points:
      1
    • Epic Link:
    • Sprint:
      DRP S17-1
    • Team:
      Data Release Production

      Description

      pipe_tasks provides examples/calibTask.py, which exercises CharacterizeImageTask and CalibrateTask.

      As reported by Mandeep Gill this currently fails as follows:

      RuntimeError: No such FITS catalog file: /tigress/HSC/LSST/stack_20160915/Linux64/obs_test/12.1-9-g3e397f1+2/data/input/schema/icSrc.fits
      

      In addition to that, the code also attempts to pass a VisitInfo to an ExposureF constructor, which fails.

        Issue Links

          Activity

          Hide
          swinbank John Swinbank added a comment -

          Work arounds for both issues:

          --- a/examples/calibrateTask.py
          +++ b/examples/calibrateTask.py
          @@ -56,7 +56,10 @@ def loadData(pixelScale=1.0):
               imFile = os.path.join(mypath, "CFHT", "D4", "cal-53535-i-797722_small_1.fits")
           
               visitInfo = afwImage.makeVisitInfo(exposureTime=1.0)
          -    exposure = afwImage.ExposureF(imFile, visitInfo)
          +    exposureInfo = afwImage.ExposureInfo()
          +    exposureInfo.setVisitInfo(visitInfo)
          +    exposure = afwImage.ExposureF(imFile)
          +    exposure.setInfo(exposureInfo)
               # add a filter
               afwImage.Filter.define(afwImage.FilterProperty(FilterName, 600, True))
               exposure.setFilter(afwImage.Filter(FilterName))
          @@ -125,7 +128,7 @@ def run(display=False):
           
               config = CalibrateTask.ConfigClass()
               config.astrometry.retarget(MyAstrometryTask)
          -    calibrateTask = CalibrateTask(butler, config=config)
          +    calibrateTask = CalibrateTask(config=config)
           
               # load the data
               # Exposure ID and the number of bits required for exposure IDs are usually obtained from a data repo,
          

          Show
          swinbank John Swinbank added a comment - Work arounds for both issues: --- a/examples/calibrateTask.py +++ b/examples/calibrateTask.py @@ -56,7 +56,10 @@ def loadData(pixelScale=1.0): imFile = os.path.join(mypath, "CFHT", "D4", "cal-53535-i-797722_small_1.fits")   visitInfo = afwImage.makeVisitInfo(exposureTime=1.0) - exposure = afwImage.ExposureF(imFile, visitInfo) + exposureInfo = afwImage.ExposureInfo() + exposureInfo.setVisitInfo(visitInfo) + exposure = afwImage.ExposureF(imFile) + exposure.setInfo(exposureInfo) # add a filter afwImage.Filter.define(afwImage.FilterProperty(FilterName, 600, True)) exposure.setFilter(afwImage.Filter(FilterName)) @@ -125,7 +128,7 @@ def run(display=False):   config = CalibrateTask.ConfigClass() config.astrometry.retarget(MyAstrometryTask) - calibrateTask = CalibrateTask(butler, config=config) + calibrateTask = CalibrateTask(config=config)   # load the data # Exposure ID and the number of bits required for exposure IDs are usually obtained from a data repo,
          Hide
          swinbank John Swinbank added a comment - - edited

          Hey Russell Owen, do you have time to review this, please? The changes are quite modest; I don't imagine it'll take more than a few minutes.

          I think it's all straightforward enough, but, as per my post on CLO I wonder if there's an easier way to add the visitInfo to the exposure. If you have any suggestions, that would be much appreciated.

          Pull request is here.

          Show
          swinbank John Swinbank added a comment - - edited Hey Russell Owen , do you have time to review this, please? The changes are quite modest; I don't imagine it'll take more than a few minutes. I think it's all straightforward enough, but, as per my post on CLO I wonder if there's an easier way to add the visitInfo to the exposure . If you have any suggestions, that would be much appreciated. Pull request is here .
          Hide
          rowen Russell Owen added a comment -

          Looks good. A few minor changes suggested on github.

          Show
          rowen Russell Owen added a comment - Looks good. A few minor changes suggested on github.
          Hide
          swinbank John Swinbank added a comment -

          Thank you! Now merged.

          Show
          swinbank John Swinbank added a comment - Thank you! Now merged.

            People

            • Assignee:
              swinbank John Swinbank
              Reporter:
              swinbank John Swinbank
              Reviewers:
              Russell Owen
              Watchers:
              John Swinbank, Mandeep Gill [X] (Inactive), Russell Owen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development

                  Agile