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 | <%
|
---|
5 | import matplotlib.pyplot as plt
|
---|
6 | import os.path
|
---|
7 |
|
---|
8 | plt.figure()
|
---|
9 |
|
---|
10 | sourceid = context['sourceid']
|
---|
11 | spectrum = context['data']['skygenerator']['sources'][sourceid]['spectrum']
|
---|
12 | frequency_axis = context['data']['skygenerator']['frequency axis']
|
---|
13 |
|
---|
14 | plt.plot(frequency_axis, spectrum)
|
---|
15 | plt.title('Source %s' % sourceid)
|
---|
16 |
|
---|
17 | plt.savefig(os.path.join(context['dirname'], 'sourcespectrum%s.png' % sourceid))
|
---|
18 | plt.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.