source: trunk/templates/primarybeamplot.html@ 17

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

initial import

File size: 780 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
10wn = context['wn']
11beam_image = context['data']['beamsgenerator']['primary beam'][wn]
12plt.imshow(beam_image.data, interpolation='nearest', origin='lower',
13 aspect='equal', extent=[beam_image.axes[0].data[0],
14 beam_image.axes[0].data[-1], beam_image.axes[1].data[0],
15 beam_image.axes[1].data[-1]])
16plt.axis('image')
17
18plt.colorbar(orientation='vertical')
19plt.xlabel(beam_image.axes[0].title)
20plt.ylabel(beam_image.axes[1].title)
21plt.title(beam_image.title)
22
23plt.savefig(os.path.join(context['dirname'], 'primarybeam%s.png' % wn))
24plt.close()
25%>
26
27<!-- link to the plot from html -->
28
29<img src='primarybeam${wn}.png' alt="The primary beam should appear here">
30
Note: See TracBrowser for help on using the repository browser.