source: trunk/templates/beamsgenerator.html@ 17

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

initial import

File size: 2.1 KB
Line 
1<%inherit file="base.html"/>
2
3<%
4import collections
5import matplotlib.pyplot as plt
6import os.path
7
8mylookup = context['mylookup']
9
10beamsgenerator = context['data']['beamsgenerator']
11wavenumbers = beamsgenerator['primary beam'].keys()
12%>
13
14<h2>Beam Generation Parameters</h2>
15
16<div class="row-fluid">
17 <table class="table table-condensed">
18 <tbody>
19 % for k,v in beamsgenerator.items():
20 <!-- don't render complicated objects-->
21 % if not isinstance(v, collections.Iterable):
22 <tr>
23 <td>${k}</td>
24 <td>${v}</td>
25 </tr>
26 % endif
27 % endfor
28 </tbody>
29 </table>
30<div>
31
32<%
33# construct html pages with primary beam plots
34for wn in wavenumbers:
35 link = os.path.join(context['dirname'], 'primarybeam%s.html' % (wn))
36 with open(link, 'w') as f:
37 template = mylookup.get_template('primarybeamplot.html')
38 context_copy = context.kwargs
39 context_copy['wn'] = wn
40 f.write(template.render(**context_copy))
41
42# construct html pages with dirty beam plots
43for wn in wavenumbers:
44 link = os.path.join(context['dirname'], 'dirtybeam%s.html' % (wn))
45 with open(link, 'w') as f:
46 template = mylookup.get_template('dirtybeamplot.html')
47 context_copy = context.kwargs
48 context_copy['wn'] = wn
49 f.write(template.render(**context_copy))
50%>
51
52<!-- link to the plot pages from this page -->
53
54<h3>Primary Beams</h3>
55<div class="row">
56% for wn in context['data']['beamsgenerator']['primary beam'].keys():
57 <%
58 wnformatted = '%6.4gcm-1' % wn
59 %>
60 <div class="col-xs-6 col-md-3">
61 <a href="primarybeam${wn}.html" class="thumbnail">
62 <img src="primarybeam${wn}.png" alt="...">
63 <div>
64 <h4>${wnformatted}</h4>
65 </div>
66 </a>
67 </div>
68% endfor
69</div>
70
71<h3>Dirty Beams</h3>
72<div class="row">
73% for wn in context['data']['beamsgenerator']['dirty beam'].keys():
74 <%
75 wnformatted = '%6.4gcm-1' % wn
76 %>
77 <div class="col-xs-6 col-md-3">
78 <a href="dirtybeam${wn}.html" class="thumbnail">
79 <img src="dirtybeam${wn}.png" alt="...">
80 <div>
81 <h4>${wnformatted}</h4>
82 </div>
83 </a>
84 </div>
85% endfor
86</div>
Note: See TracBrowser for help on using the repository browser.