def find_peaks_cwt(vector, widths, wavelet=None, max_distances=None, gap_thresh=None, min_length=None, min_snr=1, noise_perc=10):
 widths = np.asarray(widths)
 if (gap_thresh is None):
  gap_thresh = np.ceil(widths[0])
 if (max_distances is None):
  max_distances = (widths / 4.0)
 if (wavelet is None):
  wavelet = ricker
 cwt_dat = cwt(vector, wavelet, widths)
 ridge_lines = _identify_ridge_lines(cwt_dat, max_distances, gap_thresh)
 filtered = _filter_ridge_lines(cwt_dat, ridge_lines, min_length=min_length, min_snr=min_snr, noise_perc=noise_perc)
 max_locs = np.asarray([x[1][0] for x in filtered])
 max_locs.sort()
 return max_locs

def find_peaks_cwt ( vector , widths , wavelet = None , max_distances = None , gap_thresh = None , min_length = None , min_snr = 1 , noise_perc = 10 ) : widths = np . asarray ( widths ) if ( gap_thresh is None ) : gap_thresh = np . ceil ( widths [ 0 ] ) if ( max_distances is None ) : max_distances = ( widths / 4.0 ) if ( wavelet is None ) : wavelet = ricker cwt_dat = cwt ( vector , wavelet , widths ) ridge_lines = _identify_ridge_lines ( cwt_dat , max_distances , gap_thresh ) filtered = _filter_ridge_lines ( cwt_dat , ridge_lines , min_length = min_length , min_snr = min_snr , noise_perc = noise_perc ) max_locs = np . asarray ( [ x [ 1 ] [ 0 ] for x in filtered ] ) max_locs . sort ( ) return max_locs
attempt to find the peaks in a 1-d array .