pipeline.hifv.tasks.exportdata package

Submodules

pipeline.hifv.tasks.exportdata.vlaexportdata module

class pipeline.hifv.tasks.exportdata.vlaexportdata.VLAExportData(inputs)[source]

Bases: pipeline.h.tasks.exportdata.exportdata.ExportData

Inputs

alias of VLAExportDataInputs

prepare()[source]

Prepare and execute an export data job appropriate to the task inputs.

class pipeline.hifv.tasks.exportdata.vlaexportdata.VLAExportDataInputs(context, output_dir=None, session=None, vis=None, exportmses=None, exportcalprods=None, pprfile=None, calintents=None, calimages=None, targetimages=None, products_dir=None, gainmap=None, imaging_products_only=None)[source]

Bases: pipeline.h.tasks.exportdata.exportdata.ExportDataInputs

exportcalprods

VisDependentProperty is a Python data descriptor that standardises the behaviour of pipeline Inputs properties and lets them create default values more easily.

On reading a VisDependentProperty (ie. using the dot prefix: inputs.solint), one of two things happens:

  1. If a NullMarker is found - signifying that no user input has been provided - and a ‘getter’ function has been defined, the getter function will be called to provide a default value for that measurement set.

  2. If a user has overridden the value (eg. inputs.solint = 123), that value will be retrieved.

  3. The value, either the default from step 1 or user-provided from step 2, is run through the optional postprocess function, which gives a final opportunity to change the value depending on the state/value of other properties.

A VisDependentProperty can be made read-only by specifying ‘readonly=True’ when creating the instance.

A VisDependentProperty can be hidden from the containing Inputs string representation by setting ‘hidden=True’ when creating the instance. This will hide the property from the web log and CLI getInputs calls.

Each VisDependentProperty has a set of values it considers equivalent to null. When the user sets the VDP value to one of these null values, the VDP machinery converts this to a private NullObject marker that signifies the property is now unset, resulting in the default value being returned next time the property is read. Developers can specify which values should be converted to NullObject by specifying null_input at creation time, e.g.,

solint = @VisDependentProperty(default=5, null_input=[None, ‘’, ‘RESET’, -1])

gainmap

VisDependentProperty is a Python data descriptor that standardises the behaviour of pipeline Inputs properties and lets them create default values more easily.

On reading a VisDependentProperty (ie. using the dot prefix: inputs.solint), one of two things happens:

  1. If a NullMarker is found - signifying that no user input has been provided - and a ‘getter’ function has been defined, the getter function will be called to provide a default value for that measurement set.

  2. If a user has overridden the value (eg. inputs.solint = 123), that value will be retrieved.

  3. The value, either the default from step 1 or user-provided from step 2, is run through the optional postprocess function, which gives a final opportunity to change the value depending on the state/value of other properties.

A VisDependentProperty can be made read-only by specifying ‘readonly=True’ when creating the instance.

A VisDependentProperty can be hidden from the containing Inputs string representation by setting ‘hidden=True’ when creating the instance. This will hide the property from the web log and CLI getInputs calls.

Each VisDependentProperty has a set of values it considers equivalent to null. When the user sets the VDP value to one of these null values, the VDP machinery converts this to a private NullObject marker that signifies the property is now unset, resulting in the default value being returned next time the property is read. Developers can specify which values should be converted to NullObject by specifying null_input at creation time, e.g.,

solint = @VisDependentProperty(default=5, null_input=[None, ‘’, ‘RESET’, -1])

imaging_products_only

VisDependentProperty is a Python data descriptor that standardises the behaviour of pipeline Inputs properties and lets them create default values more easily.

On reading a VisDependentProperty (ie. using the dot prefix: inputs.solint), one of two things happens:

  1. If a NullMarker is found - signifying that no user input has been provided - and a ‘getter’ function has been defined, the getter function will be called to provide a default value for that measurement set.

  2. If a user has overridden the value (eg. inputs.solint = 123), that value will be retrieved.

  3. The value, either the default from step 1 or user-provided from step 2, is run through the optional postprocess function, which gives a final opportunity to change the value depending on the state/value of other properties.

A VisDependentProperty can be made read-only by specifying ‘readonly=True’ when creating the instance.

A VisDependentProperty can be hidden from the containing Inputs string representation by setting ‘hidden=True’ when creating the instance. This will hide the property from the web log and CLI getInputs calls.

Each VisDependentProperty has a set of values it considers equivalent to null. When the user sets the VDP value to one of these null values, the VDP machinery converts this to a private NullObject marker that signifies the property is now unset, resulting in the default value being returned next time the property is read. Developers can specify which values should be converted to NullObject by specifying null_input at creation time, e.g.,

solint = @VisDependentProperty(default=5, null_input=[None, ‘’, ‘RESET’, -1])

pipeline.hifv.tasks.exportdata.vlaifaqua module

class pipeline.hifv.tasks.exportdata.vlaifaqua.VLAAquaXmlGenerator[source]

Bases: pipeline.h.tasks.exportdata.aqua.AquaXmlGenerator

Class for creating the AQUA pipeline report

get_calibration_topic(context, topic_results)[source]

Get the XML for the calibration topic.

Parameters
  • context – pipeline context

  • topic_results – list of Results for this topic

Returns

XML for calibration topic

Return type

xml.etree.cElementTree.Element

get_dataset_topic(context, topic_results)[source]

Get the XML for the dataset topic.

Parameters
  • context – pipeline context

  • topic_results – list of Results for this topic

Returns

XML for dataset topic

Return type

xml.etree.cElementTree.Element

get_project_structure(context)[source]

Get the project structure element.

Given the current data flow it is unclear how the report generator generator will acquire the entity id of the original processing request.

The processing procedure name is known but not yet passed to the pipeline processing request.

Parameters

context – pipeline context

Returns

XML for project structure

Return type

xml.etree.cElementTree.Element

pipeline.hifv.tasks.exportdata.vlaifaqua.aqua_report_from_context(context, aqua_file)[source]

Create AQUA report from a context object.

pipeline.hifv.tasks.exportdata.vlaifaqua.aqua_report_from_file(context_file, aqua_file)[source]

Create AQUA report from a context file on disk.

pipeline.hifv.tasks.exportdata.vlaifaqua.aqua_test_report_from_local_file(context_file, aqua_file)[source]

Test AQUA report generation. The pipeline context file and web log directory must be in the same local directry

pipeline.hifv.tasks.exportdata.vlaifaqua.flux_xml_for_stages(context, results, accessor_dict)[source]

Get the XML for flux measurements contained in a list of results.

This function is a higher-order function; it expects to be given a dict of accessor functions, which it uses to access the flux measurements and QA score of the appropriate results. ‘Appropriate’ means that the task name matches the dict key. This lets the function call different accessor functions for different types of result.

The dict accessor dict uses task names as keys, with values as two-tuples comprising

  1. a function to access the flux measurements for a result

  2. a function to access the QA score for that result

Parameters
  • context – pipeline context

  • results – results to process

  • accessor_dict – dict of accessor functions

Returns

XML for flux measurements

Return type

xml.etree.cElementTree.Element

pipeline.hifv.tasks.exportdata.vlaifaqua.xml_for_extracted_flux_measurements(all_measurements, ms)[source]

Get the XML for a set of flux measurements extracted from a Result.

Parameters
  • all_measurements – flux measurements dict.

  • ms – measurement set

Returns

XML

Return type

xml.etree.cElementTree.Element

pipeline.hifv.tasks.exportdata.vlaifaqua.xml_for_flux_stage(context, stage_results, origin, accessor, score_accessor)[source]

Get the XML for all flux measurements contained in a ResultsList.

Parameters
  • context – pipeline context

  • stage_results – ResultList containing flux results to summarise

  • origin – text for Origin attribute value

  • accessor – function that returns the flux measurements from the Result

  • score_accessor – function that returns the QA score for the Result

Return type

xml.etree.cElementTree.Element

Module contents