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

create forced wrappers for algorithms

    XMLWordPrintable

    Details

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

      Description

      We have multiple algorithms in meas_base which could be used in forced mode but have no forced plugin. We should go through the algorithms we have implemented and create forced plugin wrappers for these.

        Attachments

          Activity

          Hide
          pgee Perry Gee added a comment -

          Please check that the default forced plugin list is ok.

          Shouldn't the Transformed plugins work, regardless of the Wcs comparison? Just to make it easier to use?

          Show
          pgee Perry Gee added a comment - Please check that the default forced plugin list is ok. Shouldn't the Transformed plugins work, regardless of the Wcs comparison? Just to make it easier to use?
          Hide
          pgee Perry Gee added a comment -

          Code is in u/pgee/DM-1072

          python/lsst/meas/base/forcedMeasurement.py | 14 ++++++++++----
          python/lsst/meas/base/plugins.py | 9 +++++++++
          tests/testForced.py | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
          3 files changed, 103 insertions, 8 deletions

          Show
          pgee Perry Gee added a comment - Code is in u/pgee/ DM-1072 python/lsst/meas/base/forcedMeasurement.py | 14 ++++++++++---- python/lsst/meas/base/plugins.py | 9 +++++++++ tests/testForced.py | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 103 insertions , 8 deletions
          Hide
          jbosch Jim Bosch added a comment -

          In the test code, you should probably make use of the assertClose() method on lsst.utils.tests.TestCase instead of writing your own fuzzy comparisons (it's moderately new, so I'm not surprised you hadn't seen it used before, but it's useful for exactly this sort of situation). It works on both scalars and NumPy arrays. I imagine you'll want to keep the point/shape comparison functions, but you can probably delegate to assertClose() in those as well.

          Code otherwise looks fine, but in the future it'd be somewhat better to put the bugfixes on separate commits from the new features.

          Show
          jbosch Jim Bosch added a comment - In the test code, you should probably make use of the assertClose() method on lsst.utils.tests.TestCase instead of writing your own fuzzy comparisons (it's moderately new, so I'm not surprised you hadn't seen it used before, but it's useful for exactly this sort of situation). It works on both scalars and NumPy arrays. I imagine you'll want to keep the point/shape comparison functions, but you can probably delegate to assertClose() in those as well. Code otherwise looks fine, but in the future it'd be somewhat better to put the bugfixes on separate commits from the new features.
          Hide
          pgee Perry Gee added a comment -

          I do use assertClose. However, it has slightly different functionality than my comparisons. I will look at adding changes to assertClose in the future to make my code compatibile.

          Show
          pgee Perry Gee added a comment - I do use assertClose. However, it has slightly different functionality than my comparisons. I will look at adding changes to assertClose in the future to make my code compatibile.

            People

            Assignee:
            pgee Perry Gee
            Reporter:
            jbosch Jim Bosch
            Reviewers:
            Jim Bosch
            Watchers:
            Jim Bosch, Perry Gee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.