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

SpanSet.fromShape() fails for circles with radii > 46340 pixels

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reviewed
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: afw, geom
    • Labels:
      None

      Description

      Because of the way the calculations are performed (involving squaring the radius) the maximum size supported by SpanSet.fromShape( radius , Stencil.CIRCLE) is 46340, the largest integer less than the square root of the largest positive signed 32-bit integer.

      (This is about 2.6 degrees at the LSST pixel scale.)

      Nonsensical results are returned when this limit is exceeded; no exception is thrown.

      See the linked ticket for the source of the observation of this error (in the cutout service).

        Attachments

          Issue Links

            Activity

            Hide
            gpdf Gregory Dubois-Felsmann added a comment -

            Perhaps the usual trick of factoring r out of the square root at

            https://github.com/lsst/afw/blob/f57f4888d3c1b1cab167ce55b20ec5691ba95885/src/geom/SpanSet.cc#L696

            would do the job.

            Show
            gpdf Gregory Dubois-Felsmann added a comment - Perhaps the usual trick of factoring r out of the square root at https://github.com/lsst/afw/blob/f57f4888d3c1b1cab167ce55b20ec5691ba95885/src/geom/SpanSet.cc#L696 would do the job.
            Hide
            swinbank John Swinbank added a comment -

            Hey Nate Lust — I think you originally wrote this code. Would you mind taking a look at this ticket when you have a few minutes? CC Yusra AlSayyad for reference.

            Show
            swinbank John Swinbank added a comment - Hey Nate Lust — I think you originally wrote this code. Would you mind taking a look at this ticket when you have a few minutes? CC Yusra AlSayyad for reference.
            Hide
            nlust Nate Lust added a comment -

            I took a quick look at this, and will do something more detailed this afternoon.

            Show
            nlust Nate Lust added a comment - I took a quick look at this, and will do something more detailed this afternoon.
            Hide
            gpdf Gregory Dubois-Felsmann added a comment -

            Review comments posted to Github.

            Show
            gpdf Gregory Dubois-Felsmann added a comment - Review comments posted to Github.
            Hide
            swinbank John Swinbank added a comment -

            Hey Nate Lust — did this get stuck? The review comments seem easy enough to address...

            Show
            swinbank John Swinbank added a comment - Hey Nate Lust — did this get stuck? The review comments seem easy enough to address...
            Hide
            gpdf Gregory Dubois-Felsmann added a comment -

            Perhaps my fault for not having advanced the ticket to "Reviewed" status after I posted the review on GitHub? Sorry for the oversight.

            Show
            gpdf Gregory Dubois-Felsmann added a comment - Perhaps my fault for not having advanced the ticket to "Reviewed" status after I posted the review on GitHub? Sorry for the oversight.

              People

              Assignee:
              nlust Nate Lust
              Reporter:
              gpdf Gregory Dubois-Felsmann
              Reviewers:
              Gregory Dubois-Felsmann
              Watchers:
              Gregory Dubois-Felsmann, John Swinbank, Kenny Lo, Nate Lust
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  CI Builds

                  No builds found.