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

patchInfo.getIndex() returns the second index with a float instead of an int

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: skymap
    • Labels:
      None

      Description

      Lauren MacArthur and Simon Krughoff report the following unexpected behavior:

      In [15]: skymap = butlerGen3.get("skyMap")
      In [16]: tractInfo = skymap.generateTract(9813)
      In [19]: tractInfo.getPatchIndexPair(33)
      Out[19]: (5, 4.0)
      

      (the final tuple should be ints)

      This is because of a bug here: https://github.com/lsst/skymap/blob/65b481455761ef12cb9518a3aa7bccbbc3713f14/python/lsst/skymap/tractInfo.py#L200 where the / should be //.

        Attachments

          Activity

          Hide
          lauren Lauren MacArthur added a comment -

          Et voilĂ :

          In [10]: rootDirGen3 = "/repo/dc2"
          In [11]: butlerGen3 = Butler(rootDirGen3, collections=["2.2i/runs/DP0.1", "2.2i/calib"], instrument="LSSTCam-imSim")
          In [12]: skymap = butlerGen3.get("skyMap")
          In [13]: tractInfo = skymap[9813]
          In [14]: patch = tractInfo[33]
          In [15]: patch.getIndex()
          Out[15]: (5, 4)
          

          Show
          lauren Lauren MacArthur added a comment - Et voilĂ : In [ 10 ]: rootDirGen3 = "/repo/dc2" In [ 11 ]: butlerGen3 = Butler(rootDirGen3, collections = [ "2.2i/runs/DP0.1" , "2.2i/calib" ], instrument = "LSSTCam-imSim" ) In [ 12 ]: skymap = butlerGen3.get( "skyMap" ) In [ 13 ]: tractInfo = skymap[ 9813 ] In [ 14 ]: patch = tractInfo[ 33 ] In [ 15 ]: patch.getIndex() Out[ 15 ]: ( 5 , 4 )
          Hide
          lauren Lauren MacArthur added a comment -

          Always a good idea to fire off a Jenkins run, but otherwise LGTM!

          Show
          lauren Lauren MacArthur added a comment - Always a good idea to fire off a Jenkins run, but otherwise LGTM!
          Show
          erykoff Eli Rykoff added a comment - Thanks! Jenkins is chugging along here: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/34559/pipeline

            People

            Assignee:
            erykoff Eli Rykoff
            Reporter:
            erykoff Eli Rykoff
            Reviewers:
            Lauren MacArthur
            Watchers:
            Eli Rykoff, Lauren MacArthur
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.