Changeset 37


Ignore:
Timestamp:
Jun 10, 2014 10:39:22 AM (10 years ago)
Author:
JohnLightfoot
Message:

seems to be working version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/templates/doublefourier.html

    r28 r37  
    5050    context_copy['spectrum'] = context['data']['doublefourier']\
    5151      ['skyfft spectrum at time 0']
    52     print 'before'
    5352    f.write(template.render(**context_copy))
    54     print 'after'
    5553
    5654link = os.path.join(context['dirname'], 'baselineffttest.html')
     
    6159    context_copy['spectrum'] = context['data']['doublefourier']\
    6260      ['test FTS at time 0']
    63     print 'before'
    6461    f.write(template.render(**context_copy))
    65     print 'after'
     62
     63baselines = context['data']['doublefourier']['baseline interferograms'].keys()
     64baseline_link = {}
     65for 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'
    6696%>
    6797
     
    120150
    121151<h3>Measured spectrum at t=0</h3>
    122 <div class="col-xs-6 col-md-3">
     152<div>
    123153  <a href="sourcespectrumbaseline.html" class="thumbnail">
    124154    <img src="sourcespectrumbaseline.png" alt="...">
     
    127157
    128158<h3>Measured interferogram at t=0</h3>
    129 <div class="col-xs-6 col-md-3">
     159<div>
    130160  <a href="baselineffttest.html" class="thumbnail">
    131161    <img src="sourcespectrumtestfft.png" alt="...">
    132162  </a>
    133163</div>
     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
Note: See TracChangeset for help on using the changeset viewer.