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

writeFitsCatalogStorage calls obj.writeFits incorrectly

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: daf_persistence
    • Labels:
      None
    • Templates:
    • Story Points:
      1
    • Sprint:
      DB_S17_9
    • Team:
      Data Access and Database

      Description

      writeFitsCatalogStorage calls obj.writeFits(logLoc.locString(), flags=flags), where obj is "the object to be written". If obj is an afw.Persistable, this is an invalid call (Persistable.writeFits doesn't take flags), so I cannot persist PhotoCalibs in jointcal:

          dataRef.put(photoCalib, 'photoCalib')
        File "/home/parejkoj/lsst/lsstsw/stack/Linux64/daf_persistence/13.0-34-g674f0d6/python/lsst/daf/persistence/butlerSubset.py", line 216, in put
          self.butlerSubset.butler.put(obj, datasetType, self.dataId, doBackup=doBackup, **rest)
        File "/home/parejkoj/lsst/lsstsw/stack/Linux64/daf_persistence/13.0-34-g674f0d6/python/lsst/daf/persistence/butler.py", line 1429, in put
          location.getRepository().write(location, obj)
        File "/home/parejkoj/lsst/lsstsw/stack/Linux64/daf_persistence/13.0-34-g674f0d6/python/lsst/daf/persistence/repository.py", line 189, in write
          return butlerLocationStorage.write(butlerLocation, obj)
        File "/home/parejkoj/lsst/lsstsw/stack/Linux64/daf_persistence/13.0-34-g674f0d6/python/lsst/daf/persistence/posixStorage.py", line 264, in write
          writeFormatter(butlerLocation, obj)
        File "/home/parejkoj/lsst/lsstsw/stack/Linux64/daf_persistence/13.0-34-g674f0d6/python/lsst/daf/persistence/posixStorage.py", line 713, in writeFitsCatalogStorage
          obj.writeFits(logLoc.locString(), flags=flags)
      TypeError: writeFits(): incompatible function arguments. The following argument types are supported:
          1. (self: lsst.afw.table.io.persistable.Persistable, fileName: str, mode: str='w') -> None
          2. (self: lsst.afw.table.io.persistable.Persistable, manager: lsst.afw.fits._fits.MemFileManager, mode: str='w') -> None
       
      Invoked with: PhotoCalib(spatially constant with mean: 7.30334e+12 err: 2.15887e+09), '/home/parejkoj/lsst/jointcal/jointcal/tests/.test/JointcalTestCFHTMinimal/run/jointcal-results/06AL01/D3/2006-05-20/r/0/photoCalib-849375-12.fits_mcaoaru'; kwargs: flags=0
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                npease Nate Pease
                Reporter:
                Parejkoj John Parejko
                Reviewers:
                John Parejko
                Watchers:
                John Parejko, John Swinbank, Nate Pease, Paul Price
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel