-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdataGraph.py
More file actions
140 lines (107 loc) · 21.7 KB
/
dataGraph.py
File metadata and controls
140 lines (107 loc) · 21.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
import numpy
import Data_load as dl
def smooth(x, window_len=100, window='hanning'):
"""smooth the data using a window with requested size.
This method is based on the convolution of a scaled window with the signal.
The signal is prepared by introducing reflected copies of the signal
(with the window size) in both ends so that transient parts are minimized
in the begining and end part of the output signal.
input:
x: the input signal
window_len: the dimension of the smoothing window; should be an odd integer
window: the type of window from 'flat', 'hanning', 'hamming', 'bartlett', 'blackman'
flat window will produce a moving average smoothing.
output:
the smoothed signal
example:
t=linspace(-2,2,0.1)
x=sin(t)+randn(len(t))*0.1
y=smooth(x)
see also:
numpy.hanning, numpy.hamming, numpy.bartlett, numpy.blackman, numpy.convolve
scipy.signal.lfilter
TODO: the window parameter could be the window itself if an array instead of a string
NOTE: length(output) != length(input), to correct this: return y[(window_len/2-1):-(window_len/2)] instead of just y.
"""
s = numpy.r_[x[window_len - 1:0:-1], x, x[-2:-window_len - 1:-1]]
# print(len(s))
if window == 'flat': # moving average
w = numpy.ones(window_len, 'd')
else:
w = eval('numpy.' + window + '(window_len)')
y = numpy.convolve(w / w.sum(), s, mode='valid')
return y
from numpy import *
from pylab import *
import os
import random
current_path = os.getcwd()
DataX = list()
DataY = list()
Data_Animal_X = list()
Data_Animal_Y = list()
Data_Both_X = list()
Data_Both_Y = list()
Data_sun_human = list()
Data_sun_human_Y = list()
Data_rain_human = list()
Data_rain_human_Y = list()
Data_sun_none = list()
Data_sun_none_Y = list()
Data_rain_none = list()
Data_rain_none_Y = list()
test_data = np.array([[
2100.0,2065.0,2028.0,1990.0,1940.0,1831.0,1952.0,2156.0,2216.0,2211.0,2139.0,2088.0,2040.0,2001.0,1940.0,1834.0,1973.0,2151.0,2200.0,2184.0,2121.0,2080.0,2031.0,1936.0,1943.0,1858.0,1957.0,2180.0,2215.0,2198.0,2125.0,2074.0,2028.0,1982.0,1926.0,1814.0,1920.0,2157.0,2200.0,2179.0,2120.0,2063.0,2024.0,1977.0,1920.0,1815.0,2076.0,2121.0,2100.0,2178.0,2156.0,2123.0,2080.0,2018.0,1953.0,1839.0,1936.0,2171.0,2210.0,2188.0,2127.0,2072.0,2025.0,1986.0,1930.0,1829.0,1932.0,2175.0,2220.0,2203.0,2136.0,2081.0,2040.0,2007.0,1952.0,1846.0,1963.0,2188.0,2228.0,2212.0,2139.0,2096.0,2051.0,2022.0,1965.0,1870.0,1962.0,2212.0,2251.0,2233.0,2167.0,2111.0,2080.0,2034.0,1976.0,1874.0,2083.0,2201.0,2221.0,2208.0
],[1834.0,1973.0,2151.0,2200.0,2184.0,2121.0,2080.0,2031.0,1936.0,1943.0,1858.0,1957.0,2180.0,2215.0,2198.0,2125.0,2074.0,2028.0,1982.0,1926.0,1814.0,1920.0,2157.0,2200.0,2179.0,2120.0,2063.0,2024.0,1977.0,1920.0,1815.0,2076.0,2121.0,2100.0,2178.0,2156.0,2123.0,2080.0,2018.0,1953.0,1839.0,1936.0,2171.0,2210.0,2188.0,2127.0,2072.0,2025.0,1986.0,1930.0,1829.0,1932.0,2175.0,2220.0,2203.0,2136.0,2081.0,2040.0,2007.0,1952.0,1846.0,1963.0,2188.0,2228.0,2212.0,2139.0,2096.0,2051.0,2022.0,1965.0,1870.0,1962.0,2212.0,2251.0,2233.0,2167.0,2111.0,2080.0,2034.0,1976.0,1874.0,2083.0,2201.0,2221.0,2208.0,2145.0,2108.0,2067.0,2032.0,1968.0,1868.0,1999.0,2121.0,2244.0,2267.0,2220.0,2152.0,2096.0,2033.0,1966.0
],[2125.0,2074.0,2028.0,1982.0,1926.0,1814.0,1920.0,2157.0,2200.0,2179.0,2120.0,2063.0,2024.0,1977.0,1920.0,1815.0,2076.0,2121.0,2100.0,2178.0,2156.0,2123.0,2080.0,2018.0,1953.0,1839.0,1936.0,2171.0,2210.0,2188.0,2127.0,2072.0,2025.0,1986.0,1930.0,1829.0,1932.0,2175.0,2220.0,2203.0,2136.0,2081.0,2040.0,2007.0,1952.0,1846.0,1963.0,2188.0,2228.0,2212.0,2139.0,2096.0,2051.0,2022.0,1965.0,1870.0,1962.0,2212.0,2251.0,2233.0,2167.0,2111.0,2080.0,2034.0,1976.0,1874.0,2083.0,2201.0,2221.0,2208.0,2145.0,2108.0,2067.0,2032.0,1968.0,1868.0,1999.0,2121.0,2244.0,2267.0,2220.0,2152.0,2096.0,2033.0,1966.0,1853.0,1935.0,2149.0,2219.0,2185.0,2102.0,2050.0,2004.0,1960.0,1909.0,1795.0,1897.0,2105.0,2191.0,2152.0
],[1815.0,2076.0,2121.0,2100.0,2178.0,2156.0,2123.0,2080.0,2018.0,1953.0,1839.0,1936.0,2171.0,2210.0,2188.0,2127.0,2072.0,2025.0,1986.0,1930.0,1829.0,1932.0,2175.0,2220.0,2203.0,2136.0,2081.0,2040.0,2007.0,1952.0,1846.0,1963.0,2188.0,2228.0,2212.0,2139.0,2096.0,2051.0,2022.0,1965.0,1870.0,1962.0,2212.0,2251.0,2233.0,2167.0,2111.0,2080.0,2034.0,1976.0,1874.0,2083.0,2201.0,2221.0,2208.0,2145.0,2108.0,2067.0,2032.0,1968.0,1868.0,1999.0,2121.0,2244.0,2267.0,2220.0,2152.0,2096.0,2033.0,1966.0,1853.0,1935.0,2149.0,2219.0,2185.0,2102.0,2050.0,2004.0,1960.0,1909.0,1795.0,1897.0,2105.0,2191.0,2152.0,2082.0,2024.0,1977.0,1940.0,1888.0,1781.0,1889.0,2089.0,2160.0,2137.0,2062.0,2016.0,1976.0,1929.0,1875.0
],[2127.0,2072.0,2025.0,1986.0,1930.0,1829.0,1932.0,2175.0,2220.0,2203.0,2136.0,2081.0,2040.0,2007.0,1952.0,1846.0,1963.0,2188.0,2228.0,2212.0,2139.0,2096.0,2051.0,2022.0,1965.0,1870.0,1962.0,2212.0,2251.0,2233.0,2167.0,2111.0,2080.0,2034.0,1976.0,1874.0,2083.0,2201.0,2221.0,2208.0,2145.0,2108.0,2067.0,2032.0,1968.0,1868.0,1999.0,2121.0,2244.0,2267.0,2220.0,2152.0,2096.0,2033.0,1966.0,1853.0,1935.0,2149.0,2219.0,2185.0,2102.0,2050.0,2004.0,1960.0,1909.0,1795.0,1897.0,2105.0,2191.0,2152.0,2082.0,2024.0,1977.0,1940.0,1888.0,1781.0,1889.0,2089.0,2160.0,2137.0,2062.0,2016.0,1976.0,1929.0,1875.0,1768.0,1983.0,2081.0,2136.0,2111.0,2049.0,2003.0,1961.0,1935.0,1879.0,1776.0,1878.0,2098.0,2182.0,2156.0
],[1846.0,1963.0,2188.0,2228.0,2212.0,2139.0,2096.0,2051.0,2022.0,1965.0,1870.0,1962.0,2212.0,2251.0,2233.0,2167.0,2111.0,2080.0,2034.0,1976.0,1874.0,2083.0,2201.0,2221.0,2208.0,2145.0,2108.0,2067.0,2032.0,1968.0,1868.0,1999.0,2121.0,2244.0,2267.0,2220.0,2152.0,2096.0,2033.0,1966.0,1853.0,1935.0,2149.0,2219.0,2185.0,2102.0,2050.0,2004.0,1960.0,1909.0,1795.0,1897.0,2105.0,2191.0,2152.0,2082.0,2024.0,1977.0,1940.0,1888.0,1781.0,1889.0,2089.0,2160.0,2137.0,2062.0,2016.0,1976.0,1929.0,1875.0,1768.0,1983.0,2081.0,2136.0,2111.0,2049.0,2003.0,1961.0,1935.0,1879.0,1776.0,1878.0,2098.0,2182.0,2156.0,2079.0,2020.0,1984.0,1947.0,1902.0,1793.0,1933.0,2024.0,2194.0,2228.0,2166.0,2115.0,2051.0,1940.0,1933.0
],[2167.0,2111.0,2080.0,2034.0,1976.0,1874.0,2083.0,2201.0,2221.0,2208.0,2145.0,2108.0,2067.0,2032.0,1968.0,1868.0,1999.0,2121.0,2244.0,2267.0,2220.0,2152.0,2096.0,2033.0,1966.0,1853.0,1935.0,2149.0,2219.0,2185.0,2102.0,2050.0,2004.0,1960.0,1909.0,1795.0,1897.0,2105.0,2191.0,2152.0,2082.0,2024.0,1977.0,1940.0,1888.0,1781.0,1889.0,2089.0,2160.0,2137.0,2062.0,2016.0,1976.0,1929.0,1875.0,1768.0,1983.0,2081.0,2136.0,2111.0,2049.0,2003.0,1961.0,1935.0,1879.0,1776.0,1878.0,2098.0,2182.0,2156.0,2079.0,2020.0,1984.0,1947.0,1902.0,1793.0,1933.0,2024.0,2194.0,2228.0,2166.0,2115.0,2051.0,1940.0,1933.0,1855.0,1953.0,2168.0,2241.0,2199.0,2120.0,2058.0,2021.0,1985.0,1928.0,1824.0,1924.0,2145.0,2240.0,2217.0
],[1868.0,1999.0,2121.0,2244.0,2267.0,2220.0,2152.0,2096.0,2033.0,1966.0,1853.0,1935.0,2149.0,2219.0,2185.0,2102.0,2050.0,2004.0,1960.0,1909.0,1795.0,1897.0,2105.0,2191.0,2152.0,2082.0,2024.0,1977.0,1940.0,1888.0,1781.0,1889.0,2089.0,2160.0,2137.0,2062.0,2016.0,1976.0,1929.0,1875.0,1768.0,1983.0,2081.0,2136.0,2111.0,2049.0,2003.0,1961.0,1935.0,1879.0,1776.0,1878.0,2098.0,2182.0,2156.0,2079.0,2020.0,1984.0,1947.0,1902.0,1793.0,1933.0,2024.0,2194.0,2228.0,2166.0,2115.0,2051.0,1940.0,1933.0,1855.0,1953.0,2168.0,2241.0,2199.0,2120.0,2058.0,2021.0,1985.0,1928.0,1824.0,1924.0,2145.0,2240.0,2217.0,2131.0,2083.0,2036.0,2012.0,1947.0,1852.0,2075.0,2164.0,2219.0,2208.0,2139.0,2089.0,2054.0,2023.0,2006.0
],[2102.0,2050.0,2004.0,1960.0,1909.0,1795.0,1897.0,2105.0,2191.0,2152.0,2082.0,2024.0,1977.0,1940.0,1888.0,1781.0,1889.0,2089.0,2160.0,2137.0,2062.0,2016.0,1976.0,1929.0,1875.0,1768.0,1983.0,2081.0,2136.0,2111.0,2049.0,2003.0,1961.0,1935.0,1879.0,1776.0,1878.0,2098.0,2182.0,2156.0,2079.0,2020.0,1984.0,1947.0,1902.0,1793.0,1933.0,2024.0,2194.0,2228.0,2166.0,2115.0,2051.0,1940.0,1933.0,1855.0,1953.0,2168.0,2241.0,2199.0,2120.0,2058.0,2021.0,1985.0,1928.0,1824.0,1924.0,2145.0,2240.0,2217.0,2131.0,2083.0,2036.0,2012.0,1947.0,1852.0,2075.0,2164.0,2219.0,2208.0,2139.0,2089.0,2054.0,2023.0,2006.0,1861.0,1937.0,2160.0,2242.0,2241.0,2158.0,2110.0,2076.0,2029.0,1993.0,1879.0,1973.0,2208.0,2274.0,2262.0
],[1781.0,1889.0,2089.0,2160.0,2137.0,2062.0,2016.0,1976.0,1929.0,1875.0,1768.0,1983.0,2081.0,2136.0,2111.0,2049.0,2003.0,1961.0,1935.0,1879.0,1776.0,1878.0,2098.0,2182.0,2156.0,2079.0,2020.0,1984.0,1947.0,1902.0,1793.0,1933.0,2024.0,2194.0,2228.0,2166.0,2115.0,2051.0,1940.0,1933.0,1855.0,1953.0,2168.0,2241.0,2199.0,2120.0,2058.0,2021.0,1985.0,1928.0,1824.0,1924.0,2145.0,2240.0,2217.0,2131.0,2083.0,2036.0,2012.0,1947.0,1852.0,2075.0,2164.0,2219.0,2208.0,2139.0,2089.0,2054.0,2023.0,2006.0,1861.0,1937.0,2160.0,2242.0,2241.0,2158.0,2110.0,2076.0,2029.0,1993.0,1879.0,1973.0,2208.0,2274.0,2262.0,2186.0,2125.0,2085.0,2041.0,1981.0,1881.0,2011.0,2040.0,2229.0,2346.0,2296.0,2228.0,2170.0,2109.0,2031.0
],[2049.0,2003.0,1961.0,1935.0,1879.0,1776.0,1878.0,2098.0,2182.0,2156.0,2079.0,2020.0,1984.0,1947.0,1902.0,1793.0,1933.0,2024.0,2194.0,2228.0,2166.0,2115.0,2051.0,1940.0,1933.0,1855.0,1953.0,2168.0,2241.0,2199.0,2120.0,2058.0,2021.0,1985.0,1928.0,1824.0,1924.0,2145.0,2240.0,2217.0,2131.0,2083.0,2036.0,2012.0,1947.0,1852.0,2075.0,2164.0,2219.0,2208.0,2139.0,2089.0,2054.0,2023.0,2006.0,1861.0,1937.0,2160.0,2242.0,2241.0,2158.0,2110.0,2076.0,2029.0,1993.0,1879.0,1973.0,2208.0,2274.0,2262.0,2186.0,2125.0,2085.0,2041.0,1981.0,1881.0,2011.0,2040.0,2229.0,2346.0,2296.0,2228.0,2170.0,2109.0,2031.0,1905.0,1988.0,2193.0,2244.0,2254.0,2162.0,2089.0,2040.0,2001.0,1940.0,1846.0,2052.0,2162.0,2194.0,2228.0
],[1793.0,1933.0,2024.0,2194.0,2228.0,2166.0,2115.0,2051.0,1940.0,1933.0,1855.0,1953.0,2168.0,2241.0,2199.0,2120.0,2058.0,2021.0,1985.0,1928.0,1824.0,1924.0,2145.0,2240.0,2217.0,2131.0,2083.0,2036.0,2012.0,1947.0,1852.0,2075.0,2164.0,2219.0,2208.0,2139.0,2089.0,2054.0,2023.0,2006.0,1861.0,1937.0,2160.0,2242.0,2241.0,2158.0,2110.0,2076.0,2029.0,1993.0,1879.0,1973.0,2208.0,2274.0,2262.0,2186.0,2125.0,2085.0,2041.0,1981.0,1881.0,2011.0,2040.0,2229.0,2346.0,2296.0,2228.0,2170.0,2109.0,2031.0,1905.0,1988.0,2193.0,2244.0,2254.0,2162.0,2089.0,2040.0,2001.0,1940.0,1846.0,2052.0,2162.0,2194.0,2228.0,2152.0,2099.0,2068.0,2028.0,1985.0,1884.0,2002.0,2211.0,2270.0,2284.0,2196.0,2135.0,2090.0,2051.0,2001.0
],[2120.0,2058.0,2021.0,1985.0,1928.0,1824.0,1924.0,2145.0,2240.0,2217.0,2131.0,2083.0,2036.0,2012.0,1947.0,1852.0,2075.0,2164.0,2219.0,2208.0,2139.0,2089.0,2054.0,2023.0,2006.0,1861.0,1937.0,2160.0,2242.0,2241.0,2158.0,2110.0,2076.0,2029.0,1993.0,1879.0,1973.0,2208.0,2274.0,2262.0,2186.0,2125.0,2085.0,2041.0,1981.0,1881.0,2011.0,2040.0,2229.0,2346.0,2296.0,2228.0,2170.0,2109.0,2031.0,1905.0,1988.0,2193.0,2244.0,2254.0,2162.0,2089.0,2040.0,2001.0,1940.0,1846.0,2052.0,2162.0,2194.0,2228.0,2152.0,2099.0,2068.0,2028.0,1985.0,1884.0,2002.0,2211.0,2270.0,2284.0,2196.0,2135.0,2090.0,2051.0,2001.0,1894.0,1983.0,2218.0,2272.0,2289.0,2205.0,2141.0,2091.0,2045.0,1992.0,1891.0,1992.0,2224.0,2280.0,2304.0
],[1852.0,2075.0,2164.0,2219.0,2208.0,2139.0,2089.0,2054.0,2023.0,2006.0,1861.0,1937.0,2160.0,2242.0,2241.0,2158.0,2110.0,2076.0,2029.0,1993.0,1879.0,1973.0,2208.0,2274.0,2262.0,2186.0,2125.0,2085.0,2041.0,1981.0,1881.0,2011.0,2040.0,2229.0,2346.0,2296.0,2228.0,2170.0,2109.0,2031.0,1905.0,1988.0,2193.0,2244.0,2254.0,2162.0,2089.0,2040.0,2001.0,1940.0,1846.0,2052.0,2162.0,2194.0,2228.0,2152.0,2099.0,2068.0,2028.0,1985.0,1884.0,2002.0,2211.0,2270.0,2284.0,2196.0,2135.0,2090.0,2051.0,2001.0,1894.0,1983.0,2218.0,2272.0,2289.0,2205.0,2141.0,2091.0,2045.0,1992.0,1891.0,1992.0,2224.0,2280.0,2304.0,2211.0,2140.0,2096.0,2051.0,1994.0,1892.0,2048.0,2112.0,2260.0,2331.0,2261.0,2176.0,2120.0,2055.0,1988.0
],[2158.0,2110.0,2076.0,2029.0,1993.0,1879.0,1973.0,2208.0,2274.0,2262.0,2186.0,2125.0,2085.0,2041.0,1981.0,1881.0,2011.0,2040.0,2229.0,2346.0,2296.0,2228.0,2170.0,2109.0,2031.0,1905.0,1988.0,2193.0,2244.0,2254.0,2162.0,2089.0,2040.0,2001.0,1940.0,1846.0,2052.0,2162.0,2194.0,2228.0,2152.0,2099.0,2068.0,2028.0,1985.0,1884.0,2002.0,2211.0,2270.0,2284.0,2196.0,2135.0,2090.0,2051.0,2001.0,1894.0,1983.0,2218.0,2272.0,2289.0,2205.0,2141.0,2091.0,2045.0,1992.0,1891.0,1992.0,2224.0,2280.0,2304.0,2211.0,2140.0,2096.0,2051.0,1994.0,1892.0,2048.0,2112.0,2260.0,2331.0,2261.0,2176.0,2120.0,2055.0,1988.0,1874.0,2086.0,2195.0,2205.0,2237.0,2160.0,2090.0,2050.0,2007.0,1957.0,1857.0,1964.0,2185.0,2248.0,2255.0
],[1881.0,2011.0,2040.0,2229.0,2346.0,2296.0,2228.0,2170.0,2109.0,2031.0,1905.0,1988.0,2193.0,2244.0,2254.0,2162.0,2089.0,2040.0,2001.0,1940.0,1846.0,2052.0,2162.0,2194.0,2228.0,2152.0,2099.0,2068.0,2028.0,1985.0,1884.0,2002.0,2211.0,2270.0,2284.0,2196.0,2135.0,2090.0,2051.0,2001.0,1894.0,1983.0,2218.0,2272.0,2289.0,2205.0,2141.0,2091.0,2045.0,1992.0,1891.0,1992.0,2224.0,2280.0,2304.0,2211.0,2140.0,2096.0,2051.0,1994.0,1892.0,2048.0,2112.0,2260.0,2331.0,2261.0,2176.0,2120.0,2055.0,1988.0,1874.0,2086.0,2195.0,2205.0,2237.0,2160.0,2090.0,2050.0,2007.0,1957.0,1857.0,1964.0,2185.0,2248.0,2255.0,2186.0,2108.0,2052.0,2001.0,1957.0,1855.0,1968.0,2183.0,2227.0,2227.0,2168.0,2092.0,2048.0,1932.0,1949.0
],[2162.0,2089.0,2040.0,2001.0,1940.0,1846.0,2052.0,2162.0,2194.0,2228.0,2152.0,2099.0,2068.0,2028.0,1985.0,1884.0,2002.0,2211.0,2270.0,2284.0,2196.0,2135.0,2090.0,2051.0,2001.0,1894.0,1983.0,2218.0,2272.0,2289.0,2205.0,2141.0,2091.0,2045.0,1992.0,1891.0,1992.0,2224.0,2280.0,2304.0,2211.0,2140.0,2096.0,2051.0,1994.0,1892.0,2048.0,2112.0,2260.0,2331.0,2261.0,2176.0,2120.0,2055.0,1988.0,1874.0,2086.0,2195.0,2205.0,2237.0,2160.0,2090.0,2050.0,2007.0,1957.0,1857.0,1964.0,2185.0,2248.0,2255.0,2186.0,2108.0,2052.0,2001.0,1957.0,1855.0,1968.0,2183.0,2227.0,2227.0,2168.0,2092.0,2048.0,1932.0,1949.0,1881.0,1989.0,2205.0,2249.0,2227.0,2169.0,2073.0,2012.0,1955.0,1891.0,1796.0,1889.0,2110.0,2162.0,2156.0
],[1884.0,2002.0,2211.0,2270.0,2284.0,2196.0,2135.0,2090.0,2051.0,2001.0,1894.0,1983.0,2218.0,2272.0,2289.0,2205.0,2141.0,2091.0,2045.0,1992.0,1891.0,1992.0,2224.0,2280.0,2304.0,2211.0,2140.0,2096.0,2051.0,1994.0,1892.0,2048.0,2112.0,2260.0,2331.0,2261.0,2176.0,2120.0,2055.0,1988.0,1874.0,2086.0,2195.0,2205.0,2237.0,2160.0,2090.0,2050.0,2007.0,1957.0,1857.0,1964.0,2185.0,2248.0,2255.0,2186.0,2108.0,2052.0,2001.0,1957.0,1855.0,1968.0,2183.0,2227.0,2227.0,2168.0,2092.0,2048.0,1932.0,1949.0,1881.0,1989.0,2205.0,2249.0,2227.0,2169.0,2073.0,2012.0,1955.0,1891.0,1796.0,1889.0,2110.0,2162.0,2156.0,2108.0,2008.0,1955.0,1897.0,1842.0,1739.0,1999.0,1995.0,2031.0,2087.0,2072.0,1990.0,1924.0,1848.0,1776.0
],[2205.0,2141.0,2091.0,2045.0,1992.0,1891.0,1992.0,2224.0,2280.0,2304.0,2211.0,2140.0,2096.0,2051.0,1994.0,1892.0,2048.0,2112.0,2260.0,2331.0,2261.0,2176.0,2120.0,2055.0,1988.0,1874.0,2086.0,2195.0,2205.0,2237.0,2160.0,2090.0,2050.0,2007.0,1957.0,1857.0,1964.0,2185.0,2248.0,2255.0,2186.0,2108.0,2052.0,2001.0,1957.0,1855.0,1968.0,2183.0,2227.0,2227.0,2168.0,2092.0,2048.0,1932.0,1949.0,1881.0,1989.0,2205.0,2249.0,2227.0,2169.0,2073.0,2012.0,1955.0,1891.0,1796.0,1889.0,2110.0,2162.0,2156.0,2108.0,2008.0,1955.0,1897.0,1842.0,1739.0,1999.0,1995.0,2031.0,2087.0,2072.0,1990.0,1924.0,1848.0,1776.0,1664.0,1755.0,1960.0,2000.0,1976.0,1933.0,1843.0,1789.0,1736.0,1677.0,1574.0,1686.0,1888.0,1937.0,1928.0
],[1892.0,2048.0,2112.0,2260.0,2331.0,2261.0,2176.0,2120.0,2055.0,1988.0,1874.0,2086.0,2195.0,2205.0,2237.0,2160.0,2090.0,2050.0,2007.0,1957.0,1857.0,1964.0,2185.0,2248.0,2255.0,2186.0,2108.0,2052.0,2001.0,1957.0,1855.0,1968.0,2183.0,2227.0,2227.0,2168.0,2092.0,2048.0,1932.0,1949.0,1881.0,1989.0,2205.0,2249.0,2227.0,2169.0,2073.0,2012.0,1955.0,1891.0,1796.0,1889.0,2110.0,2162.0,2156.0,2108.0,2008.0,1955.0,1897.0,1842.0,1739.0,1999.0,1995.0,2031.0,2087.0,2072.0,1990.0,1924.0,1848.0,1776.0,1664.0,1755.0,1960.0,2000.0,1976.0,1933.0,1843.0,1789.0,1736.0,1677.0,1574.0,1686.0,1888.0,1937.0,1928.0,1893.0,1811.0,1756.0,1702.0,1650.0,1552.0,1662.0,1864.0,1917.0,1906.0,1887.0,1802.0,1752.0,1704.0,1654.0
],[2160.0,2090.0,2050.0,2007.0,1957.0,1857.0,1964.0,2185.0,2248.0,2255.0,2186.0,2108.0,2052.0,2001.0,1957.0,1855.0,1968.0,2183.0,2227.0,2227.0,2168.0,2092.0,2048.0,1932.0,1949.0,1881.0,1989.0,2205.0,2249.0,2227.0,2169.0,2073.0,2012.0,1955.0,1891.0,1796.0,1889.0,2110.0,2162.0,2156.0,2108.0,2008.0,1955.0,1897.0,1842.0,1739.0,1999.0,1995.0,2031.0,2087.0,2072.0,1990.0,1924.0,1848.0,1776.0,1664.0,1755.0,1960.0,2000.0,1976.0,1933.0,1843.0,1789.0,1736.0,1677.0,1574.0,1686.0,1888.0,1937.0,1928.0,1893.0,1811.0,1756.0,1702.0,1650.0,1552.0,1662.0,1864.0,1917.0,1906.0,1887.0,1802.0,1752.0,1704.0,1654.0,1554.0,1676.0,1888.0,1940.0,1944.0,1915.0,1845.0,1794.0,1752.0,1707.0,1612.0,1839.0,1949.0,1992.0,2002.0
],[1855.0,1968.0,2183.0,2227.0,2227.0,2168.0,2092.0,2048.0,1932.0,1949.0,1881.0,1989.0,2205.0,2249.0,2227.0,2169.0,2073.0,2012.0,1955.0,1891.0,1796.0,1889.0,2110.0,2162.0,2156.0,2108.0,2008.0,1955.0,1897.0,1842.0,1739.0,1999.0,1995.0,2031.0,2087.0,2072.0,1990.0,1924.0,1848.0,1776.0,1664.0,1755.0,1960.0,2000.0,1976.0,1933.0,1843.0,1789.0,1736.0,1677.0,1574.0,1686.0,1888.0,1937.0,1928.0,1893.0,1811.0,1756.0,1702.0,1650.0,1552.0,1662.0,1864.0,1917.0,1906.0,1887.0,1802.0,1752.0,1704.0,1654.0,1554.0,1676.0,1888.0,1940.0,1944.0,1915.0,1845.0,1794.0,1752.0,1707.0,1612.0,1839.0,1949.0,1992.0,2002.0,2001.0,1937.0,1898.0,1847.0,1802.0,1721.0,1880.0,1976.0,2120.0,2178.0,2160.0,2104.0,2054.0,1984.0,1930.0
]])
#sunny none
test_none_data = np.array([[
1966.0,1937.0,1891.0,1827.0,1993.0,2204.0,2236.0,2180.0,2094.0,2031.0,1962.0,1942.0,1888.0,1826.0,2102.0,2172.0,2188.0,2144.0,2091.0,2033.0,1980.0,1957.0,1901.0,1840.0,2013.0,2208.0,2247.0,2180.0,2101.0,2033.0,1969.0,1944.0,1897.0,1840.0,2008.0,2204.0,2254.0,2179.0,2104.0,2030.0,1965.0,1940.0,1896.0,1845.0,2048.0,2104.0,2258.0,2257.0,2185.0,2092.0,2008.0,1955.0,1900.0,1839.0,2012.0,2192.0,2234.0,2164.0,2088.0,2029.0,1963.0,1943.0,1897.0,1832.0,2110.0,2192.0,2212.0,2162.0,2096.0,2049.0,1990.0,1960.0,1911.0,1826.0,2055.0,2229.0,2256.0,2195.0,2105.0,2056.0,1985.0,1963.0,1915.0,1832.0,2039.0,2231.0,2267.0,2194.0,2112.0,2056.0,1988.0,1956.0,1912.0,1820.0,2038.0,2224.0,2258.0,2190.0,2105.0,2053.0
],[2172.0,2188.0,2144.0,2091.0,2033.0,1980.0,1957.0,1901.0,1840.0,2013.0,2208.0,2247.0,2180.0,2101.0,2033.0,1969.0,1944.0,1897.0,1840.0,2008.0,2204.0,2254.0,2179.0,2104.0,2030.0,1965.0,1940.0,1896.0,1845.0,2048.0,2104.0,2258.0,2257.0,2185.0,2092.0,2008.0,1955.0,1900.0,1839.0,2012.0,2192.0,2234.0,2164.0,2088.0,2029.0,1963.0,1943.0,1897.0,1832.0,2110.0,2192.0,2212.0,2162.0,2096.0,2049.0,1990.0,1960.0,1911.0,1826.0,2055.0,2229.0,2256.0,2195.0,2105.0,2056.0,1985.0,1963.0,1915.0,1832.0,2039.0,2231.0,2267.0,2194.0,2112.0,2056.0,1988.0,1956.0,1912.0,1820.0,2038.0,2224.0,2258.0,2190.0,2105.0,2053.0,1977.0,1951.0,1900.0,1811.0,2090.0,2107.0,2257.0,2243.0,2162.0,2085.0,2001.0,1952.0,1883.0,1784.0,2136.0
],[1969.0,1944.0,1897.0,1840.0,2008.0,2204.0,2254.0,2179.0,2104.0,2030.0,1965.0,1940.0,1896.0,1845.0,2048.0,2104.0,2258.0,2257.0,2185.0,2092.0,2008.0,1955.0,1900.0,1839.0,2012.0,2192.0,2234.0,2164.0,2088.0,2029.0,1963.0,1943.0,1897.0,1832.0,2110.0,2192.0,2212.0,2162.0,2096.0,2049.0,1990.0,1960.0,1911.0,1826.0,2055.0,2229.0,2256.0,2195.0,2105.0,2056.0,1985.0,1963.0,1915.0,1832.0,2039.0,2231.0,2267.0,2194.0,2112.0,2056.0,1988.0,1956.0,1912.0,1820.0,2038.0,2224.0,2258.0,2190.0,2105.0,2053.0,1977.0,1951.0,1900.0,1811.0,2090.0,2107.0,2257.0,2243.0,2162.0,2085.0,2001.0,1952.0,1883.0,1784.0,2136.0,2176.0,2170.0,2121.0,2038.0,2000.0,1939.0,1905.0,1861.0,1778.0,3012.0,3028.0,2508.0,1340.0,506.0,50.0
],[2104.0,2258.0,2257.0,2185.0,2092.0,2008.0,1955.0,1900.0,1839.0,2012.0,2192.0,2234.0,2164.0,2088.0,2029.0,1963.0,1943.0,1897.0,1832.0,2110.0,2192.0,2212.0,2162.0,2096.0,2049.0,1990.0,1960.0,1911.0,1826.0,2055.0,2229.0,2256.0,2195.0,2105.0,2056.0,1985.0,1963.0,1915.0,1832.0,2039.0,2231.0,2267.0,2194.0,2112.0,2056.0,1988.0,1956.0,1912.0,1820.0,2038.0,2224.0,2258.0,2190.0,2105.0,2053.0,1977.0,1951.0,1900.0,1811.0,2090.0,2107.0,2257.0,2243.0,2162.0,2085.0,2001.0,1952.0,1883.0,1784.0,2136.0,2176.0,2170.0,2121.0,2038.0,2000.0,1939.0,1905.0,1861.0,1778.0,3012.0,3028.0,2508.0,1340.0,506.0,50.0,25.0,59.0,193.0,349.0,800.0,1160.0,1354.0,1460.0,1511.0,1567.0,1601.0,1632.0,1650.0,1605.0,1844.0
],[1963.0,1943.0,1897.0,1832.0,2110.0,2192.0,2212.0,2162.0,2096.0,2049.0,1990.0,1960.0,1911.0,1826.0,2055.0,2229.0,2256.0,2195.0,2105.0,2056.0,1985.0,1963.0,1915.0,1832.0,2039.0,2231.0,2267.0,2194.0,2112.0,2056.0,1988.0,1956.0,1912.0,1820.0,2038.0,2224.0,2258.0,2190.0,2105.0,2053.0,1977.0,1951.0,1900.0,1811.0,2090.0,2107.0,2257.0,2243.0,2162.0,2085.0,2001.0,1952.0,1883.0,1784.0,2136.0,2176.0,2170.0,2121.0,2038.0,2000.0,1939.0,1905.0,1861.0,1778.0,3012.0,3028.0,2508.0,1340.0,506.0,50.0,25.0,59.0,193.0,349.0,800.0,1160.0,1354.0,1460.0,1511.0,1567.0,1601.0,1632.0,1650.0,1605.0,1844.0,2024.0,2108.0,2090.0,2045.0,2019.0,1980.0,1970.0,1934.0,1859.0,2096.0,2276.0,2322.0,2272.0,2203.0,2156.0
],[2229.0,2256.0,2195.0,2105.0,2056.0,1985.0,1963.0,1915.0,1832.0,2039.0,2231.0,2267.0,2194.0,2112.0,2056.0,1988.0,1956.0,1912.0,1820.0,2038.0,2224.0,2258.0,2190.0,2105.0,2053.0,1977.0,1951.0,1900.0,1811.0,2090.0,2107.0,2257.0,2243.0,2162.0,2085.0,2001.0,1952.0,1883.0,1784.0,2136.0,2176.0,2170.0,2121.0,2038.0,2000.0,1939.0,1905.0,1861.0,1778.0,3012.0,3028.0,2508.0,1340.0,506.0,50.0,25.0,59.0,193.0,349.0,800.0,1160.0,1354.0,1460.0,1511.0,1567.0,1601.0,1632.0,1650.0,1605.0,1844.0,2024.0,2108.0,2090.0,2045.0,2019.0,1980.0,1970.0,1934.0,1859.0,2096.0,2276.0,2322.0,2272.0,2203.0,2156.0,2111.0,2081.0,2044.0,1950.0,2365.0,2299.0,2347.0,2390.0,2337.0,2285.0,2200.0,2148.0,2073.0,1974.0,2169.0
]])
sun = list()
rain = list()
sun_ani = list()
sun_none = list()
rain_none = list()
def smooth_data(datalist, plot_title):
for i in range(0,10):
t = linspace(-4, 4, 100)
x = datalist[i]
xn = x + randn(len(t)) * 0.1
y = smooth(x)
ws = 31
subplot(211)
plot(x)
windows = ['flat']
title(plot_title)
subplot(212)
plot(smooth(xn, 10, 'flat'))
title("Smoothing")
show()
smooth_data(test_data,"Sunny & Human")
smooth_data(test_none_data, "Sunny & None")