source: trunk/templates/sourcespectrum.html@ 26

Last change on this file since 26 was 26, checked in by JohnLightfoot, 10 years ago

debug statements removed

File size: 563 bytes
Line 
1<%inherit file="base.html"/>
2
3<!-- do the plotting -->
4<%
5import matplotlib.pyplot as plt
6import os.path
7
8plt.figure()
9
10sourceid = context['sourceid']
11spectrum = context['data']['skygenerator']['sources'][sourceid]['spectrum']
12frequency_axis = context['data']['skygenerator']['frequency axis']
13
14plt.plot(frequency_axis, spectrum)
15plt.title('Source %s' % sourceid)
16
17plt.savefig(os.path.join(context['dirname'], 'sourcespectrum%s.png' % sourceid))
18plt.close()
19%>
20
21<!-- link to the plot from html -->
22
23<img src='sourcespectrum${sourceid}.png' alt="Source spectrum">
Note: See TracBrowser for help on using the repository browser.