pipeline.h.tasks.applycal package

Submodules

pipeline.h.tasks.applycal.applycal module

class pipeline.h.tasks.applycal.applycal.Applycal(inputs)[source]

Bases: pipeline.infrastructure.basetask.StandardTaskTemplate

Applycal executes CASA applycal tasks for the current active context state, applying calibrations registered with the pipeline context to the target measurement set.

Applying the results from this task to the context marks the referred tables as applied. As a result, they will not be included in future on-the-fly calibration arguments.

Inputs

alias of ApplycalInputs

analyse(result)[source]

Determine the best parameters by analysing the given jobs before returning any final jobs to execute.

Parameters

jobs (a list ofJobRequest) – the job requests generated by prepare()

Return type

Result

modify_task_args(task_args)[source]
prepare()[source]

Prepare job requests for execution.

Parameters

parameters – the parameters to pass through to the subclass. Refer to the implementing subclass for specific information on what these parameters are.

Return type

a class implementing Result

process_flagsummary(flagsummary)[source]

Template entry point for processing flagdata summary dicts. Override this function to filter or otherwise process the flagdata summary results.

Parameters

flagsummary – the unfiltered, unprocessed flagsummary dict

Returns

class pipeline.h.tasks.applycal.applycal.ApplycalInputs(context, output_dir=None, vis=None, field=None, spw=None, antenna=None, intent=None, parang=None, applymode=None, flagbackup=None, flagsum=None, flagdetailedsum=None)[source]

Bases: pipeline.infrastructure.vdp.StandardInputs

ApplycalInputs defines the inputs for the Applycal pipeline task.

antenna

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])

applymode

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])

field

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])

flagbackup

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])

flagdetailedsum

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])

flagsum

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])

intent

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])

spw

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])

to_casa_args()[source]

Express these inputs as a dictionary of CASA arguments. The values in the dictionary are in a format suitable for CASA and can be directly passed to the CASA task.

Return type

a dictionary of string/??? kw/val pairs

class pipeline.h.tasks.applycal.applycal.ApplycalResults(applied=None, callib_map: Dict[str, str] = None)[source]

Bases: pipeline.infrastructure.basetask.Results

ApplycalResults is the results class for the pipeline Applycal task.

merge_with_context(context)[source]

Merges these results with the given context by examining the context and marking any applied caltables, so removing them from subsequent on-the-fly calibration calculations.

See :method:`~pipeline.Results.merge_with_context`

class pipeline.h.tasks.applycal.applycal.HpcApplycal(inputs)[source]

Bases: pipeline.infrastructure.sessionutils.ParallelTemplate

Inputs

alias of HpcApplycalInputs

Task

alias of Applycal

get_result_for_exception(vis, exception)[source]
class pipeline.h.tasks.applycal.applycal.HpcApplycalInputs(context, output_dir=None, vis=None, field=None, spw=None, antenna=None, intent=None, parang=None, applymode=None, flagbackup=None, flagsum=None, flagdetailedsum=None, parallel=None)[source]

Bases: pipeline.h.tasks.applycal.applycal.ApplycalInputs

property parallel

pipeline.h.tasks.applycal.qa module

class pipeline.h.tasks.applycal.qa.ApplycalListQAHandler[source]

Bases: pipeline.infrastructure.pipelineqa.QAPlugin

child_cls

alias of pipeline.h.tasks.applycal.applycal.ApplycalResults

handle(context, result)[source]
result_cls

alias of collections.abc.Iterable

class pipeline.h.tasks.applycal.qa.ApplycalQAHandler[source]

Bases: pipeline.infrastructure.pipelineqa.QAPlugin

child_cls = None
handle(context, result)[source]
result_cls

alias of pipeline.h.tasks.applycal.applycal.ApplycalResults

pipeline.h.tasks.applycal.renderer module

Created on 24 Oct 2014

@author: sjw

class pipeline.h.tasks.applycal.renderer.ApplycalAmpVsFreqPlotRenderer(context, result, plots)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer

class pipeline.h.tasks.applycal.renderer.ApplycalAmpVsFreqSciencePlotRenderer(context, result, plots)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer

class pipeline.h.tasks.applycal.renderer.ApplycalAmpVsTimePlotRenderer(context, result, plots)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer

class pipeline.h.tasks.applycal.renderer.ApplycalAmpVsUVPlotRenderer(context, result, plots)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer

class pipeline.h.tasks.applycal.renderer.ApplycalAmpVsUVSciencePlotRenderer(context, result, plots)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer

class pipeline.h.tasks.applycal.renderer.ApplycalPhaseVsFreqPlotRenderer(context, result, plots)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer

class pipeline.h.tasks.applycal.renderer.ApplycalPhaseVsTimePlotRenderer(context, result, plots)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer

class pipeline.h.tasks.applycal.renderer.ApplycalPhaseVsUVPlotRenderer(context, result, plots)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer

pipeline.h.tasks.applycal.renderer.FlagTotal

alias of pipeline.h.tasks.applycal.renderer.FlagSummary

class pipeline.h.tasks.applycal.renderer.T2_4MDetailsApplycalRenderer(uri='applycal.mako', description='Apply calibrations from context', always_rerender=False)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.T2_4MDetailsDefaultRenderer

calapps_for_result(result)[source]
caltypes_for_result(result)[source]
create_plots(context, results, plotter_cls, intents, renderer_cls=None, **kwargs)[source]

Create plots and return (dictionary of vis:[Plots], dict of vis:subpage URL).

create_science_plots(context, results)[source]

Create plots for the science targets, returning two dictionaries of vis:[Plots].

static create_uv_plots(context, results, weblog_dir)[source]
get_gain_solution_type(gaintable)[source]
plots_for_result(context, result, plotter_cls, intents, renderer_cls=None, **kwargs)[source]
static science_plots_for_result(context, result, plotter_cls, fields, uvrange=None, renderer_cls=None)[source]
update_mako_context(ctx, context, result)[source]
pipeline.h.tasks.applycal.renderer.copy_callibrary(results: pipeline.infrastructure.basetask.ResultsList, report_dir: str) → Dict[str, str][source]

Copy callibrary files across to the weblog stage directory, returning a Dict mapping MS name to the callibrary location on disk.

pipeline.h.tasks.applycal.renderer.deduplicate(context: pipeline.infrastructure.launcher.Context, all_plots: Dict[str, List[pipeline.infrastructure.renderer.logger.Plot]]) → Dict[str, List[pipeline.infrastructure.renderer.logger.Plot]][source]

Process a dict mapping vis to plots, deduplicating the plot list for each MS.

pipeline.h.tasks.applycal.renderer.get_brightest_field(ms, source, intent='TARGET')[source]

Analyse all fields associated with a source, identifying the brightest field as the field with highest median flux averaged over all spws.

Parameters
  • ms – measurementset to analyse

  • source – representative source

  • intent

Returns

pipeline.h.tasks.applycal.renderer.get_visstat_data_selection(ms, fields_for_source, spw_ids, intent)[source]

Validate a visstat data selection, removing field/spw combinations that are completely flagged.

Parameters
  • ms – MeasurementSet object, used to get MS filename

  • fields_for_source – iterable of Field domain objects

  • spw_ids – iterable of integer spw IDs

Returns

([Field, Field, …], [int, int, …])

Module contents