diff --git a/atdb/taskdatabase/services/algorithms.py b/atdb/taskdatabase/services/algorithms.py index dab7b5c254a11ba7a5edc3b064098c93776f9ae7..1b56a066011c7a732d96e7a89bf5b84341973da6 100644 --- a/atdb/taskdatabase/services/algorithms.py +++ b/atdb/taskdatabase/services/algorithms.py @@ -944,6 +944,9 @@ def construct_imaging_summary(task): totals = "" results = "" + total_size_to_process = 0 + total_size_processed = 0 + total_total_processing_time = 0 quality_values = {'poor': 0, 'moderate': 0, 'good': 0} @@ -960,14 +963,16 @@ def construct_imaging_summary(task): results += '<tr style="background-color:#7EB1C4"><td colspan="3"><b>Task ' + str(task.id) + '</b></td></tr>' + total_size_to_process += task.size_to_process + total_size_processed += task.size_processed + total_total_processing_time += task.total_processing_time + # find the summary in the quality json structure try: summary = task.quality_json["summary"] + results += '<tr><td><b>size_to_process</b></td><td>' + str(task.size_to_process) + '</td></tr>' + results += '<tr><td><b>size_processed</b></td><td>' + str(task.size_processed) + '</td></tr>' - applied_fixes = summary['applied_fixes'] - rfi_perc_total = summary['rfi_perc_total'] - - details = summary["details"] results += '<tr><td><b>applied_fixes</b></td><td>' + str(summary['applied_fixes']) + '</td></tr>' results += '<tr><td><b>rfi_perc_total</b></td><td>' + str(summary['rfi_perc_total']) + '</td></tr>' results += '<tr><td><b>elevation_score</b></td><td>' + str(summary['elevation_score']) + '</td></tr>' @@ -983,6 +988,8 @@ def construct_imaging_summary(task): results += '<tr><td><b>array_high_data_loss_on_dutch_important_pair</b></td><td>' + str(summary['array_high_data_loss_on_dutch_important_pair']) + '</td></tr>' results += '<tr style="background-color:#7EB100"><td colspan="3"><b>Details</b></td></tr>' + details = summary["details"] + results += '<tr><td><b>Antenna configuration</b></td><td>' + str(details['antenna_configuration']) + '</td></tr>' results += '<tr><td><b>Antennas not available</b></td><td>' + str(details['antennas_not_available']) + '</td></tr>' @@ -1035,6 +1042,9 @@ def construct_imaging_summary(task): totals += '<th>Totals</th><th></th><th width="35%"></th>' try: + totals += '<tr><td colspan="2"><b>Size to process</b></td><td>' + str(total_size_to_process) + '</td></tr>' + totals += '<tr><td colspan="2"><b>Size processed</b><td>' + str(total_size_processed) + '</td></tr>' + try: # add calculated quality per sasid (if present) if calculated_qualities: