<%inherit file="base.html"/> <% import collections import os.path skygenerator = context['data']['skygenerator'] frequency_axis = skygenerator['frequency axis'] sources = skygenerator['sources'] %>

Sky Model Parameters

% for k,v in skygenerator.items(): % if not isinstance(v, collections.Iterable): % endif % endfor
${k} ${v}
<% # construct html pages with sky model plane plots for iwn,wn in enumerate(frequency_axis): link = os.path.join(context['dirname'], 'skymodelplane%s.html' % (wn)) with open(link, 'w') as f: template = mylookup.get_template('skymodelplane.html') context_copy = context.kwargs context_copy['wn'] = wn context_copy['iwn'] = iwn context_copy['stagename'] = 'skygenerator' context_copy['resultname'] = 'sky model' f.write(template.render(**context_copy)) # construct html pages with model source spectra plots for sourceid in sources.keys(): link = os.path.join(context['dirname'], 'sourcespectrum%s.html' % ( sourceid)) with open(link, 'w') as f: template = mylookup.get_template('sourcespectrum.html') context_copy = context.kwargs context_copy['sourceid'] = sourceid context_copy['spectrum'] = context['data']['skygenerator']['sources']\ [sourceid]['spectrum'] f.write(template.render(**context_copy)) %>

Sky Model Planes

% for wn in frequency_axis: <% wnformatted = '%6.4gcm-1' % wn %>
...

${wnformatted}

% endfor
% if sources:

Model Source Spectra

% for sourceid in sources.keys():
...

Source${sourceid}

% endfor
% endif