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

            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.
            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.
            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
            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))
            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.
            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!

              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.