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

Make ISR maskVignettedRegion more efficient

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw, ip_isr
    • Labels:
      None
    • Story Points:
      4
    • Team:
      Data Release Production
    • Urgent?:
      No

      Description

      maskVignettedRegion is doing a loop over pixels in a detector to check inclusion in a polygon. This is causing a large number of allocations, and a large runtime due to the nature of python loops.

      This ticket adds a contains c++ method overload for supplying x,y pairs instead of Point objects (it creates one internally). The python c++ binds make use of this and auto vectorization to allow arrays to be passed as arguments. The arrays can then be looped over in c++ instead of python making things much more efficient.

      Finally the ticket updates ip_isr to make use of this functionality.

      This results in a speed up of approximately 8x for isr task where the maskVignettedRegion is used.

        Attachments

          Activity

          No builds found.
          nlust Nate Lust created issue -
          nlust Nate Lust made changes -
          Field Original Value New Value
          Status To Do [ 10001 ] In Progress [ 3 ]
          tjenness Tim Jenness made changes -
          Team Data Release Production [ 10301 ]
          nlust Nate Lust made changes -
          Story Points 4
          nlust Nate Lust made changes -
          Reviewers Christopher Waters [ cwaters ]
          Status In Progress [ 3 ] In Review [ 10004 ]
          Hide
          erykoff Eli Rykoff added a comment -

          This is awesome! I'll link the afw PR here which won't show up on the sidebar: https://github.com/lsst/afw/pull/659

          Show
          erykoff Eli Rykoff added a comment - This is awesome! I'll link the afw PR here which won't show up on the sidebar: https://github.com/lsst/afw/pull/659
          Hide
          czw Christopher Waters added a comment -

          Looks good to me.  I wasn't tagged on the afw PR, but as no one else was either, I checked that over as well.

          Show
          czw Christopher Waters added a comment - Looks good to me.  I wasn't tagged on the afw PR, but as no one else was either, I checked that over as well.
          czw Christopher Waters made changes -
          Status In Review [ 10004 ] Reviewed [ 10101 ]
          nlust Nate Lust made changes -
          Resolution Done [ 10000 ]
          Status Reviewed [ 10101 ] Done [ 10002 ]
          yusra Yusra AlSayyad made changes -
          Epic Link PREOPS-1494 [ 2225526 ]

            People

            Assignee:
            nlust Nate Lust
            Reporter:
            nlust Nate Lust
            Reviewers:
            Christopher Waters
            Watchers:
            Christopher Waters, Eli Rykoff, Nate Lust
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.