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

Update singleFrameDriver following changes to reference catalogs

    Details

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

      Description

      The signature of ProcessCcdTask.__init__ has changed (in DM-8232 to support distinct reference catalogs). SingleFrameDriverTask.__init__ needs to be changed to match.

        Attachments

          Issue Links

            Activity

            Hide
            price Paul Price added a comment -

            Meredith Rawls, would you mind reviewing this please? I think it's fairly straight-forward.

            pprice@tiger-sumire:/tigress/pprice/cosmos/pipe_drivers (tickets/DM-8964=) $ git sub-patch
            commit 1471f4394d4afcb4f070daabce557568b126dadc
            Author: Paul Price <price@astro.princeton.edu>
            Date:   Tue Jan 10 15:15:10 2017 -0500
             
                singleFrameDriver: adapt to change to ProcessCcdTask.__init__
                
                DM-8232 added multiple reference catalogs, which necessitated a
                change to ProcessCcdTask.__init__.  This patch adapts to that
                change.
             
            diff --git a/python/lsst/pipe/drivers/singleFrameDriver.py b/python/lsst/pipe/drivers/singleFrameDriver.py
            index 5444a35..7db6413 100644
            --- a/python/lsst/pipe/drivers/singleFrameDriver.py
            +++ b/python/lsst/pipe/drivers/singleFrameDriver.py
            @@ -21,18 +21,27 @@ class SingleFrameDriverTask(BatchParallelTask):
                 _DefaultName = "singleFrameDriver"
                 RunnerClass = SingleFrameTaskRunner
             
            -    def __init__(self, butler=None, refObjLoader=None, *args, **kwargs):
            +    def __init__(self, butler=None, psfRefObjLoader=None, astromRefObjLoader=None, photoRefObjLoader=None,
            +                 *args, **kwargs):
                     """!
            +        Constructor
            +
            +        The psfRefObjLoader, astromRefObjLoader, photoRefObjLoader should
            +        be an instance of LoadReferenceObjectsTasks that supplies an external
            +        reference catalog. They may be None if the butler argument is
            +        provided or the particular reference catalog is not required.
            +
                     @param[in] butler  The butler is passed to the refObjLoader constructor in case it is
                         needed.  Ignored if the refObjLoader argument provides a loader directly.
            -        @param[in] refObjLoader  An instance of LoadReferenceObjectsTasks that supplies an
            -            external reference catalog.  May be None if the butler argument is provided or
            -            all steps requiring a reference catalog are disabled.
            +        @param[in] psfRefObjLoader  Reference catalog loader for PSF determination.
            +        @param[in] astromRefObjLoader  Reference catalog loader for astrometric calibration.
            +        @param[in] photoRefObjLoader Reference catalog loader for photometric calibration.
                     @param[in,out] kwargs  other keyword arguments for lsst.ctrl.pool.BatchParallelTask
                     """
                     BatchParallelTask.__init__(self, *args, **kwargs)
                     self.ignoreCcds = set(self.config.ignoreCcdList)
            -        self.makeSubtask("processCcd", butler=butler, refObjLoader=refObjLoader)
            +        self.makeSubtask("processCcd", butler=butler, psfRefObjLoader=psfRefObjLoader,
            +                         astromRefObjLoader=astromRefObjLoader, photoRefObjLoader=photoRefObjLoader)
             
                 @classmethod
                 def _makeArgumentParser(cls, *args, **kwargs):
            

            Show
            price Paul Price added a comment - Meredith Rawls , would you mind reviewing this please? I think it's fairly straight-forward. pprice@tiger-sumire:/tigress/pprice/cosmos/pipe_drivers (tickets/DM-8964=) $ git sub-patch commit 1471f4394d4afcb4f070daabce557568b126dadc Author: Paul Price <price@astro.princeton.edu> Date: Tue Jan 10 15:15:10 2017 -0500   singleFrameDriver: adapt to change to ProcessCcdTask.__init__ DM-8232 added multiple reference catalogs, which necessitated a change to ProcessCcdTask.__init__. This patch adapts to that change.   diff --git a/python/lsst/pipe/drivers/singleFrameDriver.py b/python/lsst/pipe/drivers/singleFrameDriver.py index 5444a35..7db6413 100644 --- a/python/lsst/pipe/drivers/singleFrameDriver.py +++ b/python/lsst/pipe/drivers/singleFrameDriver.py @@ -21,18 +21,27 @@ class SingleFrameDriverTask(BatchParallelTask): _DefaultName = "singleFrameDriver" RunnerClass = SingleFrameTaskRunner - def __init__(self, butler=None, refObjLoader=None, *args, **kwargs): + def __init__(self, butler=None, psfRefObjLoader=None, astromRefObjLoader=None, photoRefObjLoader=None, + *args, **kwargs): """! + Constructor + + The psfRefObjLoader, astromRefObjLoader, photoRefObjLoader should + be an instance of LoadReferenceObjectsTasks that supplies an external + reference catalog. They may be None if the butler argument is + provided or the particular reference catalog is not required. + @param[in] butler The butler is passed to the refObjLoader constructor in case it is needed. Ignored if the refObjLoader argument provides a loader directly. - @param[in] refObjLoader An instance of LoadReferenceObjectsTasks that supplies an - external reference catalog. May be None if the butler argument is provided or - all steps requiring a reference catalog are disabled. + @param[in] psfRefObjLoader Reference catalog loader for PSF determination. + @param[in] astromRefObjLoader Reference catalog loader for astrometric calibration. + @param[in] photoRefObjLoader Reference catalog loader for photometric calibration. @param[in,out] kwargs other keyword arguments for lsst.ctrl.pool.BatchParallelTask """ BatchParallelTask.__init__(self, *args, **kwargs) self.ignoreCcds = set(self.config.ignoreCcdList) - self.makeSubtask("processCcd", butler=butler, refObjLoader=refObjLoader) + self.makeSubtask("processCcd", butler=butler, psfRefObjLoader=psfRefObjLoader, + astromRefObjLoader=astromRefObjLoader, photoRefObjLoader=photoRefObjLoader) @classmethod def _makeArgumentParser(cls, *args, **kwargs):
            Hide
            mrawls Meredith Rawls added a comment -

            Looks good!

            Show
            mrawls Meredith Rawls added a comment - Looks good!
            Hide
            price Paul Price added a comment -

            Thanks Meredith!

            You mentioned Jenkins on the GitHub review. That's usually an excellent idea, but pipe_drivers doesn't have any tests, and it doesn't have any packages that build on it and so there's no point. I have, however, just run several HSC exposures through this so I'm confident it's working.

            Merged to master.

            Show
            price Paul Price added a comment - Thanks Meredith! You mentioned Jenkins on the GitHub review. That's usually an excellent idea, but pipe_drivers doesn't have any tests, and it doesn't have any packages that build on it and so there's no point. I have, however, just run several HSC exposures through this so I'm confident it's working. Merged to master.

              People

              • Assignee:
                price Paul Price
                Reporter:
                price Paul Price
                Reviewers:
                Meredith Rawls
                Watchers:
                Meredith Rawls, Paul Price
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel