Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from scipy import signal
- x = [0.49, 0.58, 0.49, 0.29, 0.1, -0.19, -0.35, -0.39, -0.29, -0.15, 0.2,
- 0.49, 0.68, 0.83, 0.78, 0.59, 0.29, -0.1, -0.43, -0.79, -0.92, -0.93,
- -0.73, -0.44, -0.05, 0.24, 0.59, 0.63, 0.64, 0.39, 0.05, -0.25, -0.58,
- -0.78, -0.79, -0.68, -0.39, -0.05, 0.29, 0.59, 0.68, 0.74, 0.58, 0.34,
- 0.0, -0.24, -0.49, -0.58, -0.54, -0.34, -0.05, 0.29, 0.49, 0.63, 0.64,
- 0.44, 0.14, -0.29, -0.58, -0.93, -1.03, -0.97, -0.69, -0.39, 0.05, 0.49,
- 0.73, 0.88, 0.88, 0.68, 0.34, -0.04, -0.4, -0.58, -0.73, -0.64, -0.44,
- -0.14, 0.24, 0.44, 0.68, 0.64, 0.58, 0.3, 0.05, -0.3, -0.53, -0.59,
- -0.59, -0.34, -0.14, 0.19, 0.39, 0.49, 0.49, 0.34, 0.05, -0.29, -0.59,
- -0.78, -0.88, -0.78, -0.49, -0.15, 0.3, 0.63, 0.88, 1.03, 0.97, 0.73,
- 0.44, 0.05, -0.29, -0.49, -0.58, -0.49, -0.3, 0.0, 0.3, 0.53, 0.64, 0.58,
- 0.4, 0.14, -0.24, -0.59, -0.83, -0.97, -0.98, -0.88, -0.54, -0.29, -0.05,
- 0.1, 0.1, -0.1, -0.34, -0.74, -1.12, -1.41, -1.47, -1.51, -1.22, -0.88,
- -0.44, 0.0, 0.34, 0.49, 0.58, 0.39, 0.2, -0.15, -0.44, -0.58, -0.64,
- -0.53, -0.25, 0.05, 0.44, 0.73, 0.88, 0.88, 0.68, 0.49, 0.1, -0.2, -0.39,
- -0.48, -0.44, -0.2, 0.15, 0.49, 0.83, 1.02, 0.98, 0.97, 0.74, 0.39, 0.05,
- -0.25, -0.39, -0.44, -0.29, -0.05, 0.24, 0.49, 0.64, 0.68, 0.54, 0.24,
- -0.24, -0.64, -0.97, -1.22, -1.18, -1.12, -0.83, -0.39, 0.05, 0.39, 0.63,
- 0.74, 0.73, 0.49, 0.34, 0.1, -0.05, -0.15, 0.0, 0.2, 0.44, 0.78, 0.97,
- 1.13, 1.12, 0.98, 0.73, 0.44, 0.15, -0.05, -0.05, 0.05, 0.39, 0.73, 1.12,
- 1.47, 1.61, 1.61, 1.42, 1.12, 0.63, 0.15, -0.24, -0.49, -0.59, -0.49,
- -0.24, 0.1, 0.39, 0.58, 0.69, 0.58, 0.25, -0.1, -0.54, -0.92, -1.27,
- -1.37, -1.37, -1.12, -0.88, -0.54, -0.24, -0.1, 0.0, -0.15, -0.39, -0.68,
- -0.98, -1.17, -1.22, -1.17, -0.88, -0.49, -0.05, 0.3, 0.58, 0.73, 0.69,
- 0.44, 0.09, -0.29, -0.68, -0.83, -0.98, -0.88, -0.63, -0.3, 0.05, 0.35,
- 0.48, 0.54, 0.44, 0.24, -0.04, -0.25, -0.44, -0.49, -0.39, -0.14, 0.14,
- 0.49, 0.83, 0.93, 0.98, 0.83, 0.53, 0.15, -0.2, -0.53, -0.59, -0.58,
- -0.4, -0.04, 0.24, 0.59, 0.73, 0.78, 0.63, 0.25, -0.2, -0.68, -1.07,
- -1.42, -1.47, -1.46, -1.22, -0.93, -0.63, -0.35, -0.19, -0.15, -0.29,
- -0.49, -0.73, -0.88, -1.03, -0.92, -0.74, -0.43, 0.0, 0.43, 0.69, 0.93,
- 0.92, 0.78, 0.49, 0.05, -0.24, -0.59, -0.73, -0.68, -0.54, -0.25, 0.1,
- 0.44, 0.64, 0.78, 0.63, 0.44, 0.1, -0.24, -0.59, -0.68, -0.74, -0.48,
- -0.25, 0.15, 0.58, 0.83, 0.98, 0.98, 0.83, 0.58, 0.2, -0.15, -0.44,
- -0.58, -0.54, -0.39, -0.1, 0.15, 0.44, 0.53, 0.54, 0.29, 0.05, -0.34,
- -0.73, -0.98, -1.02, -1.03, -0.73, -0.39, 0.0, 0.39, 0.68, 0.78, 0.78,
- 0.49, 0.2, -0.2, -0.49, -0.73, -0.73, -0.63, -0.35, 0.05, 0.34, 0.64,
- 0.83, 0.73, 0.59, 0.34, 0.0, -0.25, -0.43, -0.54, -0.39, -0.15, 0.2,
- 0.53, 0.83, 0.98, 0.98, 0.88, 0.58, 0.29, -0.04, -0.35, -0.39, -0.34,
- -0.14, 0.19, 0.49, 0.78, 1.03, 1.12, 0.98, 0.68, 0.39, -0.05, -0.29,
- -0.49, -0.49, -0.39, -0.05, 0.25, 0.58, 0.83, 0.88, 0.83, 0.59, 0.24,
- -0.1, -0.49, -0.73, -0.83, -0.83, -0.58, -0.35, 0.0, 0.3, 0.39, 0.44,
- 0.29, 0.0, -0.34, -0.68, -0.93, -1.03, -0.97, -0.69, -0.39, 0.0, 0.34,
- 0.59, 0.68, 0.64, 0.44, 0.14, -0.24, -0.44, -0.64, -0.58, -0.34, -0.1,
- 0.34, 0.64, 0.97, 1.13, 0.97, 0.78, 0.39, -0.04, -0.4, -0.68, -0.83,
- -0.73, -0.54, -0.15, 0.15, 0.49, 0.63, 0.64, 0.54, 0.24, -0.15, -0.48,
- -0.79, -0.92, -0.98, -0.78, -0.54, -0.24, -0.05, 0.19, 0.25, 0.14, -0.09,
- -0.44, -0.83, -1.03, -1.22, -1.22, -1.02, -0.69, -0.29, 0.05, 0.39, 0.49,
- 0.53, 0.35, 0.09, -0.19, -0.44, -0.69, -0.68, -0.63, -0.35, -0.04, 0.29,
- 0.58, 0.79, 0.78, 0.63, 0.29, -0.04, -0.35, -0.63, -0.73, -0.69, -0.39,
- -0.09, 0.24, 0.63, 0.83, 0.93, 0.83, 0.59, 0.29, -0.1, -0.34, -0.54,
- -0.58, -0.44, -0.2, 0.15, 0.39, 0.64, 0.68, 0.63, 0.44, 0.1, -0.24,
- -0.49, -0.73, -0.69, -0.53, -0.25, 0.2, 0.63, 0.98, 1.22, 1.22, 1.07,
- 0.69, 0.39, -0.05, -0.34, -0.49, -0.44, -0.34, -0.05, 0.24, 0.54, 0.83,
- 0.83, 0.73, 0.49, 0.1, -0.2, -0.53, -0.64, -0.68, -0.59, -0.24, 0.05,
- 0.34, 0.63, 0.74, 0.73, 0.54, 0.29, 0.05, -0.3, -0.44, -0.53, -0.49,
- -0.29, 0.0, 0.19, 0.49, 0.54, 0.49, 0.34, 0.0, -0.34, -0.64, -0.88,
- -0.93, -0.78, -0.58, -0.2, 0.2, 0.53, 0.74, 0.83, 0.78, 0.53, 0.25,
- -0.15, -0.44, -0.58, -0.64, -0.49, -0.24, 0.05, 0.39, 0.63, 0.69, 0.63,
- 0.39, 0.15, -0.24, -0.49, -0.74, -0.78, -0.73, -0.44, -0.19, 0.04, 0.2,
- 0.39, 0.34, 0.15, -0.15, -0.49, -0.73, -1.02, -1.08, -0.97, -0.69, -0.29,
- 0.1, 0.53, 0.78, 0.98, 0.88, 0.73, 0.39, 0.05, -0.29, -0.44, -0.44,
- -0.39, -0.1, 0.15, 0.44, 0.58, 0.64, 0.58, 0.4, 0.09, -0.19, -0.49,
- -0.54, -0.63, -0.49, -0.2, 0.25, 0.58, 0.83, 1.08, 1.02, 0.79, 0.43, 0.0,
- -0.39, -0.73, -0.93, -0.92, -0.64, -0.39, 0.0, 0.39, 0.54, 0.68, 0.59,
- 0.34, 0.05, -0.34, -0.69, -0.83, -0.78, -0.73, -0.44, -0.15, 0.2, 0.49,
- 0.58, 0.54, 0.34, 0.1, -0.2, -0.39, -0.58, -0.59, -0.49, -0.19, 0.1,
- 0.39, 0.58, 0.69, 0.58, 0.39, 0.1, -0.24, -0.59, -0.68, -0.83, -0.69,
- -0.39, -0.1, 0.3, 0.58, 0.74, 0.78, 0.53, 0.25, -0.1, -0.49, -0.83,
- -1.07, -1.03, -0.88, -0.58, -0.2, 0.1, 0.44, 0.54, 0.58, 0.34, 0.1,
- -0.19, -0.49, -0.69, -0.78, -0.63, -0.44, -0.15, 0.2, 0.49, 0.53, 0.54,
- 0.39, 0.05, -0.29, -0.59, -0.78, -0.83, -0.63, -0.4, 0.05, 0.44, 0.88,
- 1.12, 1.23, 1.17, 0.97, 0.64, 0.29, 0.0, -0.14, -0.15, 0.0, 0.29, 0.59,
- 0.93, 1.22]
- f, Pxx = signal.periodogram(x, 5, nfft=512)
- print ['%.4f' % xx for xx in Pxx[0:10]]
- # the output will be:
- # ['0.0000', '0.0105', '0.5567', '0.8369', '0.3156', '0.4476', '0.0380', '0.4475', '3.1456', '1.0430']
- #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement