source: trunk/templates/uvmapgenerator.html

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

almost working

File size: 1.0 KB
Line 
1<%inherit file="base.html"/>
2
3<!-- do the plotting -->
4<%
5import matplotlib.pyplot as plt
6import os.path
7
8fig, ax = plt.subplots()
9bxby = context['data']['uvmapgenerator']['bxby']
10ax.plot(list(bxby[:,0]) + list(-bxby[:,0]), list(bxby[:,1]) + list(-bxby[:,1]),
11 'go')
12ax.grid()
13plt.xlabel('u (m)')
14plt.ylabel('v (m)')
15plt.title('u-v plane')
16ax.axis('equal')
17
18plt.savefig(os.path.join(context['dirname'], 'uvmap.png'))
19plt.close()
20%>
21
22 <div class="row-fluid">
23 <table class="table table-condensed" summary="FTS parameters">
24 <tbody>
25 <%
26 uvmap = context['data']['uvmapgenerator']
27 %>
28 % for k,v in uvmap.items():
29 <!-- don't render large arrays-->
30 % if k not in ['bxby', 'obs_framework']:
31 <tr>
32 <td>${k}</td>
33 <td>${v}</td>
34 </tr>
35 % endif
36 % endfor
37 </tbody>
38 </table>
39 <div>
40
41<!-- link to the plot from html -->
42
43<img src='uvmap.png' alt="The UV map should appear here">
Note: See TracBrowser for help on using the repository browser.