diff --git a/rfinder/rfinder_files.py b/rfinder/rfinder_files.py
index 38c2dd9..eca57d1 100644
--- a/rfinder/rfinder_files.py
+++ b/rfinder/rfinder_files.py
@@ -468,9 +468,17 @@ def write_html_summaryreport(cfg_par):
image_encoded4 = None
if cfg_par['plots']['plot_summary']['report'] == True:
+ image_tags = {}
+ if image_encoded1:
+ image_tags['video_tag1'] = ''.format(image_encoded1.decode())
+ if image_encoded2:
+ image_tags['video_tag2'] = ''.format(image_encoded2.decode())
+ if image_encoded3:
+ image_tags['video_tag3'] = ''.format(image_encoded3.decode())
+ if image_encoded4:
+ image_tags['video_tag4'] = ''.format(image_encoded4.decode())
with open(cfg_par['general']['rfidir']+'summary_report.html', "w") as f:
-# lenghts = np.array([cfg_par['rfi']['baseline_lenghts']])+0.
f.write(template.render(
title=title,
fieldname=cfg_par['general']['fieldname'],
@@ -483,16 +491,10 @@ def write_html_summaryreport(cfg_par):
enddate = ('{0:%y}{0:%b}{0:%d} {0:%X}'.format(cfg_par['rfi']['enddate'].datetime)),
nant = cfg_par['rfi']['nant'],
ant_names = cfg_par['rfi']['ant_names'],
- # maxbase = str(np.round(lenghts[0][-1],0)),
- # minbase = str(np.round(lenghts[0][0],0)),
- # totbase = cfg_par['rfi']['number_baseline'],
exptime = np.round(cfg_par['rfi']['exptime']*60.,2),
polnum = cfg_par['rfi']['polnum'],
noise = np.round(cfg_par['rfi']['theo_rms'][0]*1e3,5),
- video_tag1 = ''.format(image_encoded1.decode()),
- video_tag2 = ''.format(image_encoded2.decode()),
- video_tag3 = ''.format(image_encoded3.decode()),
- video_tag4 = ''.format(image_encoded4.decode())
+ **image_tags
))