Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib as mpl
- import numpy as np
- from scipy import signal
- array = list(map(float, input().split(" ")))
- max_skip=int(500*60/200)
- sredn=30
- amplituda=0.3
- i=0
- abc=[]
- leng=len(array)
- while i<leng:
- pod_arr=array[i:min(i+sredn, leng)]
- block=len(pod_arr)//3
- one,two,three = pod_arr[:block], pod_arr[block:block*2], pod_arr[block*2:]
- if len(one)==0 or len(two)==0 or len(three)==0:
- break
- min_1=min(one)
- max_2=max(two)
- max_2_ind=two.index(max_2) + block
- min_3=min(three)
- min_3_ind=three.index(min_3) + block * 2
- if max_2-min_1 > amplituda and max_2 - min_3 > amplituda:
- abc.append(i+max_2_ind)
- i+=min_3_ind + max_skip
- else:
- i+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement