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

readFits in calibType.ptc seems to fail to read more than one table

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Story Points:
      1
    • Epic Link:
    • Team:
      Data Release Production
    • Urgent?:
      No

      Description

      While converting datasetPtc to an IsrCalib, a toTable method was added. After creating a second Table (astropy) in that method, fromTable seems to fail to read it (it read the first table fine). This was seen when trying to open a FITS file with more than one table (i.e., at least 3 HDUs) with readFits (parent class: calibType).

        Attachments

          Activity

          Hide
          plazas Andrés Alejandro Plazas Malagón added a comment -

          Looks good to me; I just left a small comment.

          Show
          plazas Andrés Alejandro Plazas Malagón added a comment - Looks good to me; I just left a small comment.
          Hide
          czw Christopher Waters added a comment -

          [Jenkins:
          https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/32786/pipeline|https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/32786/pipeline]

          Reasonably quick fix.

          Show
          czw Christopher Waters added a comment - [Jenkins: https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/32786/pipeline |https://ci.lsst.codes/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/32786/pipeline] Reasonably quick fix.
          Hide
          czw Christopher Waters added a comment -

          It looks like I originally added an error inside the try block, causing it to always except before trying to read the second extension.  This update also ensures that we loop over the extensions, so there should be no limit anymore.

          Show
          czw Christopher Waters added a comment - It looks like I originally added an error inside the try block, causing it to always except before trying to read the second extension.  This update also ensures that we loop over the extensions, so there should be no limit anymore.
          Hide
          czw Christopher Waters added a comment - - edited

          Example to reproduce:

          import lsst.ip.isr as ipIsr
          inFromText = ipIsr.CrosstalkCalib.readText("/project/czw/dataDirs/obs_decam_data/decam/crosstalk/n4/1970-01-01T00:00:00.yaml")
          inFromText.interChip
          # {'N5': array([[0.00e+00, 6.69e-05],
          #       [0.00e+00, 0.00e+00]])}
          inFromText.writeFits("/project/czw/tmp/cc.fits")
          inFromFits = ipIsr.CrosstalkCalib.readFits("/project/czw/tmp/cc.fits")
          inFromFits.interChip is None
          # True

           

          Show
          czw Christopher Waters added a comment - - edited Example to reproduce: import lsst.ip.isr as ipIsr inFromText = ipIsr.CrosstalkCalib.readText( "/project/czw/dataDirs/obs_decam_data/decam/crosstalk/n4/1970-01-01T00:00:00.yaml" ) inFromText.interChip # { 'N5' : array([[ 0 .00e+ 00 , 6 .69e- 05 ], # [ 0 .00e+ 00 , 0 .00e+ 00 ]])} inFromText.writeFits( "/project/czw/tmp/cc.fits" ) inFromFits = ipIsr.CrosstalkCalib.readFits( "/project/czw/tmp/cc.fits" ) inFromFits.interChip is None # True  

            People

            Assignee:
            czw Christopher Waters
            Reporter:
            plazas Andrés Alejandro Plazas Malagón
            Reviewers:
            Andrés Alejandro Plazas Malagón
            Watchers:
            Andrés Alejandro Plazas Malagón, Christopher Waters
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                CI Builds

                No builds found.