import sigplot as sp
import matplotlib
import matplotlib.pyplot as plt
import numpy as np


matplotlib.rcParams['toolbar'] = 'None'
plt.style.use('dark_background')

fig = plt.figure()

# seed = np.linspace(3, 7, 1000)
# a = (np.sin(2 * np.pi * seed))
# b = (np.cos(2 * np.pi * seed))
# sp.correlate(fig, b, a, 300)

t = np.linspace(0, 1, 500)
b = (np.cos(2 * np.pi * t))
# x = np.concatenate([np.zeros(500), signal.sawtooth(2 * np.pi * 5 * t), np.zeros(500), np.ones(120), np.zeros(500)])
x = np.concatenate([np.zeros(500), np.ones(500), np.zeros(500)])
sp.fourier_series(fig, x, 100, 200, 200)

plt.show()

# WriteToVideo("twoPulse.mp4", anim);

[((8, 0, 8, 32), 'matplotlib.pyplot.style.use', 'plt.style.use', ({(8, 14, 8, 31): '"""dark_background"""'}, {}), "('dark_background')", True, 'import matplotlib.pyplot as plt\n'), ((10, 6, 10, 18), 'matplotlib.pyplot.figure', 'plt.figure', ({}, {}), '()', True, 'import matplotlib.pyplot as plt\n'), ((17, 4, 17, 26), 'numpy.linspace', 'np.linspace', ({(17, 16, 17, 17): '0', (17, 19, 17, 20): '1', (17, 22, 17, 25): '500'}, {}), '(0, 1, 500)', True, 'import numpy as np\n'), ((18, 5, 18, 26), 'numpy.cos', 'np.cos', ({(18, 12, 18, 25): '2 * np.pi * t'}, {}), '(2 * np.pi * t)', True, 'import numpy as np\n'), ((21, 0, 21, 40), 'sigplot.fourier_series', 'sp.fourier_series', ({(21, 18, 21, 21): 'fig', (21, 23, 21, 24): 'x', (21, 26, 21, 29): '(100)', (21, 31, 21, 34): '(200)', (21, 36, 21, 39): '(200)'}, {}), '(fig, x, 100, 200, 200)', True, 'import sigplot as sp\n'), ((23, 0, 23, 10), 'matplotlib.pyplot.show', 'plt.show', ({}, {}), '()', True, 'import matplotlib.pyplot as plt\n'), ((20, 20, 20, 33), 'numpy.zeros', 'np.zeros', ({(20, 29, 20, 32): '500'}, {}), '(500)', True, 'import numpy as np\n'), ((20, 35, 20, 47), 'numpy.ones', 'np.ones', ({(20, 43, 20, 46): '500'}, {}), '(500)', True, 'import numpy as np\n'), ((20, 49, 20, 62), 'numpy.zeros', 'np.zeros', ({(20, 58, 20, 61): '500'}, {}), '(500)', True, 'import numpy as np\n')]