%inherit file="base.html"/>
<%
import matplotlib.pyplot as plt
import os.path
plt.figure()
print 'context'
print context
sourceid = context['sourceid']
print sourceid
spectrum = context['data']['skygenerator']['sources'][sourceid]['spectrum']
print 'here'
frequency_axis = context['data']['skygenerator']['frequency axis']
print 'here1'
plt.plot(frequency_axis, spectrum)
plt.title('Source %s' % sourceid)
print 'here2'
plt.savefig(os.path.join(context['dirname'], 'sourcespectrum%s.png' % sourceid))
plt.close()
%>