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

Set default for RequireUnresolved source selector

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: meas_algorithms
    • Labels:
      None
    • Team:
      External

      Description

      Simply turning on doUnresolved does not work because there are other config parameters that need to be set.

        Attachments

          Activity

          Hide
          price Paul Price added a comment -

          Eli Rykoff, would you be willing to review this, please?

          price@pap-laptop:~/LSST/meas_algorithms (tickets/DM-15324=) $ git sub-patch
          commit 66e90cb0d72d52e7cfbc3421b290088a75d250b2 (HEAD -> tickets/DM-15324, origin/tickets/DM-15324)
          Author: Paul Price <price@astro.princeton.edu>
          Date:   Mon Aug 6 10:21:46 2018 -0400
           
              sourceSelector: set default for RequireUnresolved
              
              Now you can turn it on and it will Just Work.
           
          diff --git a/python/lsst/meas/algorithms/sourceSelector.py b/python/lsst/meas/algorithms/sourceSelector.py
          index 52971162..e8f93245 100644
          --- a/python/lsst/meas/algorithms/sourceSelector.py
          +++ b/python/lsst/meas/algorithms/sourceSelector.py
          @@ -414,6 +414,13 @@ class RequireUnresolved(BaseLimit):
               name = pexConfig.Field(dtype=str, default="base_ClassificationExtendedness_value",
                                      doc="Name of column for star/galaxy separation")
           
          +    def setDefaults(self):
          +        """Set default
          +
          +        ``base_ClassificationExtendedness_value < 0.5`` means unresolved.
          +        """
          +        self.maximum = 0.5
          +
               def apply(self, catalog):
                   """Apply the flag requirements to a catalog
           
          

          Show
          price Paul Price added a comment - Eli Rykoff , would you be willing to review this, please? price@pap-laptop:~/LSST/meas_algorithms (tickets/DM-15324=) $ git sub-patch commit 66e90cb0d72d52e7cfbc3421b290088a75d250b2 (HEAD -> tickets/DM-15324, origin/tickets/DM-15324) Author: Paul Price <price@astro.princeton.edu> Date: Mon Aug 6 10:21:46 2018 -0400   sourceSelector: set default for RequireUnresolved Now you can turn it on and it will Just Work.   diff --git a/python/lsst/meas/algorithms/sourceSelector.py b/python/lsst/meas/algorithms/sourceSelector.py index 52971162..e8f93245 100644 --- a/python/lsst/meas/algorithms/sourceSelector.py +++ b/python/lsst/meas/algorithms/sourceSelector.py @@ -414,6 +414,13 @@ class RequireUnresolved(BaseLimit): name = pexConfig.Field(dtype=str, default="base_ClassificationExtendedness_value", doc="Name of column for star/galaxy separation") + def setDefaults(self): + """Set default + + ``base_ClassificationExtendedness_value < 0.5`` means unresolved. + """ + self.maximum = 0.5 + def apply(self, catalog): """Apply the flag requirements to a catalog
          Hide
          erykoff Eli Rykoff added a comment -

          Looks good, though I assume this hasn't been Jenkins'ed yet.  But I do have one question: if your config file has maximum=None that will override this, right?  So in the way that I believe DC2 is being run, this would get overridden. (Though I don't know how they got the master config file – if it was from an extraction of all defaults I think this would fix that?)

          Show
          erykoff Eli Rykoff added a comment - Looks good, though I assume this hasn't been Jenkins'ed yet.  But I do have one question: if your config file has maximum=None that will override this, right?  So in the way that I believe DC2 is being run, this would get overridden. (Though I don't know how they got the master config file – if it was from an extraction of all defaults I think this would fix that?)
          Hide
          price Paul Price added a comment -

          Yes, if you set maximum=None, it will disable the selection. I don't know how DC2 is being run, but if the defaults are being overridden then this won't help, but that's not our fault.

          Show
          price Paul Price added a comment - Yes, if you set maximum=None , it will disable the selection. I don't know how DC2 is being run, but if the defaults are being overridden then this won't help, but that's not our fault.
          Hide
          price Paul Price added a comment -

          Jenkins died on lsst_ci in something that seems unrelated. ci_hsc passed, so I'm going to merge.

          Show
          price Paul Price added a comment - Jenkins died on lsst_ci in something that seems unrelated. ci_hsc passed, so I'm going to merge.
          Hide
          price Paul Price added a comment -

          Merged to master.

          Show
          price Paul Price added a comment - Merged to master.

            People

            Assignee:
            price Paul Price
            Reporter:
            price Paul Price
            Reviewers:
            Eli Rykoff
            Watchers:
            Eli Rykoff, Paul Price
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.