Intelligent Noise Removal in Data
Here is a rough cut.  You could definitely get more elaborate on your peak testing, e.g. comparing it to neighbor peaks.  This simply makes a metric for how far the peak "sticks out" and uses a cutoff value on that and the height to select a candidate peak.

In the case of two or more  isolated peaks in your field of zeroes, it would select all of them.  Not sure that is what you want, but this works for your given example.

Once your peaks are selected, then you can zero all other data values.

Ced



        thePeak_Spot       = np.zeros(100, dtype=int )
        thePeak_Height     = np.zeros(100)
        thePeak_Protrusion = np.zeros(100)

        thePeakCount = 0

        for n in range( 1, len( data ) - 1 ) :

            theLeftDrop  = data[n] - data[n-1]
            theRightDrop = data[n] - data[n+1]

            if theLeftDrop &gt; 0 and theRightDrop &gt; 0 :
                thePeak_Spot[thePeakCount] = n
                thePeak_Height[thePeakCount] = data[n]
                thePeak_Protrusion[thePeakCount] = (theLeftDrop + theRightDrop) / ( 2.0 * data[n] )
                thePeakCount += 1

        for p in range( thePeakCount ) :
            if thePeak_Protrusion[p] &gt; 0.5 and thePeak_Height[p] &gt; 0.1 :
               print p, thePeak_Spot[p], thePeak_Height[p], thePeak_Protrusion[p]  

        plt.plot(data)
        plt.show()



output:


4 13 0.497254209953 0.695280339927
5 58 0.182008917152 1.0
6 122 0.288306083312 0.900874833979