pipeline.hifa.tasks.exportdata package¶
Submodules¶
pipeline.hifa.tasks.exportdata.almaexportdata module¶
-
class
pipeline.hifa.tasks.exportdata.almaexportdata.
ALMAExportData
(inputs)[source]¶ Bases:
pipeline.h.tasks.exportdata.exportdata.ExportData
-
Inputs
¶ alias of
ALMAExportDataInputs
-
-
class
pipeline.hifa.tasks.exportdata.almaexportdata.
ALMAExportDataInputs
(context, output_dir=None, session=None, vis=None, exportmses=None, pprfile=None, calintents=None, calimages=None, targetimages=None, products_dir=None, imaging_products_only=None)[source]¶ Bases:
pipeline.h.tasks.exportdata.exportdata.ExportDataInputs
-
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:
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.
If a user has overridden the value (eg. inputs.solint = 123), that value will be retrieved.
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])
-
-
class
pipeline.hifa.tasks.exportdata.almaexportdata.
AuxFileProducts
(flux_file, antenna_file, cont_file, flagtargets_list)¶ Bases:
tuple
-
property
antenna_file
¶ Alias for field number 1
-
property
cont_file
¶ Alias for field number 2
-
property
flagtargets_list
¶ Alias for field number 3
-
property
flux_file
¶ Alias for field number 0
-
property
pipeline.hifa.tasks.exportdata.almaifaqua module¶
-
class
pipeline.hifa.tasks.exportdata.almaifaqua.
AlmaAquaXmlGenerator
[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_imaging_topic
(context, topic_results)[source]¶ Get the XML for the imaging topic.
- Parameters
context – pipeline context
topic_results – list of Results for this topic
- Returns
XML for imaging 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.hifa.tasks.exportdata.almaifaqua.
aqua_report_from_context
(context, aqua_file)[source]¶ Create AQUA report from a context object.
-
pipeline.hifa.tasks.exportdata.almaifaqua.
aqua_report_from_file
(context_file, aqua_file)[source]¶ Create AQUA report from a context file on disk.
-
pipeline.hifa.tasks.exportdata.almaifaqua.
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.hifa.tasks.exportdata.almaifaqua.
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
a function to access the flux measurements for a result
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.hifa.tasks.exportdata.almaifaqua.
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.hifa.tasks.exportdata.almaifaqua.
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