[17] | 1 | <%inherit file="base.html"/>
|
---|
| 2 |
|
---|
| 3 | <!-- do the plotting -->
|
---|
| 4 | <%
|
---|
| 5 | import os.path
|
---|
| 6 |
|
---|
| 7 | frequency_axis = context['data']['doublefourier']['frequency axis']
|
---|
| 8 |
|
---|
[28] | 9 | # construct html pages with sky model plane plots
|
---|
| 10 | for iwn,wn in enumerate(frequency_axis):
|
---|
| 11 | link = os.path.join(context['dirname'], 'skymodelt0plane%s.html' % (wn))
|
---|
| 12 | with open(link, 'w') as f:
|
---|
| 13 | template = mylookup.get_template('skymodelplane.html')
|
---|
| 14 | context_copy = context.kwargs
|
---|
| 15 | context_copy['wn'] = wn
|
---|
| 16 | context_copy['iwn'] = iwn
|
---|
| 17 | context_copy['stagename'] = 'doublefourier'
|
---|
| 18 | context_copy['resultname'] = 'sky at time 0'
|
---|
| 19 | f.write(template.render(**context_copy))
|
---|
[17] | 20 |
|
---|
[28] | 21 | for iwn,wn in enumerate(frequency_axis):
|
---|
| 22 | link = os.path.join(context['dirname'],
|
---|
| 23 | 'skymodelpbt0plane%s.html' % (wn))
|
---|
| 24 | with open(link, 'w') as f:
|
---|
| 25 | template = mylookup.get_template('skymodelplane.html')
|
---|
| 26 | context_copy = context.kwargs
|
---|
| 27 | context_copy['wn'] = wn
|
---|
| 28 | context_copy['iwn'] = iwn
|
---|
| 29 | context_copy['stagename'] = 'doublefourier'
|
---|
| 30 | context_copy['resultname'] = 'sky*beams at time 0'
|
---|
| 31 | f.write(template.render(**context_copy))
|
---|
[17] | 32 |
|
---|
[28] | 33 | for iwn,wn in enumerate(frequency_axis):
|
---|
| 34 | link = os.path.join(context['dirname'],
|
---|
| 35 | 'skymodelfftt0plane%s.html' % (wn))
|
---|
| 36 | with open(link, 'w') as f:
|
---|
| 37 | template = mylookup.get_template('skymodelplane.html')
|
---|
| 38 | context_copy = context.kwargs
|
---|
| 39 | context_copy['wn'] = wn
|
---|
| 40 | context_copy['iwn'] = iwn
|
---|
| 41 | context_copy['stagename'] = 'doublefourier'
|
---|
| 42 | context_copy['resultname'] = 'skyfft at time 0'
|
---|
| 43 | f.write(template.render(**context_copy))
|
---|
[17] | 44 |
|
---|
[28] | 45 | link = os.path.join(context['dirname'], 'sourcespectrumbaseline.html')
|
---|
| 46 | with open(link, 'w') as f:
|
---|
| 47 | template = mylookup.get_template('sourcespectrum.html')
|
---|
| 48 | context_copy = context.kwargs
|
---|
| 49 | context_copy['sourceid'] = 'baseline'
|
---|
| 50 | context_copy['spectrum'] = context['data']['doublefourier']\
|
---|
| 51 | ['skyfft spectrum at time 0']
|
---|
| 52 | f.write(template.render(**context_copy))
|
---|
[17] | 53 |
|
---|
[28] | 54 | link = os.path.join(context['dirname'], 'baselineffttest.html')
|
---|
| 55 | with open(link, 'w') as f:
|
---|
| 56 | template = mylookup.get_template('sourcespectrum.html')
|
---|
| 57 | context_copy = context.kwargs
|
---|
| 58 | context_copy['sourceid'] = 'testfft'
|
---|
| 59 | context_copy['spectrum'] = context['data']['doublefourier']\
|
---|
| 60 | ['test FTS at time 0']
|
---|
| 61 | f.write(template.render(**context_copy))
|
---|
[37] | 62 |
|
---|
| 63 | baselines = context['data']['doublefourier']['baseline interferograms'].keys()
|
---|
| 64 | baseline_link = {}
|
---|
| 65 | for baseline in baselines:
|
---|
| 66 | filename = 'interferogram_%s_%s.html' % baseline
|
---|
| 67 | filename = filename.replace('-', 'm')
|
---|
| 68 | baseline_link[baseline] = filename
|
---|
| 69 | link = os.path.join(context['dirname'], filename)
|
---|
| 70 | with open(link, 'w') as f:
|
---|
| 71 | template = mylookup.get_template('sourcespectrum.html')
|
---|
| 72 | context_copy = context.kwargs
|
---|
| 73 | context_copy['sourceid'] = '_%s_%s_fft' % (baseline)
|
---|
| 74 | context_copy['spectrum'] = context['data']['doublefourier']\
|
---|
| 75 | ['baseline interferograms'][baseline]
|
---|
| 76 | f.write(template.render(**context_copy))
|
---|
| 77 |
|
---|
| 78 | #times = context['data']['doublefourier']['skyfft check'].keys()
|
---|
| 79 | #times.sort()
|
---|
| 80 | #print 'times', times
|
---|
| 81 | #time_link = {}
|
---|
| 82 | #for t in times:
|
---|
| 83 | # filename = 'interferogram_%s.html' % t
|
---|
| 84 | # time_link[t] = filename
|
---|
| 85 | # link = os.path.join(context['dirname'], filename)
|
---|
| 86 | # print 'link', link
|
---|
| 87 | # with open(link, 'w') as f:
|
---|
| 88 | # template = mylookup.get_template('sourcespectrum.html')
|
---|
| 89 | # context_copy = context.kwargs
|
---|
| 90 | # context_copy['sourceid'] = '_%s_fft' % (t)
|
---|
| 91 | # context_copy['spectrum'] = context['data']['doublefourier']\
|
---|
| 92 | # ['skyfft check'][t]
|
---|
| 93 | # print 'before'
|
---|
| 94 | # f.write(template.render(**context_copy))
|
---|
| 95 | # print 'after'
|
---|
[28] | 96 | %>
|
---|
[17] | 97 |
|
---|
[28] | 98 | <!-- link to the plot pages from this page -->
|
---|
[17] | 99 |
|
---|
[28] | 100 | <h3>Sky Model Planes at t=0</h3>
|
---|
| 101 | <div class="row">
|
---|
| 102 | % for wn in frequency_axis:
|
---|
| 103 | <%
|
---|
| 104 | wnformatted = '%6.4gcm-1' % wn
|
---|
| 105 | %>
|
---|
| 106 | <div class="col-xs-6 col-md-3">
|
---|
| 107 | <a href="skymodelt0plane${wn}.html" class="thumbnail">
|
---|
| 108 | <img src="sky_at_time_0plane${wn}.png" alt="...">
|
---|
| 109 | <div>
|
---|
| 110 | <h4>${wnformatted}</h4>
|
---|
| 111 | </div>
|
---|
| 112 | </a>
|
---|
| 113 | </div>
|
---|
| 114 | % endfor
|
---|
| 115 | </div>
|
---|
[17] | 116 |
|
---|
[28] | 117 | <h3>Sky Model Planes*Pb at t=0</h3>
|
---|
| 118 | <div class="row">
|
---|
| 119 | % for wn in frequency_axis:
|
---|
| 120 | <%
|
---|
| 121 | wnformatted = '%6.4gcm-1' % wn
|
---|
| 122 | %>
|
---|
| 123 | <div class="col-xs-6 col-md-3">
|
---|
| 124 | <a href="skymodelpbt0plane${wn}.html" class="thumbnail">
|
---|
| 125 | <img src="sky_beams_at_time_0plane${wn}.png" alt="...">
|
---|
| 126 | <div>
|
---|
| 127 | <h4>${wnformatted}</h4>
|
---|
| 128 | </div>
|
---|
| 129 | </a>
|
---|
| 130 | </div>
|
---|
| 131 | % endfor
|
---|
| 132 | </div>
|
---|
[17] | 133 |
|
---|
[28] | 134 | <h3>Sky Model FFT at t=0</h3>
|
---|
| 135 | <div class="row">
|
---|
| 136 | % for wn in frequency_axis:
|
---|
| 137 | <%
|
---|
| 138 | wnformatted = '%6.4gcm-1' % wn
|
---|
| 139 | %>
|
---|
| 140 | <div class="col-xs-6 col-md-3">
|
---|
| 141 | <a href="skymodelfftt0plane${wn}.html" class="thumbnail">
|
---|
| 142 | <img src="skyfft_at_time_0plane${wn}.png" alt="...">
|
---|
| 143 | <div>
|
---|
| 144 | <h4>${wnformatted}</h4>
|
---|
| 145 | </div>
|
---|
| 146 | </a>
|
---|
| 147 | </div>
|
---|
| 148 | % endfor
|
---|
| 149 | </div>
|
---|
[17] | 150 |
|
---|
[28] | 151 | <h3>Measured spectrum at t=0</h3>
|
---|
[37] | 152 | <div>
|
---|
[28] | 153 | <a href="sourcespectrumbaseline.html" class="thumbnail">
|
---|
| 154 | <img src="sourcespectrumbaseline.png" alt="...">
|
---|
| 155 | </a>
|
---|
| 156 | </div>
|
---|
[17] | 157 |
|
---|
[28] | 158 | <h3>Measured interferogram at t=0</h3>
|
---|
[37] | 159 | <div>
|
---|
[28] | 160 | <a href="baselineffttest.html" class="thumbnail">
|
---|
| 161 | <img src="sourcespectrumtestfft.png" alt="...">
|
---|
| 162 | </a>
|
---|
| 163 | </div>
|
---|
[37] | 164 |
|
---|
| 165 | <h3>Baseline Interferograms</h3>
|
---|
| 166 | % for baseline in baselines:
|
---|
| 167 | <div class="col-xs-6 col-md-3">
|
---|
| 168 | <a href="${baseline_link[baseline]}" class="thumbnail">
|
---|
| 169 | <img src="sourcespectrum_${baseline[0]}_${baseline[1]}_fft.png" alt="...">
|
---|
| 170 | </a>
|
---|
| 171 | </div>
|
---|
| 172 | % endfor
|
---|
| 173 |
|
---|
| 174 | ##<h3>Check Interferograms</h3>
|
---|
| 175 | ##% for t in times:
|
---|
| 176 | ##<div class="col-xs-6 col-md-3">
|
---|
| 177 | ## <a href="${time_link[t]}" class="thumbnail">
|
---|
| 178 | ## <img src="sourcespectrum_${t}_fft.png" alt="...">
|
---|
| 179 | ## </a>
|
---|
| 180 | ##</div>
|
---|
| 181 | ##% endfor
|
---|