# This script generates magnetic pattern, displays it and prints a C string.

from magneticPattern import MagneticPattern
import matplotlib.pyplot as plt
import numpy as np

mp = MagneticPattern()

print('Pattern length: ' + str(len(mp.pattern)))
print('Pattern as a C-style array:')
for item in mp.pattern:
    print(str(int(item)) + ', ', end='')


fig, (ax1, ax2) = plt.subplots(2)
fig.suptitle('Wavelet and magnetic pattern. Check terminal for c string')
ax1.plot(np.arange(len(mp.wavelet)), mp.wavelet)
ax2.plot(np.arange(len(mp.pattern)), mp.pattern)


plt.tight_layout()
plt.show()

46536bd652d5a672e367c02ae9ae0cb74b0d3427
<mask token>

<mask token>
print('Pattern length: ' + str(len(mp.pattern)))
print('Pattern as a C-style array:')
for item in mp.pattern:
    print(str(int(item)) + ', ', end='')
<mask token>
fig.suptitle('Wavelet and magnetic pattern. Check terminal for c string')
ax1.plot(np.arange(len(mp.wavelet)), mp.wavelet)
ax2.plot(np.arange(len(mp.pattern)), mp.pattern)
plt.tight_layout()
plt.show()

<mask token>
mp = MagneticPattern()
print('Pattern length: ' + str(len(mp.pattern)))
print('Pattern as a C-style array:')
for item in mp.pattern:
    print(str(int(item)) + ', ', end='')
fig, (ax1, ax2) = plt.subplots(2)
fig.suptitle('Wavelet and magnetic pattern. Check terminal for c string')
ax1.plot(np.arange(len(mp.wavelet)), mp.wavelet)
ax2.plot(np.arange(len(mp.pattern)), mp.pattern)
plt.tight_layout()
plt.show()

from magneticPattern import MagneticPattern
import matplotlib.pyplot as plt
import numpy as np
mp = MagneticPattern()
print('Pattern length: ' + str(len(mp.pattern)))
print('Pattern as a C-style array:')
for item in mp.pattern:
    print(str(int(item)) + ', ', end='')
fig, (ax1, ax2) = plt.subplots(2)
fig.suptitle('Wavelet and magnetic pattern. Check terminal for c string')
ax1.plot(np.arange(len(mp.wavelet)), mp.wavelet)
ax2.plot(np.arange(len(mp.pattern)), mp.pattern)
plt.tight_layout()
plt.show()

# This script generates magnetic pattern, displays it and prints a C string.

from magneticPattern import MagneticPattern
import matplotlib.pyplot as plt
import numpy as np

mp = MagneticPattern()

print('Pattern length: ' + str(len(mp.pattern)))
print('Pattern as a C-style array:')
for item in mp.pattern:
    print(str(int(item)) + ', ', end='')


fig, (ax1, ax2) = plt.subplots(2)
fig.suptitle('Wavelet and magnetic pattern. Check terminal for c string')
ax1.plot(np.arange(len(mp.wavelet)), mp.wavelet)
ax2.plot(np.arange(len(mp.pattern)), mp.pattern)


plt.tight_layout()
plt.show()
