Skip to content

Add min_separation keyword to find_peaks to improve performance#2246

Merged
larrybradley merged 4 commits intoastropy:mainfrom
larrybradley:peakfinder-minsep
Apr 3, 2026
Merged

Add min_separation keyword to find_peaks to improve performance#2246
larrybradley merged 4 commits intoastropy:mainfrom
larrybradley:peakfinder-minsep

Conversation

@larrybradley
Copy link
Copy Markdown
Member

This PR adds a min_separation keyword to find_peaks. The implementation uses fast separable box filters and is approximately 10-400x faster than using an explicit circular footprint with scipy.ndimage.maximum_filter (depending on the radius), while producing identical results.

@larrybradley larrybradley added this to the 3.0.0 milestone Apr 3, 2026
@larrybradley larrybradley merged commit 3134fad into astropy:main Apr 3, 2026
30 of 31 checks passed
@larrybradley larrybradley deleted the peakfinder-minsep branch April 3, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant