PYME.Analysis.keep_pairs module¶
A simple utility function to look for (and keep) pairs in 2 sets of localisations.
Useful for comparing different analysis and/or detection modes on the same data. Could also be used on, e.g. beads in different colour channels.
David Baddeley 2022
- PYME.Analysis.keep_pairs.keep_pairs(x0, y0, t0, x1, y1, t1)¶
Find all localisations in (x0,y0,t0) which have a corresponding localisation in (x1,y1,t1) and return the matching pairs. Uses a simple distance metric to find pairs within a frame.
TODO: - Return indices so that additional columns etc … can be examined - Potentially change to finding nearest match without replacement. As coded it is theoretically possible
for 2 localisations in set 0 to map to a single localisation in set 1 (and vice versa), although this is expected to be rare in practive.