Uploaded image for project: 'Request For Comments'
  1. Request For Comments
  2. RFC-126

Add "usesMatches" method to star selectors

    Details

    • Type: RFC
    • Status: Implemented
    • Resolution: Done
    • Component/s: DM
    • Labels:
      None

      Description

      We have a standard API for star selectors, including a selectStars method that optionally takes matches, a list of source/reference object matches. Some star selectors require this argument, whereas others ignore it (and we may eventually have selectors that use it if provided), but there is no way to tell if matches are used by querying the star selector.

      In some cases the user may have to make an extra call to obtain matches, but there is no easy way to tell if this call would be useful. for instance a new DetectAndMeasure task runs a star selector if computing aperture corrections and it will do its own matching if required.

      I propose adding a new method usesMatches() to all star selectors. It returns True if selectStars can use the matches argument and False otherwise.

      Variants I considered, but am mildly against:

      • Adding a second requiresMatches() method. I don't think it is needed, though it would allow slightly earlier error reporting (e.g. if matches are required but no matcher is provided).
      • Making usesMatches a property instead of a method. Some star selectors are C++, though admittedly they need wrapping, so a property is possible; it's just more work.

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  rowen Russell Owen
                  Reporter:
                  rowen Russell Owen
                  Watchers:
                  David Nidever [X] (Inactive), Jim Bosch, John Swinbank, Paul Price, Robert Lupton, Russell Owen, Simon Krughoff
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Planned End:

                    Summary Panel