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

Create prototype of JSON for afwDetect footprints

    XMLWordPrintable

    Details

    • Story Points:
      3
    • Epic Link:
    • Sprint:
      SUIT Sprint 2018-08, SUIT Sprint 2018-09
    • Team:
      Science User Interface

      Description

      Create a prototype JSON representation of all the footprints in an LSST SourceCatalog, for the regular footprints only (excluding heavy footprints), for use in Firefly.

      Include bounding box information as well as the details of the individual pixels included in each footprint. Coordinate with development of DM-15326.

        Attachments

          Issue Links

            Activity

            No builds found.
            shupe David Shupe created issue -
            shupe David Shupe made changes -
            Field Original Value New Value
            Epic Link DM-14499 [ 84664 ]
            shupe David Shupe made changes -
            Link This issue FF-depends on DM-15326 [ DM-15326 ]
            shupe David Shupe made changes -
            Risk Score 0
            shupe David Shupe made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            Hide
            gpdf Gregory Dubois-Felsmann added a comment -

            Cindy Wang [X] and I explored the initial Footprint-display UI this afternoon. After some discussion about how to handle on-image UI selection of Footprints, something which becomes more complicated when deblended Footprint parents and children are displayed at once, we developed the notion that it may be useful to Firefly to have the IDs of parents and children carried along in the JSON structure. While they will also be in the Object tables from which the Footprints will be taken, we do not yet have the structural metadata (e.g., a VO-DML data model) that would allow Firefly to recognize which columns carry this data, and in any event we cannot rule out a user wanting to browse an Object query result in which they didn't ask for the parent/child columns to be returned.

            So I would ask David Shupe to look into a way to add this information to the JSON.

            Show
            gpdf Gregory Dubois-Felsmann added a comment - Cindy Wang [X] and I explored the initial Footprint-display UI this afternoon. After some discussion about how to handle on-image UI selection of Footprints, something which becomes more complicated when deblended Footprint parents and children are displayed at once, we developed the notion that it may be useful to Firefly to have the IDs of parents and children carried along in the JSON structure. While they will also be in the Object tables from which the Footprints will be taken, we do not yet have the structural metadata (e.g., a VO-DML data model) that would allow Firefly to recognize which columns carry this data, and in any event we cannot rule out a user wanting to browse an Object query result in which they didn't ask for the parent/child columns to be returned. So I would ask David Shupe to look into a way to add this information to the JSON.
            xiuqin Xiuqin Wu [X] (Inactive) made changes -
            Sprint SUIT Sprint 2018-08 [ 738 ] SUIT Sprint 2018-08, SUIT Sprint 2018-09 [ 738, 739 ]
            Hide
            shupe David Shupe added a comment -

            A prototype has been developed in notebook form and has been tested with the capabilities introduced in DM-15326. Later tickets such as DM-15823 will carry this work forward, including the representation of parents and children.

            Sample code for extracting footprints from a SourceCatalog and making the JSON structure (in Python, a dictionary):

            footd = dict(pixelsys='zero-based', feet=dict())
            multiple_peaks = 0
            for record in src:
                footprint = record.getFootprint()
                footid = str(footprint.getId())
                bbox = footprint.getBBox()
                corners = [(c.getX(),c.getY()) for c in bbox.getCorners()]
                spans = footprint.getSpans()
                scoords = [(s.getY(), s.getX0(), s.getX1()) for s in spans]
                peaks = footprint.getPeaks()
                footd['feet'][footid] = dict(corners=corners, spans=scoords)
                pcoords = [(p.getFx(), p.getFy()) for p in peaks]
                footd['feet'][footid] = dict(corners=corners, spans=scoords, peaks=pcoords)
             
            import json
            with open('footprints.json', 'w') as fh:
                json.dump(footd, fh)
            

            Show
            shupe David Shupe added a comment - A prototype has been developed in notebook form and has been tested with the capabilities introduced in DM-15326 . Later tickets such as DM-15823 will carry this work forward, including the representation of parents and children. Sample code for extracting footprints from a SourceCatalog and making the JSON structure (in Python, a dictionary): footd = dict (pixelsys = 'zero-based' , feet = dict ()) multiple_peaks = 0 for record in src: footprint = record.getFootprint() footid = str (footprint.getId()) bbox = footprint.getBBox() corners = [(c.getX(),c.getY()) for c in bbox.getCorners()] spans = footprint.getSpans() scoords = [(s.getY(), s.getX0(), s.getX1()) for s in spans] peaks = footprint.getPeaks() footd[ 'feet' ][footid] = dict (corners = corners, spans = scoords) pcoords = [(p.getFx(), p.getFy()) for p in peaks] footd[ 'feet' ][footid] = dict (corners = corners, spans = scoords, peaks = pcoords)   import json with open ( 'footprints.json' , 'w' ) as fh: json.dump(footd, fh)
            shupe David Shupe made changes -
            Resolution Done [ 10000 ]
            Status In Progress [ 3 ] Done [ 10002 ]
            shupe David Shupe made changes -
            Link This issue relates to DM-15823 [ DM-15823 ]

              People

              Assignee:
              shupe David Shupe
              Reporter:
              shupe David Shupe
              Reviewers:
              Cindy Wang [X] (Inactive)
              Watchers:
              Cindy Wang [X] (Inactive), David Shupe, Gregory Dubois-Felsmann, Trey Roby, Xiuqin Wu [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.