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

Generate sky object sky plots in analysis tools

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Story Points:
      2
    • Epic Link:
    • Sprint:
      Analysis Tools July 2022
    • Team:
      Data Release Production
    • Urgent?:
      No

      Description

      This ticket ports over the sky object sky plots from analysis_drp into analysis_tools.

        Attachments

          Activity

          Hide
          lskelvin Lee Kelvin added a comment -

          A new SkyObjectSkyPlot class was added in a new file: 'python/lsst/analysis/tools/analysisPlots/skyObject.py'.

          As part of this ticket, a small issue with the 'band' naming convention was fixed in the 'Ap12_PSF_skyPlot' class (from which this sky object class was originally based).

          Show
          lskelvin Lee Kelvin added a comment - A new SkyObjectSkyPlot class was added in a new file: ' python/lsst/analysis/tools/analysisPlots/skyObject.py '. As part of this ticket, a small issue with the 'band' naming convention was fixed in the 'Ap12_PSF_skyPlot' class (from which this sky object class was originally based).
          Hide
          lskelvin Lee Kelvin added a comment - - edited

          An example Python snippet which tests the above new code functionality is reproduced here, for reference (output plot attached to ticket):

          collection = "HSC/runs/RC2/w_2022_16/DM-34451"
          dataId = {"instrument": "HSC", "skymap": "hsc_rings_v1", "tract": 9813}
           
          butler = dafButler.Butler("/repo/main/")
          objTable = butler.get("objectTable_tract", collections=collection, dataId=dataId)
           
          # import pdb; pdb.set_trace()
           
          skyPlot = SkyObjectSkyPlot()
          skyPlot.populatePrepFromProcess()
          stage1 = skyPlot.prep(objTable, band="i")
          stage2 = skyPlot.process(stage1, band="i")
          plot = skyPlot.post_process(stage2, plotInfo=_StandinPlotInfo())
           
          plt.show()
           
          plt.savefig("skyObjectSkyTest.png")
          plt.close()
          print(plot)
          

          Show
          lskelvin Lee Kelvin added a comment - - edited An example Python snippet which tests the above new code functionality is reproduced here, for reference (output plot attached to ticket): collection = "HSC/runs/RC2/w_2022_16/DM-34451" dataId = { "instrument" : "HSC" , "skymap" : "hsc_rings_v1" , "tract" : 9813 }   butler = dafButler.Butler( "/repo/main/" ) objTable = butler.get( "objectTable_tract" , collections = collection, dataId = dataId)   # import pdb; pdb.set_trace()   skyPlot = SkyObjectSkyPlot() skyPlot.populatePrepFromProcess() stage1 = skyPlot.prep(objTable, band = "i" ) stage2 = skyPlot.process(stage1, band = "i" ) plot = skyPlot.post_process(stage2, plotInfo = _StandinPlotInfo())   plt.show()   plt.savefig( "skyObjectSkyTest.png" ) plt.close() print (plot)
          Hide
          sophiereed Sophie Reed added a comment -

          Looks good to me, as long as both plots are tested and look good you are good to merge.

          Show
          sophiereed Sophie Reed added a comment - Looks good to me, as long as both plots are tested and look good you are good to merge.
          Hide
          lskelvin Lee Kelvin added a comment -

          Currently existing plot output also added to this ticket as generated by this ticket branch, for reference. Looks ok to me I think.

          Show
          lskelvin Lee Kelvin added a comment - Currently existing plot output also added to this ticket as generated by this ticket branch, for reference. Looks ok to me I think.
          Hide
          lskelvin Lee Kelvin added a comment -

          As discussed, additional minor edits to sync up the axis labels between both plots, adding units (degrees). Thanks for the quick review - branch merged and deleted!

          Show
          lskelvin Lee Kelvin added a comment - As discussed, additional minor edits to sync up the axis labels between both plots, adding units (degrees). Thanks for the quick review - branch merged and deleted!

            People

            Assignee:
            lskelvin Lee Kelvin
            Reporter:
            lskelvin Lee Kelvin
            Reviewers:
            Sophie Reed
            Watchers:
            Lee Kelvin, Sophie Reed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.