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

Investigate to standardize image objects to Exposure class type

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: ImgServ, obs_sdss
    • Labels:
      None
    • Story Points:
      10
    • Epic Link:
    • Sprint:
      DB_S18_03
    • Team:
      Data Access and Database

      Description

      Lately, there has been a visit to the underlying class that represents an image loaded from a FITS file. The two classes used are Image and Exposure, with Image (raw FITS) objects missing the metadata, which includes WCS info among others.   From DM-13412, it turns out that the underlying image object is NOT of the Exposure type after all, as exposed by the unit test testGetDR7() in obs_sdss.

      Per KT, we should investigate the issue and "properly standardize to an Exposure."

        Attachments

          Issue Links

            Activity

            Hide
            kennylo Kenny Lo added a comment -

            >>> import lsst.afw.image as afwImage
            >>> image = afwImage.ExposureF("fpC-002708-r3-0103.fits")
            afw.image.MaskedImage WARN: Expected extension type not found: IMAGE
            >>> image
            <lsst.afw.image.exposure.exposure.ExposureF object at 0x7f8fabffb730>
            >>> dir(image)
            ['Factory', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'clone', 'convertD', 'convertF', 'dtype', 'getBBox', 'getCalib', 'getDetector', 'getDimensions', 'getFilter', 'getHeight', 'getImage', 'getInfo', 'getMask', 'getMaskedImage', 'getMetadata', 'getPsf', 'getVariance', 'getWcs', 'getWidth', 'getX0', 'getXY0', 'getY0', 'hasPsf', 'hasWcs', 'image', 'mask', 'maskedImage', 'readFits', 'setCalib', 'setDetector', 'setFilter', 'setImage', 'setInfo', 'setMask', 'setMaskedImage', 'setMetadata', 'setPsf', 'setVariance', 'setWcs', 'setXY0', 'variance', 'writeFits']

            Show
            kennylo Kenny Lo added a comment - >>> import lsst.afw.image as afwImage >>> image = afwImage.ExposureF("fpC-002708-r3-0103.fits") afw.image.MaskedImage WARN: Expected extension type not found: IMAGE >>> image <lsst.afw.image.exposure.exposure.ExposureF object at 0x7f8fabffb730> >>> dir(image) ['Factory', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'clone', 'convertD', 'convertF', 'dtype', 'getBBox', 'getCalib', 'getDetector', 'getDimensions', 'getFilter', 'getHeight', 'getImage', 'getInfo', 'getMask', 'getMaskedImage', 'getMetadata', 'getPsf', 'getVariance', 'getWcs', 'getWidth', 'getX0', 'getXY0', 'getY0', 'hasPsf', 'hasWcs', 'image', 'mask', 'maskedImage', 'readFits', 'setCalib', 'setDetector', 'setFilter', 'setImage', 'setInfo', 'setMask', 'setMaskedImage', 'setMetadata', 'setPsf', 'setVariance', 'setWcs', 'setXY0', 'variance', 'writeFits']
            Hide
            kennylo Kenny Lo added a comment -

            Kian-Tat Lim Looks like a 'raw' image file can be loaded into an Exposure object.  Is the warning on missing IMAGE extension type to be heeded?

            Show
            kennylo Kenny Lo added a comment - Kian-Tat Lim Looks like a 'raw' image file can be loaded into an Exposure object.  Is the warning on missing IMAGE extension type to be heeded?
            Hide
            kennylo Kenny Lo added a comment - - edited

            Per Kian-Tat Lim input, make the following changes in Sdssmapper.yaml:   

            exposures                             
              fpC                              
                 persistable: DecoratedImageU                           
                 python: lsst.afw.image.ExposureF
            

             

            Show
            kennylo Kenny Lo added a comment - - edited Per Kian-Tat Lim  input, make the following changes in Sdssmapper.yaml:    exposures                              fpC                               persistable: DecoratedImageU                            python: lsst.afw.image.ExposureF  
            Hide
            ktl Kian-Tat Lim added a comment - - edited

            It looks like the DM-8097 and DM-12819 solutions got mixed in here. It would be better if they could be separated, but pointers should be placed in the other tickets if not. Some comments in the PR, the most salient being that I think the image is being read twice when only a cutout is desired.

            Show
            ktl Kian-Tat Lim added a comment - - edited It looks like the DM-8097 and DM-12819 solutions got mixed in here. It would be better if they could be separated, but pointers should be placed in the other tickets if not. Some comments in the PR, the most salient being that I think the image is being read twice when only a cutout is desired.
            Hide
            npease Nate Pease [X] (Inactive) added a comment -

            I don't have anything to add to K-T's comments.

            Show
            npease Nate Pease [X] (Inactive) added a comment - I don't have anything to add to K-T's comments.
            Hide
            kennylo Kenny Lo added a comment -

            Nate Pease [X] - KT & I done our rounds on this - can you please mark 'review complete' for me.  Thanks!

            Show
            kennylo Kenny Lo added a comment - Nate Pease [X] - KT & I done our rounds on this - can you please mark 'review complete' for me.  Thanks!
            Hide
            npease Nate Pease [X] (Inactive) added a comment -

            I removed myself from the list of reviewers (but neglected to leave a comment), will do.

            Show
            npease Nate Pease [X] (Inactive) added a comment - I removed myself from the list of reviewers (but neglected to leave a comment), will do.

              People

              Assignee:
              kennylo Kenny Lo
              Reporter:
              kennylo Kenny Lo
              Reviewers:
              Kian-Tat Lim
              Watchers:
              Fritz Mueller, Kenny Lo, Kian-Tat Lim, Nate Pease [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.