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

VisitInfo repr() and str() should print a useful summary of contents

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Story Points:
      2
    • Sprint:
      Alert Production F17 - 11
    • Team:
      Alert Production

      Description

      The new VisitInfo object is a bit opaque from within Python: you can look at the individual components via e.g. visitInfo.darkTime and visitInfo.boresightAirmass, but print(visitInfo) is not helpful. it would be extremely useful for str() and repr() to print either the whole contents of the VisitInfo (it's not that much information), or for str() to print a useful summary and repr() the whole thing.

        Attachments

          Issue Links

            Activity

            No builds found.
            Parejkoj John Parejko created issue -
            Parejkoj John Parejko made changes -
            Field Original Value New Value
            Link This issue relates to DM-6718 [ DM-6718 ]
            Parejkoj John Parejko made changes -
            Link This issue relates to DM-5503 [ DM-5503 ]
            Hide
            Parejkoj John Parejko added a comment -

            There's a good way to implement this in pybind11, so we should think about doing so once pybind11 is fully implemented. We could add a some tests at the same time!

            Show
            Parejkoj John Parejko added a comment - There's a good way to implement this in pybind11, so we should think about doing so once pybind11 is fully implemented. We could add a some tests at the same time!
            Parejkoj John Parejko made changes -
            Link This issue is blocked by DM-7717 [ DM-7717 ]
            pschella Pim Schellart [X] (Inactive) made changes -
            Epic Link DM-9155 [ 29718 ]
            Parejkoj John Parejko made changes -
            Link This issue relates to RFC-298 [ RFC-298 ]
            pschella Pim Schellart [X] (Inactive) made changes -
            Priority Major [ 3 ] Minor [ 4 ]
            pschella Pim Schellart [X] (Inactive) made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            Parejkoj John Parejko made changes -
            Assignee John Parejko [ parejkoj ]
            Parejkoj John Parejko made changes -
            Sprint Alert Production F17 - 11 [ 644 ]
            Story Points 2
            Parejkoj John Parejko made changes -
            Watchers John Parejko, Russell Owen, Simon Krughoff [ John Parejko, Russell Owen, Simon Krughoff ] John Parejko, John Swinbank, Russell Owen, Simon Krughoff [ John Parejko, John Swinbank, Russell Owen, Simon Krughoff ]
            Hide
            Parejkoj John Parejko added a comment -

            I want something like this for debugging jointcal anyway, so I'm just going to take the time to do it right, instead of sticking cout statements in random places.

            Show
            Parejkoj John Parejko added a comment - I want something like this for debugging jointcal anyway, so I'm just going to take the time to do it right, instead of sticking cout statements in random places.
            Parejkoj John Parejko made changes -
            Status To Do [ 10001 ] In Progress [ 3 ]
            Parejkoj John Parejko made changes -
            Watchers John Parejko, John Swinbank, Russell Owen, Simon Krughoff [ John Parejko, John Swinbank, Russell Owen, Simon Krughoff ] Jim Bosch, John Parejko, John Swinbank, Russell Owen, Simon Krughoff [ Jim Bosch, John Parejko, John Swinbank, Russell Owen, Simon Krughoff ]
            Hide
            Parejkoj John Parejko added a comment -

            Russell Owen; thanks for reviewing this. It's short and sweet, and will definitely help me debug jointcal.

            Example output:

            VisitInfo(exposureId=10313423darkTime=11.02date=2037-09-20T02:24:00.000000000UT1=12345.1ERA=0.787143 radboresightRaDec=IcrsCoord(23.1000000, 73.2000000)boresightAzAlt=Coord(134.5000000, 33.3000000, 2000.00)boresightAirmass=1.73boresightRotAngle=1.27758 radrotType=1observatory=22.2W, 11.1N  0.333weather=Weather(1.1, 2.2, 34.5))
            

            Show
            Parejkoj John Parejko added a comment - Russell Owen ; thanks for reviewing this. It's short and sweet, and will definitely help me debug jointcal. Example output: VisitInfo(exposureId=10313423darkTime=11.02date=2037-09-20T02:24:00.000000000UT1=12345.1ERA=0.787143 radboresightRaDec=IcrsCoord(23.1000000, 73.2000000)boresightAzAlt=Coord(134.5000000, 33.3000000, 2000.00)boresightAirmass=1.73boresightRotAngle=1.27758 radrotType=1observatory=22.2W, 11.1N 0.333weather=Weather(1.1, 2.2, 34.5))
            Parejkoj John Parejko made changes -
            Reviewers Russell Owen [ rowen ]
            Status In Progress [ 3 ] In Review [ 10004 ]
            Hide
            Parejkoj John Parejko added a comment -
            Show
            Parejkoj John Parejko added a comment - Jenkins run: https://ci.lsst.codes/job/stack-os-matrix/26963/
            Hide
            rowen Russell Owen added a comment -

            Looks good. Thanks for the useful change. A few minor optional suggestions on github.

            Show
            rowen Russell Owen added a comment - Looks good. Thanks for the useful change. A few minor optional suggestions on github.
            rowen Russell Owen made changes -
            Status In Review [ 10004 ] Reviewed [ 10101 ]
            Hide
            Parejkoj John Parejko added a comment -

            Thanks for the quick review. I fixed both your comments. Jenkins passed.

            Merged and Done.

            Show
            Parejkoj John Parejko added a comment - Thanks for the quick review. I fixed both your comments. Jenkins passed. Merged and Done.
            Parejkoj John Parejko made changes -
            Resolution Done [ 10000 ]
            Status Reviewed [ 10101 ] Done [ 10002 ]
            swinbank John Swinbank made changes -
            Epic Link DM-9155 [ 29718 ] DM-11798 [ 34281 ]

              People

              Assignee:
              Parejkoj John Parejko
              Reporter:
              Parejkoj John Parejko
              Reviewers:
              Russell Owen
              Watchers:
              Jim Bosch, John Parejko, John Swinbank, Russell Owen, Simon Krughoff
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  CI Builds

                  No builds found.