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