comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: yet another 2d matching question

Re: yet another 2d matching question
type: item
description: On Jul 30, 10:01 am, Gray <grayliketheco...@gmail.com> wrote: > Hi all, > > For quite a while I've been using JD Smith's match_2d routine to match > xy coords between lists. However, this and all the other matching > codes I've seen out there suffer from a variation of the uniqueness of > matches problem. > > Codes like SRCOR in the NASA IDL library let you specify a one-to-one > match, i.e. enforcing that each element in list 2 only be matched to > one element in list 1; using match_2d's match_distance keyword one > could implement the same effect oneself. However, while that excludes > multiple matches to the same element, it's all done after the fact, > after the original match was determined. > > What I'm looking for is an algorithm that matches 2 lists, identifies > multiple-matches, and then looks for additional matches within the > search radius for elements which would become unmatched after > enforcing a one-to-one relationship. What I mean is, say element 0 in > list 2 is matched to both element 3 and element 5 in list 1, and that > the distance between 2_0 and 1_3 is smaller than the distance between > 2_0 and 1_5. In that case, 1_5 would become unmatched; but what if > there is element 2_1 which is also within the search radius of 1_5? > Then, 1_5 should be re-matched with 2_1. > > My best idea thus far is to run match_2d once, identify multiple- > matches, keep the matches with minimum distance using match_distance, > then iterate with the remaining elements until match_2d returns no > matches. Can anyone come up with a better solution? Hmmm... what about starting with first point (a) in list 1, finding the nearest point (b) to (a) in list 2, removing (b) from list 2 and repeat for all points in list 1? [this assumes list 1 and list 2 have the same number of elements N, which is a necessary condition for a one-to-one matching]. With some smart partitioning of list 1 it will take ~log(N) to find the nearest point, so we are looking at ~ N log(N) operatio…
creator: pgrigis
date: 2010-07-30T15:15:22-00:00

Re: yet another 2d matching question
type: item
description: On Jul 30, 11:15 am, Paolo <pgri...@gmail.com> wrote: > On Jul 30, 10:01 am, Gray <grayliketheco...@gmail.com> wrote: > > > > > >> Hi all, > >> For quite a while I've been using JD Smith's match_2d routine to match >> xy coords between lists. However, this and all the other matching >> codes I've seen out there suffer from a variation of the uniqueness of >> matches problem. > >> Codes like SRCOR in the NASA IDL library let you specify a one-to-one >> match, i.e. enforcing that each element in list 2 only be matched to >> one element in list 1; using match_2d's match_distance keyword one >> could implement the same effect oneself. However, while that excludes >> multiple matches to the same element, it's all done after the fact, >> after the original match was determined. > >> What I'm looking for is an algorithm that matches 2 lists, identifies >> multiple-matches, and then looks for additional matches within the >> search radius for elements which would become unmatched after >> enforcing a one-to-one relationship. What I mean is, say element 0 in >> list 2 is matched to both element 3 and element 5 in list 1, and that >> the distance between 2_0 and 1_3 is smaller than the distance between >> 2_0 and 1_5. In that case, 1_5 would become unmatched; but what if >> there is element 2_1 which is also within the search radius of 1_5? >> Then, 1_5 should be re-matched with 2_1. > >> My best idea thus far is to run match_2d once, identify multiple- >> matches, keep the matches with minimum distance using match_distance, >> then iterate with the remaining elements until match_2d returns no >> matches. Can anyone come up with a better solution? > > Hmmm... what about starting with first point (a) in list 1, finding > the nearest > point (b) to (a) in list 2, removing (b) from list 2 and repeat for > all points > in list 1? [this assumes list 1 and list 2 have the same number of > elements N, > which is a necessary condition for a one-to-one matching]. > > With some smart p…
creator: Gray
date: 2010-07-30T15:23:51-00:00

Re: yet another 2d matching question
type: item
description: On Jul 30, 11:23 am, Gray <grayliketheco...@gmail.com> wrote: > On Jul 30, 11:15 am, Paolo <pgri...@gmail.com> wrote: > > > > > >> On Jul 30, 10:01 am, Gray <grayliketheco...@gmail.com> wrote: > >>> Hi all, > >>> For quite a while I've been using JD Smith's match_2d routine to match >>> xy coords between lists. However, this and all the other matching >>> codes I've seen out there suffer from a variation of the uniqueness of >>> matches problem. > >>> Codes like SRCOR in the NASA IDL library let you specify a one-to-one >>> match, i.e. enforcing that each element in list 2 only be matched to >>> one element in list 1; using match_2d's match_distance keyword one >>> could implement the same effect oneself. However, while that excludes >>> multiple matches to the same element, it's all done after the fact, >>> after the original match was determined. > >>> What I'm looking for is an algorithm that matches 2 lists, identifies >>> multiple-matches, and then looks for additional matches within the >>> search radius for elements which would become unmatched after >>> enforcing a one-to-one relationship. What I mean is, say element 0 in >>> list 2 is matched to both element 3 and element 5 in list 1, and that >>> the distance between 2_0 and 1_3 is smaller than the distance between >>> 2_0 and 1_5. In that case, 1_5 would become unmatched; but what if >>> there is element 2_1 which is also within the search radius of 1_5? >>> Then, 1_5 should be re-matched with 2_1. > >>> My best idea thus far is to run match_2d once, identify multiple- >>> matches, keep the matches with minimum distance using match_distance, >>> then iterate with the remaining elements until match_2d returns no >>> matches. Can anyone come up with a better solution? > >> Hmmm... what about starting with first point (a) in list 1, finding >> the nearest >> point (b) to (a) in list 2, removing (b) from list 2 and repeat for >> all points >> in list 1? [this assumes list 1 and list 2 have the same number of …
creator: Gray
date: 2010-07-30T15:25:15-00:00

Re: yet another 2d matching question
type: item
description: On Jul 30, 11:25 am, Gray <grayliketheco...@gmail.com> wrote: > On Jul 30, 11:23 am, Gray <grayliketheco...@gmail.com> wrote: > > > >> On Jul 30, 11:15 am, Paolo <pgri...@gmail.com> wrote: > >>> On Jul 30, 10:01 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> Hi all, > >>>> For quite a while I've been using JD Smith's match_2d routine to match >>>> xy coords between lists. However, this and all the other matching >>>> codes I've seen out there suffer from a variation of the uniqueness of >>>> matches problem. > >>>> Codes like SRCOR in the NASA IDL library let you specify a one-to-one >>>> match, i.e. enforcing that each element in list 2 only be matched to >>>> one element in list 1; using match_2d's match_distance keyword one >>>> could implement the same effect oneself. However, while that excludes >>>> multiple matches to the same element, it's all done after the fact, >>>> after the original match was determined. > >>>> What I'm looking for is an algorithm that matches 2 lists, identifies >>>> multiple-matches, and then looks for additional matches within the >>>> search radius for elements which would become unmatched after >>>> enforcing a one-to-one relationship. What I mean is, say element 0 in >>>> list 2 is matched to both element 3 and element 5 in list 1, and that >>>> the distance between 2_0 and 1_3 is smaller than the distance between >>>> 2_0 and 1_5. In that case, 1_5 would become unmatched; but what if >>>> there is element 2_1 which is also within the search radius of 1_5? >>>> Then, 1_5 should be re-matched with 2_1. > >>>> My best idea thus far is to run match_2d once, identify multiple- >>>> matches, keep the matches with minimum distance using match_distance, >>>> then iterate with the remaining elements until match_2d returns no >>>> matches. Can anyone come up with a better solution? > >>> Hmmm... what about starting with first point (a) in list 1, finding >>> the nearest >>> point (b) to (a) in list 2, removing (b) from list 2 and repe…
creator: pgrigis
date: 2010-07-30T15:41:04-00:00

Re: yet another 2d matching question
type: item
description: On Jul 30, 11:25 am, Gray <grayliketheco...@gmail.com> wrote: > On Jul 30, 11:23 am, Gray <grayliketheco...@gmail.com> wrote: > > > > > >> On Jul 30, 11:15 am, Paolo <pgri...@gmail.com> wrote: > >>> On Jul 30, 10:01 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> Hi all, > >>>> For quite a while I've been using JD Smith's match_2d routine to match >>>> xy coords between lists. However, this and all the other matching >>>> codes I've seen out there suffer from a variation of the uniqueness of >>>> matches problem. > >>>> Codes like SRCOR in the NASA IDL library let you specify a one-to-one >>>> match, i.e. enforcing that each element in list 2 only be matched to >>>> one element in list 1; using match_2d's match_distance keyword one >>>> could implement the same effect oneself. However, while that excludes >>>> multiple matches to the same element, it's all done after the fact, >>>> after the original match was determined. > >>>> What I'm looking for is an algorithm that matches 2 lists, identifies >>>> multiple-matches, and then looks for additional matches within the >>>> search radius for elements which would become unmatched after >>>> enforcing a one-to-one relationship. What I mean is, say element 0 in >>>> list 2 is matched to both element 3 and element 5 in list 1, and that >>>> the distance between 2_0 and 1_3 is smaller than the distance between >>>> 2_0 and 1_5. In that case, 1_5 would become unmatched; but what if >>>> there is element 2_1 which is also within the search radius of 1_5? >>>> Then, 1_5 should be re-matched with 2_1. > >>>> My best idea thus far is to run match_2d once, identify multiple- >>>> matches, keep the matches with minimum distance using match_distance, >>>> then iterate with the remaining elements until match_2d returns no >>>> matches. Can anyone come up with a better solution? > >>> Hmmm... what about starting with first point (a) in list 1, finding >>> the nearest >>> point (b) to (a) in list 2, removing (b) from list 2 and …
creator: Gray
date: 2010-07-30T15:41:33-00:00

Re: yet another 2d matching question
type: item
description: On Jul 30, 11:41 am, Gray <grayliketheco...@gmail.com> wrote: > On Jul 30, 11:25 am, Gray <grayliketheco...@gmail.com> wrote: > > > >> On Jul 30, 11:23 am, Gray <grayliketheco...@gmail.com> wrote: > >>> On Jul 30, 11:15 am, Paolo <pgri...@gmail.com> wrote: > >>>> On Jul 30, 10:01 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > Hi all, > >>>> > For quite a while I've been using JD Smith's match_2d routine to match >>>> > xy coords between lists. However, this and all the other matching >>>> > codes I've seen out there suffer from a variation of the uniqueness of >>>> > matches problem. > >>>> > Codes like SRCOR in the NASA IDL library let you specify a one-to-one >>>> > match, i.e. enforcing that each element in list 2 only be matched to >>>> > one element in list 1; using match_2d's match_distance keyword one >>>> > could implement the same effect oneself. However, while that excludes >>>> > multiple matches to the same element, it's all done after the fact, >>>> > after the original match was determined. > >>>> > What I'm looking for is an algorithm that matches 2 lists, identifies >>>> > multiple-matches, and then looks for additional matches within the >>>> > search radius for elements which would become unmatched after >>>> > enforcing a one-to-one relationship. What I mean is, say element 0 in >>>> > list 2 is matched to both element 3 and element 5 in list 1, and that >>>> > the distance between 2_0 and 1_3 is smaller than the distance between >>>> > 2_0 and 1_5. In that case, 1_5 would become unmatched; but what if >>>> > there is element 2_1 which is also within the search radius of 1_5? >>>> > Then, 1_5 should be re-matched with 2_1. > >>>> > My best idea thus far is to run match_2d once, identify multiple- >>>> > matches, keep the matches with minimum distance using match_distance, >>>> > then iterate with the remaining elements until match_2d returns no >>>> > matches. Can anyone come up with a better solution? > >>>> Hmmm... what about starting wit…
creator: pgrigis
date: 2010-07-30T15:59:35-00:00

Re: yet another 2d matching question
type: item
description: On Jul 30, 11:59 am, Paolo <pgri...@gmail.com> wrote: > On Jul 30, 11:41 am, Gray <grayliketheco...@gmail.com> wrote: > > > > > >> On Jul 30, 11:25 am, Gray <grayliketheco...@gmail.com> wrote: > >>> On Jul 30, 11:23 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> On Jul 30, 11:15 am, Paolo <pgri...@gmail.com> wrote: > >>>> > On Jul 30, 10:01 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > Hi all, > >>>> > > For quite a while I've been using JD Smith's match_2d routine to match >>>> > > xy coords between lists. However, this and all the other matching >>>> > > codes I've seen out there suffer from a variation of the uniqueness of >>>> > > matches problem. > >>>> > > Codes like SRCOR in the NASA IDL library let you specify a one-to-one >>>> > > match, i.e. enforcing that each element in list 2 only be matched to >>>> > > one element in list 1; using match_2d's match_distance keyword one >>>> > > could implement the same effect oneself. However, while that excludes >>>> > > multiple matches to the same element, it's all done after the fact, >>>> > > after the original match was determined. > >>>> > > What I'm looking for is an algorithm that matches 2 lists, identifies >>>> > > multiple-matches, and then looks for additional matches within the >>>> > > search radius for elements which would become unmatched after >>>> > > enforcing a one-to-one relationship. What I mean is, say element 0 in >>>> > > list 2 is matched to both element 3 and element 5 in list 1, and that >>>> > > the distance between 2_0 and 1_3 is smaller than the distance between >>>> > > 2_0 and 1_5. In that case, 1_5 would become unmatched; but what if >>>> > > there is element 2_1 which is also within the search radius of 1_5? >>>> > > Then, 1_5 should be re-matched with 2_1. > >>>> > > My best idea thus far is to run match_2d once, identify multiple- >>>> > > matches, keep the matches with minimum distance using match_distance, >>>> > > then iterate with the remaining elements until matc…
creator: Gray
date: 2010-07-30T16:06:35-00:00

Re: yet another 2d matching question
type: item
description: On Jul 30, 12:06 pm, Gray <grayliketheco...@gmail.com> wrote: > On Jul 30, 11:59 am, Paolo <pgri...@gmail.com> wrote: > > > >> On Jul 30, 11:41 am, Gray <grayliketheco...@gmail.com> wrote: > >>> On Jul 30, 11:25 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> On Jul 30, 11:23 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > On Jul 30, 11:15 am, Paolo <pgri...@gmail.com> wrote: > >>>> > > On Jul 30, 10:01 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > > Hi all, > >>>> > > > For quite a while I've been using JD Smith's match_2d routine to match >>>> > > > xy coords between lists. However, this and all the other matching >>>> > > > codes I've seen out there suffer from a variation of the uniqueness of >>>> > > > matches problem. > >>>> > > > Codes like SRCOR in the NASA IDL library let you specify a one-to-one >>>> > > > match, i.e. enforcing that each element in list 2 only be matched to >>>> > > > one element in list 1; using match_2d's match_distance keyword one >>>> > > > could implement the same effect oneself. However, while that excludes >>>> > > > multiple matches to the same element, it's all done after the fact, >>>> > > > after the original match was determined. > >>>> > > > What I'm looking for is an algorithm that matches 2 lists, identifies >>>> > > > multiple-matches, and then looks for additional matches within the >>>> > > > search radius for elements which would become unmatched after >>>> > > > enforcing a one-to-one relationship. What I mean is, say element 0 in >>>> > > > list 2 is matched to both element 3 and element 5 in list 1, and that >>>> > > > the distance between 2_0 and 1_3 is smaller than the distance between >>>> > > > 2_0 and 1_5. In that case, 1_5 would become unmatched; but what if >>>> > > > there is element 2_1 which is also within the search radius of 1_5? >>>> > > > Then, 1_5 should be re-matched with 2_1. > >>>> > > > My best idea thus far is to run match_2d once, identify multiple- >>>> > > > matches, keep the…
creator: pgrigis
date: 2010-07-30T16:12:24-00:00

Re: yet another 2d matching question
type: item
description: On Jul 30, 12:12 pm, Paolo <pgri...@gmail.com> wrote: > On Jul 30, 12:06 pm, Gray <grayliketheco...@gmail.com> wrote: > > > > > >> On Jul 30, 11:59 am, Paolo <pgri...@gmail.com> wrote: > >>> On Jul 30, 11:41 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> On Jul 30, 11:25 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > On Jul 30, 11:23 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > On Jul 30, 11:15 am, Paolo <pgri...@gmail.com> wrote: > >>>> > > > On Jul 30, 10:01 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > > > Hi all, > >>>> > > > > For quite a while I've been using JD Smith's match_2d routine to match >>>> > > > > xy coords between lists. However, this and all the other matching >>>> > > > > codes I've seen out there suffer from a variation of the uniqueness of >>>> > > > > matches problem. > >>>> > > > > Codes like SRCOR in the NASA IDL library let you specify a one-to-one >>>> > > > > match, i.e. enforcing that each element in list 2 only be matched to >>>> > > > > one element in list 1; using match_2d's match_distance keyword one >>>> > > > > could implement the same effect oneself. However, while that excludes >>>> > > > > multiple matches to the same element, it's all done after the fact, >>>> > > > > after the original match was determined. > >>>> > > > > What I'm looking for is an algorithm that matches 2 lists, identifies >>>> > > > > multiple-matches, and then looks for additional matches within the >>>> > > > > search radius for elements which would become unmatched after >>>> > > > > enforcing a one-to-one relationship. What I mean is, say element 0 in >>>> > > > > list 2 is matched to both element 3 and element 5 in list 1, and that >>>> > > > > the distance between 2_0 and 1_3 is smaller than the distance between >>>> > > > > 2_0 and 1_5. In that case, 1_5 would become unmatched; but what if >>>> > > > > there is element 2_1 which is also within the search radius of 1_5? >>>> > > > > Then, 1_5 should be re-matched with 2…
creator: Gray
date: 2010-07-30T17:09:30-00:00

Re: yet another 2d matching question
type: item
description: On Jul 30, 1:09 pm, Gray <grayliketheco...@gmail.com> wrote: > On Jul 30, 12:12 pm, Paolo <pgri...@gmail.com> wrote: > > > > > >> On Jul 30, 12:06 pm, Gray <grayliketheco...@gmail.com> wrote: > >>> On Jul 30, 11:59 am, Paolo <pgri...@gmail.com> wrote: > >>>> On Jul 30, 11:41 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > On Jul 30, 11:25 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > On Jul 30, 11:23 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > > On Jul 30, 11:15 am, Paolo <pgri...@gmail.com> wrote: > >>>> > > > > On Jul 30, 10:01 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > > > > Hi all, > >>>> > > > > > For quite a while I've been using JD Smith's match_2d routine to match >>>> > > > > > xy coords between lists. However, this and all the other matching >>>> > > > > > codes I've seen out there suffer from a variation of the uniqueness of >>>> > > > > > matches problem. > >>>> > > > > > Codes like SRCOR in the NASA IDL library let you specify a one-to-one >>>> > > > > > match, i.e. enforcing that each element in list 2 only be matched to >>>> > > > > > one element in list 1; using match_2d's match_distance keyword one >>>> > > > > > could implement the same effect oneself. However, while that excludes >>>> > > > > > multiple matches to the same element, it's all done after the fact, >>>> > > > > > after the original match was determined. > >>>> > > > > > What I'm looking for is an algorithm that matches 2 lists, identifies >>>> > > > > > multiple-matches, and then looks for additional matches within the >>>> > > > > > search radius for elements which would become unmatched after >>>> > > > > > enforcing a one-to-one relationship. What I mean is, say element 0 in >>>> > > > > > list 2 is matched to both element 3 and element 5 in list 1, and that >>>> > > > > > the distance between 2_0 and 1_3 is smaller than the distance between >>>> > > > > > 2_0 and 1_5. In that case, 1_5 would become unmatched; but what if >>>> > > > > > ther…
creator: Gray
date: 2010-07-30T17:21:00-00:00

Re: yet another 2d matching question
type: item
description: On Jul 30, 1:21 pm, Gray <grayliketheco...@gmail.com> wrote: > On Jul 30, 1:09 pm, Gray <grayliketheco...@gmail.com> wrote: > > > >> On Jul 30, 12:12 pm, Paolo <pgri...@gmail.com> wrote: > >>> On Jul 30, 12:06 pm, Gray <grayliketheco...@gmail.com> wrote: > >>>> On Jul 30, 11:59 am, Paolo <pgri...@gmail.com> wrote: > >>>> > On Jul 30, 11:41 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > On Jul 30, 11:25 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > > On Jul 30, 11:23 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > > > On Jul 30, 11:15 am, Paolo <pgri...@gmail.com> wrote: > >>>> > > > > > On Jul 30, 10:01 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > > > > > Hi all, > >>>> > > > > > > For quite a while I've been using JD Smith's match_2d routine to match >>>> > > > > > > xy coords between lists. However, this and all the other matching >>>> > > > > > > codes I've seen out there suffer from a variation of the uniqueness of >>>> > > > > > > matches problem. > >>>> > > > > > > Codes like SRCOR in the NASA IDL library let you specify a one-to-one >>>> > > > > > > match, i.e. enforcing that each element in list 2 only be matched to >>>> > > > > > > one element in list 1; using match_2d's match_distance keyword one >>>> > > > > > > could implement the same effect oneself. However, while that excludes >>>> > > > > > > multiple matches to the same element, it's all done after the fact, >>>> > > > > > > after the original match was determined. > >>>> > > > > > > What I'm looking for is an algorithm that matches 2 lists, identifies >>>> > > > > > > multiple-matches, and then looks for additional matches within the >>>> > > > > > > search radius for elements which would become unmatched after >>>> > > > > > > enforcing a one-to-one relationship. What I mean is, say element 0 in >>>> > > > > > > list 2 is matched to both element 3 and element 5 in list 1, and that >>>> > > > > > > the distance between 2_0 and 1_3 is smaller than the distance b…
creator: pgrigis
date: 2010-07-30T18:13:19-00:00

Re: yet another 2d matching question
type: item
description: Paulo spotted the issue. What determines whether a given point in the search list "is not matched to a closer point"? Your 1-to-1 match will be sensitive to the input ordering of the target list. The intention of match_radius is to specify the maximum separation beneath which all matches are "equally good". For example, the statistical uncertainty in the position itself. Multiple matches would then imply either is an equally good match. If you still wanted to do this (for example if you are conducting a match for which sub-match_distance separations are still meaningful), it will have to be a pre- or post- processing step, since all matches are performed in parallel (which is what gives MATCH_2D its speed). JD
creator: JDS
date: 2010-07-30T22:23:27-00:00

Re: yet another 2d matching question
type: item
description: On Jul 30, 2:13 pm, Paolo <pgri...@gmail.com> wrote: > On Jul 30, 1:21 pm, Gray <grayliketheco...@gmail.com> wrote: > > > > > >> On Jul 30, 1:09 pm, Gray <grayliketheco...@gmail.com> wrote: > >>> On Jul 30, 12:12 pm, Paolo <pgri...@gmail.com> wrote: > >>>> On Jul 30, 12:06 pm, Gray <grayliketheco...@gmail.com> wrote: > >>>> > On Jul 30, 11:59 am, Paolo <pgri...@gmail.com> wrote: > >>>> > > On Jul 30, 11:41 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > > On Jul 30, 11:25 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > > > On Jul 30, 11:23 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > > > > On Jul 30, 11:15 am, Paolo <pgri...@gmail.com> wrote: > >>>> > > > > > > On Jul 30, 10:01 am, Gray <grayliketheco...@gmail.com> wrote: > >>>> > > > > > > > Hi all, > >>>> > > > > > > > For quite a while I've been using JD Smith's match_2d routine to match >>>> > > > > > > > xy coords between lists. However, this and all the other matching >>>> > > > > > > > codes I've seen out there suffer from a variation of the uniqueness of >>>> > > > > > > > matches problem. > >>>> > > > > > > > Codes like SRCOR in the NASA IDL library let you specify a one-to-one >>>> > > > > > > > match, i.e. enforcing that each element in list 2 only be matched to >>>> > > > > > > > one element in list 1; using match_2d's match_distance keyword one >>>> > > > > > > > could implement the same effect oneself. However, while that excludes >>>> > > > > > > > multiple matches to the same element, it's all done after the fact, >>>> > > > > > > > after the original match was determined. > >>>> > > > > > > > What I'm looking for is an algorithm that matches 2 lists, identifies >>>> > > > > > > > multiple-matches, and then looks for additional matches within the >>>> > > > > > > > search radius for elements which would become unmatched after >>>> > > > > > > > enforcing a one-to-one relationship. What I mean is, say element 0 in >>>> > > > > > > > list 2 is matched to both element 3 and el…
creator: Gray
date: 2010-07-31T11:42:05-00:00

Re: yet another 2d matching question
type: item
description: On Jul 30, 6:23 pm, JD Smith <jdtsmith.nos...@yahoo.com> wrote: > Paulo spotted the issue. What determines whether a given point in the > search list "is not matched to a closer point"? Your 1-to-1 match > will be sensitive to the input ordering of the target list. The > intention of match_radius is to specify the maximum separation beneath > which all matches are "equally good". For example, the statistical > uncertainty in the position itself. Multiple matches would then imply > either is an equally good match. If you still wanted to do this (for > example if you are conducting a match for which sub-match_distance > separations are still meaningful), it will have to be a pre- or post- > processing step, since all matches are performed in parallel (which is > what gives MATCH_2D its speed). > > JD Hmm... if all matches are equally good within the match_distance, then how does match_2d prioritize matches when there is more than one source in list b within the match radius of list a? This could happen when, for example, the positional accuracy of the sources in each list is low, but there is a possible shift (translation+rotation+etc.) between the members of the two lists which necessitates a larger match radius.
creator: Gray
date: 2010-07-31T11:47:14-00:00

Re: yet another 2d matching question
type: item
description: On Jul 31, 7:47 am, Gray <grayliketheco...@gmail.com> wrote: > On Jul 30, 6:23 pm, JD Smith <jdtsmith.nos...@yahoo.com> wrote: > >> Paulo spotted the issue. What determines whether a given point in the >> search list "is not matched to a closer point"? Your 1-to-1 match >> will be sensitive to the input ordering of the target list. The >> intention of match_radius is to specify the maximum separation beneath >> which all matches are "equally good". For example, the statistical >> uncertainty in the position itself. Multiple matches would then imply >> either is an equally good match. If you still wanted to do this (for >> example if you are conducting a match for which sub-match_distance >> separations are still meaningful), it will have to be a pre- or post- >> processing step, since all matches are performed in parallel (which is >> what gives MATCH_2D its speed). > >> JD > > Hmm... if all matches are equally good within the match_distance, then > how does match_2d prioritize matches when there is more than one > source in list b within the match radius of list a? This could happen > when, for example, the positional accuracy of the sources in each list > is low, but there is a possible shift (translation+rotation+etc.) > between the members of the two lists which necessitates a larger match > radius. I mean the positional accuracy is HIGH. The UNCERTAINTY in the positions is LOW.
creator: Gray
date: 2010-07-31T11:48:12-00:00

Re: yet another 2d matching question
type: item
description: On Jul 31, 7:47 am, Gray <grayliketheco...@gmail.com> wrote: > On Jul 30, 6:23 pm, JD Smith <jdtsmith.nos...@yahoo.com> wrote: > >> Paulo spotted the issue. What determines whether a given point in the >> search list "is not matched to a closer point"? Your 1-to-1 match >> will be sensitive to the input ordering of the target list. The >> intention of match_radius is to specify the maximum separation beneath >> which all matches are "equally good". For example, the statistical >> uncertainty in the position itself. Multiple matches would then imply >> either is an equally good match. If you still wanted to do this (for >> example if you are conducting a match for which sub-match_distance >> separations are still meaningful), it will have to be a pre- or post- >> processing step, since all matches are performed in parallel (which is >> what gives MATCH_2D its speed). > >> JD > > Hmm... if all matches are equally good within the match_distance, then > how does match_2d prioritize matches when there is more than one > source in list b within the match radius of list a? This could happen > when, for example, the positional accuracy of the sources in each list > is low, but there is a possible shift (translation+rotation+etc.) > between the members of the two lists which necessitates a larger match > radius. This is only true if your match_distance represents some positional uncertainty; i.e. it's not meaningful to say a given star is 50 milliarseconds closer when the precision with which you know your search list is 2 arcseconds. It does simply return the closest point within match_distance if there are multiple matches. You could certainly alter this to return *all* matches within match_radius, then use post-processing to enforce a 1-to-1 matching. IDL 8's new LIST type would make this much easier than before (when I've used REVERSE_INDEX style arrays for the same purpose). JD
creator: JDS
date: 2010-08-03T20:53:03-00:00