pipeline.h.tasks.exportdata.aqua

Prototype pipeline AQUA report generator

Definitions

Metrics are physical quantities, e.g. phase rms improvement resulting from WVR calibration., % data flagged, etc

Scores are numbers between 0.0 and 1.0 derived from metrics. Not all metrics currently derived in the pipeline are scored.

Structure
The report contains

A project structure section. A QA summary section. A per stage QA section. A per topic QA section.

Issues with the Original Schema / Current Pipeline Design

The per ASDM dimension was ignored.

The multiple metrics / scores per stage and / or per ASDM dimension was ignored.

For stages with single scores / metrics and multiple ASDMs the current report generator selects the MS with the worst metric and reports that value. This metric by definition corresponds to the lowest score.

Stages which generate multiple scores / metrics and multiple ASDMs are currently dealt with on an ad hoc basis.

The scores and metrics are noew stored with the stage results.

Metrics may have units information. They may be encoded as CASA quanta strings if appropriate.

Future Technical Solutions

Suggestions Add a toAqua method to the base results class which returns a list of metrics for export. Pass these to the QA classes for scoring.

Add the euivalent of a toAqua registration method similar to what is done with QA handlers already

Functions

export_to_disk(report, filename)

Convert an XML document to a nicely formatted XML string and save it in a file.

register_aqua_metric(fn)

Register a ‘QA metric to XML’ conversion function.

sensitivity_xml_for_stages(context, results)

Get the XML for all sensitivities reported by all tasks.

vis_to_asdm(vispath)

Get the expected ASDM name from the path of a measurement set.

xml_for_sensitivity(d)

Return the XML representation for a sensitivity dictionary.

xml_for_sensitivity_stage(context, …)

Translate the sensitivity dictionaries contained in a task result to XML.

xml_generator_for_metric(qa_label, value_spec)

Return a function that converts a matching QAScore to XML.

Classes

AquaXmlGenerator()

Class to create the XML for an AQUA pipeline report.

GenericMetricXmlGenerator()

Metric XML Generator that processes any score it is given, formatting the metric value to 3dp.

LowestScoreMetricXmlGenerator(metric_name[, …])

Metric XML Generator that only returns XML for the lowest QA score that it handles.

MetricXmlGenerator(metric_name[, formatters])

Creates a AQUA report XML element for QA scores.