There is an array of data of this type 
It is necessary to find the average view of all peaks, i.e. determine the peaks in the data array, write each peak into a separate list, and then calculate the average value of each corresponding point of all peaks.
i=7800 peak=[] while i<8249: i=i+1 if massiv[i]>0.02: peak.append(float(massiv[i])) So far, I have only selected all elements from the initial array more than a certain number (for a start, 0.02)
then on the data table looked at the boundaries of the peaks and wrote down four of them. then calculated the average value of the corresponding points. however, the peaks have different widths, so I took only the first 7 points along the minimum width of the peak
peak1=peak[0:12] peak2=peak[13:22] peak3=peak[23:31] peak4=peak[32:42] i=-1 peakmid=[] while i<7: i=i+1 peakmid.append((peak1[i]+peak2[i]+peak3[i]+peak4[i])/4) plt.plot(peakmid) plt.show() That's about what should work.
