Uploaded image for project: 'Request For Comments'
  1. Request For Comments
  2. RFC-696

Provide alert packet image cutouts as astropy.nddata.CCDData

    XMLWordPrintable

    Details

    • Type: RFC
    • Status: Adopted
    • Resolution: Unresolved
    • Component/s: DM
    • Labels:
      None

      Description

      DMS-REQ-0274 requires that the image cutouts provided in alert packets contain WCS, PSF, variance, and mask information. Providing the cutouts as serializations of afw.Exposure would require alert packet consumers to use the stack to read the cutouts, which is not desirable for portability.

      We propose instead that alert packets contain a serialization of the image cutouts converted to astropy.nddata.CCDData objects. This class currently provides a data structure with numpy.ndarray-like data, uncertainty, mask, and flag planes; metadata, and WCS. Users would be able to read and interpret alert cutouts using astropy only.

      The DMSR-required PSF is not presently included in CCDData, so we would need to develop a suitable PSF representation and attempt to upstream it to astropy if this RFC is approved.

        Attachments

          Issue Links

            Activity

            Hide
            ebellm Eric Bellm added a comment -

            Thanks Tim Jenness, this is helpful.

            What I would like to propose is that our interface be "whatever FITS CCDData writes"--that is, we commit to a FITS serialization, but rather than define our FITS format on a blank page we follow along with CCDData as it updates. (Again, at minimum we'd have to get them to add PSF support.) I suspect you'll say that's a bad idea due to version instabilities etc. I'd just prefer we not define our own thing that requires our own new implementation if we can avoid it. I'd welcome your thoughts on how to approach this.

            I think the PSF we include should be a simple one appropriate only for the cutout in question (which as you say is small)--and similarly the WCS can and should be a simple local WCS.

            Show
            ebellm Eric Bellm added a comment - Thanks Tim Jenness , this is helpful. What I would like to propose is that our interface be "whatever FITS CCDData writes"--that is, we commit to a FITS serialization, but rather than define our FITS format on a blank page we follow along with CCDData as it updates. (Again, at minimum we'd have to get them to add PSF support.) I suspect you'll say that's a bad idea due to version instabilities etc. I'd just prefer we not define our own thing that requires our own new implementation if we can avoid it. I'd welcome your thoughts on how to approach this. I think the PSF we include should be a simple one appropriate only for the cutout in question (which as you say is small)--and similarly the WCS can and should be a simple local WCS.
            Hide
            tjenness Tim Jenness added a comment -

            I'm fine with this as a pragmatic approach. The important point is for us to be upfront about exactly what we are saying.

            Show
            tjenness Tim Jenness added a comment - I'm fine with this as a pragmatic approach. The important point is for us to be upfront about exactly what we are saying.
            Hide
            ebellm Eric Bellm added a comment -

            Adopted. Implementation tickets are DM-24325, DM-25160, and DM-25161

            Show
            ebellm Eric Bellm added a comment - Adopted. Implementation tickets are DM-24325 , DM-25160 , and DM-25161
            Hide
            gpdf Gregory Dubois-Felsmann added a comment -

            Note that although CCDData includes API support for flags, it does not appear to come with serialization support for that data - this is something we've recently run into in SPHEREx and are starting to work on.

            I didn't see any mention of this here or on DM-24325's ticket or PR.  Was this issue encountered in the course of doing the work?

            Show
            gpdf Gregory Dubois-Felsmann added a comment - Note that although CCDData includes API support for flags, it does not appear to come with serialization support for that data - this is something we've recently run into in SPHEREx and are starting to work on. I didn't see any mention of this here or on DM-24325 's ticket or PR.  Was this issue encountered in the course of doing the work?
            Hide
            ebellm Eric Bellm added a comment -

            Gregory Dubois-Felsmann I don't think we recognized that at the time, no.

            Show
            ebellm Eric Bellm added a comment - Gregory Dubois-Felsmann I don't think we recognized that at the time, no.

              People

              Assignee:
              ebellm Eric Bellm
              Reporter:
              ebellm Eric Bellm
              Watchers:
              Chris Morrison [X] (Inactive), Colin Slater, Eric Bellm, Gregory Dubois-Felsmann, John Parejko, John Swinbank, Kian-Tat Lim, Leanne Guy, Spencer Nelson, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Planned End:

                  Jenkins

                  No builds found.