-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheatmapGenerator.py
41 lines (36 loc) · 1.36 KB
/
heatmapGenerator.py
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
import matplotlib.pyplot as plt
import numpy as np
import time
def drawOscilationGraph(file, name, show):
data = np.loadtxt(file, delimiter=',')
print(data)
plt.imshow(data, cmap="gray", interpolation='none', aspect='auto')
plt.yticks([])
if show:
plt.show()
timestr = time.strftime("%Y%m%d-%H%M%S")
plt.savefig('img/' + name + "_" + timestr + ".png")
def drawAmplitudeGraph(file, name, show):
data = np.loadtxt(file, delimiter=',')
print(data)
plt.imshow(data, cmap="YlGnBu", interpolation='none', aspect='auto')
plt.colorbar()
plt.yticks([])
if show:
plt.show()
timestr = time.strftime("%Y%m%d-%H%M%S")
plt.savefig('img/' + name + "_" + timestr + ".png")
def drawPeriodGraph(file, name, show):
data = np.loadtxt(file, delimiter=',')
print(data)
plt.imshow(data, cmap="YlGnBu", interpolation='none', aspect='auto')
plt.colorbar()
plt.yticks([])
if show:
plt.show()
timestr = time.strftime("%Y%m%d-%H%M%S")
plt.savefig('img/'+name+"_"+timestr+".png")
drawOscilationGraph('extended_model_2_test.txt', "model_2_oscilations", False)
#drawOscilationGraph('extended_model_2_v3.txt', "model_2_oscilations", False)
drawAmplitudeGraph("extended_model_2_amplitudes_test.txt", "model_2_amplitude", False)
drawPeriodGraph("extended_model_2_periods_test.txt", "model_2_periods", False)