;+ ; NAME: match_filter ; PURPOSE: ; Convolve an image with a normalized version of itself. ; ; Quick and dirty... ; ; INPUTS: ; KEYWORDS: ; OUTPUTS: ; ; HISTORY: ; Began 2005-09-05 20:00:40 by Marshall Perrin ;- function match_filter,image,thresh=thresh n = image/total(image) findmaxstar,n,mx,my sz = size(n) n = shift(n,sz[1]/2-mx,sz[2]/2-my) if n_elements(thresh) gt 0 then n >= thresh return,convolve(image,n) end