papylio.peak_finding.find_peaks_local_maximum

papylio.peak_finding.find_peaks_local_maximum#

papylio.peak_finding.find_peaks_local_maximum(image, minimum_intensity_difference=25, maximum_intensity_difference=inf, filter_neighbourhood_size_min=10, filter_neighbourhood_size_max=5)#

Find peaks based on local maxima.

Parameters:
  • image (NxM numpy.ndarray)

  • minimum_intensity_difference (int or float) – Lower threshold on the intensity difference between local minimum and local maximu

  • maximum_intensity_difference (int or float, optional) – Upper threshold on the intensity difference between local minimum and local maximum.

  • filter_neighbourhood_size_min (int) – Size of the minimum filter.

  • filter_neighbourhood_size_max (int) – Size of the maximum filter.

Returns:

Nx2 numpy.ndarray – Peak coordinates

Notes

First minimum filtered and maximum filtered images are created from the input image. Local maxima are determined by finding the pixels where the maximum filtered image is equal to the input image. Local maxima where the intensity difference between the local maximum and local minimum is outside the interval (minimum_intensity_difference, maximum_intensity_difference) are discarded.