Skip to content
Snippets Groups Projects
Commit 0c880204 authored by Daniel Brown's avatar Daniel Brown
Browse files

Fixes to timing profile plotting

parent c1513d04
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ s s1 10 1 n1 n2
m m1 0.5 0.5 0 n2 n3
s s2 10 1 n3 n4
m m2 0.5 0.5 0 n4 dump
maxtem 10
pd PD1 n2
xaxis m1 phi lin 0 360 10000
xaxis m1 phi lin 0 360 1000
import sys
sys.path.append("../")
from pykat import finesse
import pykat.profiling
from pykat import finesse, profiling
import numpy as np
import pylab as pl
......@@ -13,6 +12,8 @@ kat.getPerformanceData = True
[run, perfdata] = kat.run(printout=0,printerr=0)
pykat.profiling.plotReducedPerformanceData(perfdata)
l,t,fig = profiling.plotReducedPerformanceData(perfdata)
fig.savefig("Timing.png",pad_inches=0.1, bbox_inches='tight')
fig.show()
\ No newline at end of file
......@@ -21,6 +21,7 @@ def plotReducedPerformanceData(perfdata, ordered=False):
plt = fig.add_subplot(111)
plt.barh(ind, times, height=0.5, log=True, align='center')
pl.yticks(ind, labels)
pl.show()
pl.xlabel("Time [s]")
pl.title("Timing data for FINESSE")
return labels, times
\ No newline at end of file
return labels, times, fig
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment