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

Add "usesMatches" method to star selectors


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


      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.


          Container Issues

            Issue Links



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


                  • Created:
                    Planned End:

                    Summary Panel