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

optimistic matcher may match the same reference object to more than one source

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: meas_astrom
    • Labels:
      None

      Description

      The optimistic pattern matcher in meas_astrom, adapted from hscAstrom, does not check if reference objects have been used before when finding the reference object nearest to each source. As a result the same reference object may be matched to more than one source. This should not happen.

        Attachments

          Issue Links

            Activity

            Hide
            rowen Russell Owen added a comment -

            The work is in meas_astrom on tickets/DM-2735

            I fixed the matching bug and updated the unit test accordingly.
            I also took the liberty of making some cleanups in matchOptimisticB.

            Show
            rowen Russell Owen added a comment - The work is in meas_astrom on tickets/ DM-2735 I fixed the matching bug and updated the unit test accordingly. I also took the liberty of making some cleanups in matchOptimisticB.
            Hide
            boutigny Dominique Boutigny added a comment -

            I had a careful look at the code and I don't see any coding problem.

            Regarding the algorithm itself ; if you have one reference object that could be matched to several sources, you seem to retain the fist match found and mark the reference as "used". Is it always the best choice ? Can we imagine that based on "some" criteria, the first match could be dropped and replaced by another one ?
            Note that the algorithm is complicated and I may have missed something.

            Show
            boutigny Dominique Boutigny added a comment - I had a careful look at the code and I don't see any coding problem. Regarding the algorithm itself ; if you have one reference object that could be matched to several sources, you seem to retain the fist match found and mark the reference as "used". Is it always the best choice ? Can we imagine that based on "some" criteria, the first match could be dropped and replaced by another one ? Note that the algorithm is complicated and I may have missed something.
            Hide
            rowen Russell Owen added a comment -

            Regarding picking the first match: I think it makes sense because sources and reference objects are sorted by decreasing brightness, so the brightest reference object is picked first to go with the brightest source. This is how the algorithm is described in "Fast algorithms for matching CCD images to a stellar catalogue" by Vello Tabur. It may be possible to be more clever, but I think it will suffice.

            Note: I found errors in the doc strings in matchOptimisticB.cc suggesting that the catalogs were sorted by increasing brightness. I will correct those before merging.

            Show
            rowen Russell Owen added a comment - Regarding picking the first match: I think it makes sense because sources and reference objects are sorted by decreasing brightness, so the brightest reference object is picked first to go with the brightest source. This is how the algorithm is described in "Fast algorithms for matching CCD images to a stellar catalogue" by Vello Tabur. It may be possible to be more clever, but I think it will suffice. Note: I found errors in the doc strings in matchOptimisticB.cc suggesting that the catalogs were sorted by increasing brightness. I will correct those before merging.
            Hide
            boutigny Dominique Boutigny added a comment -

            Ok, it makes sense. So it's ok for me.

            Show
            boutigny Dominique Boutigny added a comment - Ok, it makes sense. So it's ok for me.

              People

              • Assignee:
                rowen Russell Owen
                Reporter:
                rowen Russell Owen
                Reviewers:
                Dominique Boutigny
                Watchers:
                Dominique Boutigny, Russell Owen, Simon Krughoff
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel