1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| x = np.array([16.80, 15.35, 17.00, 22.50, 23.50, 27.00, 27.60, 28.00, 27.15, 24.00, 20.85, 18.25, 16.20, 14.30, 16.55, 21.10, 24.00, 26.25, 27.80, 27.30, 27.05, 25.50, 23.80, 19.95, 15.60, 17.00, 19.70, 20.90, 24.00, 24.80, 26.95, 26.70, 27.40, 24.85, 22.20, 18.90, 15.80, 13.55, 17.60, 21.75, 25.00, 26.20, 26.95, 27.00, 26.35, 24.60, 21.55, 17.85, 15.60, 18.05, 18.90, 21.90, 24.35, 26.20, 26.80, 26.90, 28.05, 25.60, 22.00, 17.80, 16.20, 15.20, 17.60, 20.00, 23.75, 25.20, 27.00, 27.80, 26.90, 24.40, 21.00, 17.80, 14.00, 13.55, 19.95, 23.00, 25.15, 26.80, 27.00, 27.10, 26.80, 25.50, 22.20, 19.50, 18.00, 17.80, 18.95, 21.70, 23.40, 27.35, 28.00, 27.80, 27.20, 25.00, 22.20, 19.95, 18.95, 19.00, 20.50, 22.20, 23.35, 25.55, 27.90, 27.80, 28.00, 24.60, 22.50, 19.20, 17.70, 15.10, 16.50, 22.00, 24.00, 28.00, 28.60, 27.90, 27.00, 25.40, 23.00, 21.30, 18.50, 18.00, 19.00, 23.25, 24.25, 25.40, 28.10, 28.50, 26.70, 25.70, 22.00, 18.00, 18.00, 17.00, 18.00, 20.00, 24.05, 25.50, 27.55, 27.50, 26.60, 26.00, 23.50, 20.00])
l,Sl,Sr,Sw,r1 = specx_anal(x,x.shape[0]//3,0.1,0.1) plt.plot(l,Sl,'-b',label='Real') plt.plot(l,Sr,'--r',label='red noise') plt.plot(l,np.linspace(Sw,Sw,l.shape[0]),'--m',label='white noise') plt.legend() plt.show() print(r1)
|