#NEWLINE# def fingerprint( channel_samples , Fs = DEFAULT_FS , wsize = DEFAULT_WINDOW_SIZE , wratio = DEFAULT_OVERLAP_RATIO , fan_value = DEFAULT_FAN_VALUE , amp_min = DEFAULT_AMP_MIN ) : #NEWLINE# #INDENT# '\n    FFT the channel, log transform output, find local maxima, then return\n    locally sensitive hashes.\n    ' #NEWLINE# arr2D = mlab . specgram ( channel_samples , NFFT = wsize , Fs = Fs , window = mlab . window_hanning , noverlap = int ( ( arr2D * wratio ) ) ) [ 0 ] #NEWLINE# arr2D = ( 10 * np . log10 ( arr2D ) ) #NEWLINE# arr2D [ ( arr2D == ( - np . inf ) ) ] = 0 #NEWLINE# local_maxima = get_2D_peaks ( arr2D , plot = False , amp_min = amp_min ) #NEWLINE# return generate_hashes ( local_maxima , fan_value = fan_value )