soft-matter/trackpy — pull request #85 by danielballan (2014-02-15 13:06:49+00:00)
Title: Secondary maxima

This saves about 40% of the time for images of any size at this density. I will test one or two other densities before I merge.

Other advantages:
* No more C extensions at all!
* Simpler code in general
* Better accuracy. Following the Crocker code, I swept a mask along the image, eliminating duplicates, effectively biasing toward the lower-right-hand edge of any flat peaks. You can see in the subpixel distribution histograms: it's a gentle effect, but it's there.

Before:

1x: Find local_maxima only
1 loops, best of 3: 276 ms per loop
10x: Find local_maxima only
1 loops, best of 3: 2.69 s per loop
~0.1x: Find local_maxima only
10 loops, best of 3: 45 ms per loop

After:

1x: Find local_maxima only
10 loops, best of 3: 166 ms per loop
10x: Find local_maxima only
1 loops, best of 3: 1.63 s per loop
~0.1x: Find local_maxima only
10 loops, best of 3: 26 ms per loop