Rev | Line | |
---|
[17] | 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 | iwn = context['iwn']
|
---|
| 11 | sky_image = context['data']['skygenerator']['sky model'][:,:,iwn]
|
---|
| 12 | spatial_axis = context['data']['skygenerator']['spatial axis']
|
---|
| 13 |
|
---|
| 14 | plt.imshow(sky_image, interpolation='nearest', origin='lower',
|
---|
| 15 | aspect='equal', extent=[spatial_axis[0], spatial_axis[-1],
|
---|
| 16 | spatial_axis[0], spatial_axis[-1]])
|
---|
| 17 | plt.axis('image')
|
---|
| 18 |
|
---|
| 19 | wn = context['wn']
|
---|
| 20 | plt.title('Sky model plane %6.4gcm-1' % wn)
|
---|
| 21 |
|
---|
| 22 | plt.colorbar(orientation='vertical')
|
---|
| 23 | plt.savefig(os.path.join(context['dirname'], 'skymodelplane%s.png' % wn))
|
---|
| 24 | plt.close()
|
---|
| 25 | %>
|
---|
| 26 |
|
---|
| 27 | <!-- link to the plot from html -->
|
---|
| 28 |
|
---|
| 29 | <img src='skymodelplane${wn}.png' alt="The sky model should appear here<br>">
|
---|
Note:
See
TracBrowser
for help on using the repository browser.