pipeline.hifa.tasks.wvrgcalflag package

Submodules

pipeline.hifa.tasks.wvrgcalflag.display module

class pipeline.hifa.tasks.wvrgcalflag.display.WVRPhaseOffsetPlot(context, result)[source]

Bases: pipeline.hifa.tasks.common.displays.phaseoffset.PhaseOffsetPlot

class pipeline.hifa.tasks.wvrgcalflag.display.WVRPhaseOffsetPlotHelper(context, result, plot_per_antenna=True)[source]

Bases: pipeline.hifa.tasks.common.displays.phaseoffset.PhaseOffsetPlotHelper

class pipeline.hifa.tasks.wvrgcalflag.display.WVRPhaseOffsetSummaryPlot(context, result)[source]

Bases: pipeline.hifa.tasks.common.displays.phaseoffset.PhaseOffsetPlot

class pipeline.hifa.tasks.wvrgcalflag.display.WVRPhaseOffsetSummaryPlotHelper(context, result)[source]

Bases: pipeline.hifa.tasks.wvrgcalflag.display.WVRPhaseOffsetPlotHelper

class pipeline.hifa.tasks.wvrgcalflag.display.WVRPhaseVsBaselineChart(context, result)[source]

Bases: object

class WvrChartHelper(antennas)[source]

Bases: object

property antenna_filename_component
get_antennas()[source]
label_antenna(axes)[source]
create_plot(spw, scans, helper)[source]
get_data_object(data, corr_id)[source]
get_figfile(spw, scans, antennas)[source]
get_plot_wrapper(spw, scans, antenna)[source]
get_symbol_and_colour(pol, state='BEFORE')[source]

Get the plot symbol and colour for this polarization and bandtype.

plot()[source]
class pipeline.hifa.tasks.wvrgcalflag.display.WVRScoreFinder(delegate)[source]

Bases: object

get_score(spw, antenna)[source]

pipeline.hifa.tasks.wvrgcalflag.qa module

class pipeline.hifa.tasks.wvrgcalflag.qa.WvrgcalflagListQAHandler[source]

Bases: pipeline.infrastructure.pipelineqa.QAPlugin

QA handler for a list containing WvrgcalflagResults.

child_cls

alias of pipeline.hifa.tasks.wvrgcalflag.resultobjects.WvrgcalflagResults

handle(context, result)[source]
result_cls

alias of collections.abc.Iterable

class pipeline.hifa.tasks.wvrgcalflag.qa.WvrgcalflagQAHandler[source]

Bases: pipeline.infrastructure.pipelineqa.QAPlugin

QA handler for an uncontained WvrgcalflagResults.

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

alias of pipeline.hifa.tasks.wvrgcalflag.resultobjects.WvrgcalflagResults

pipeline.hifa.tasks.wvrgcalflag.renderer module

Created on 10 Sep 2014

@author: sjw

class pipeline.hifa.tasks.wvrgcalflag.renderer.T2_4MDetailsWvrgcalflagRenderer(uri='wvrgcalflag.mako', description='Calculate and flag WVR calibration', always_rerender=False)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.T2_4MDetailsDefaultRenderer

T2_4MDetailsWvrgcalflagRenderer generates the detailed T2_4M-level plots and output specific to the wvrgcalflag task.

static get_wvr_applications(result)[source]
update_mako_context(ctx, context, results)[source]
class pipeline.hifa.tasks.wvrgcalflag.renderer.WvrApplication(ms, gaintable, interpolated, applied)

Bases: tuple

property applied

Alias for field number 3

property gaintable

Alias for field number 1

property interpolated

Alias for field number 2

property ms

Alias for field number 0

class pipeline.hifa.tasks.wvrgcalflag.renderer.WvrcalflagMetricPlotsRenderer(context, result, plots)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer

update_json_dict(d, plot)[source]

Hook function that can be used by extending classes to extract extra parameters from the plot object and insert them into the JSON dictionary for that plot.

class pipeline.hifa.tasks.wvrgcalflag.renderer.WvrgcalflagFlagPlotRenderer(context, result, plots)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer

class pipeline.hifa.tasks.wvrgcalflag.renderer.WvrgcalflagPhaseOffsetPlotRenderer(context, result, plots)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer

update_json_dict(d, plot)[source]

Hook function that can be used by extending classes to extract extra parameters from the plot object and insert them into the JSON dictionary for that plot.

class pipeline.hifa.tasks.wvrgcalflag.renderer.WvrgcalflagPhaseOffsetVsBaselinePlotRenderer(context, result, plots)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer

pipeline.hifa.tasks.wvrgcalflag.resultobjects module

class pipeline.hifa.tasks.wvrgcalflag.resultobjects.WvrgcalflagResults(vis, flaggerresult=None, too_few_wvr=False, too_few_wvr_post_flagging=False)[source]

Bases: pipeline.infrastructure.basetask.Results

merge_with_context(context)[source]

Merge these results with the given context.

This method will be called during the execution of accept(). For calibration tasks, a typical implementation will register caltables with the pipeline callibrary.

At this point the result is deemed safe to merge, so no further checks on the context need be performed.

Parameters

context (Context) – the target Context

class pipeline.hifa.tasks.wvrgcalflag.resultobjects.WvrgcalflagViewResults(vis)[source]

Bases: pipeline.h.tasks.common.flaggableviewresults.FlaggableViewResults

pipeline.hifa.tasks.wvrgcalflag.wvrgcalflag module

class pipeline.hifa.tasks.wvrgcalflag.wvrgcalflag.Wvrgcalflag(inputs)[source]

Bases: pipeline.infrastructure.basetask.StandardTaskTemplate

Inputs

alias of WvrgcalflagInputs

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

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

class pipeline.hifa.tasks.wvrgcalflag.wvrgcalflag.WvrgcalflagInputs(context, output_dir=None, vis=None, caltable=None, offsetstable=None, hm_toffset=None, toffset=None, segsource=None, hm_tie=None, tie=None, sourceflag=None, nsol=None, disperse=None, wvrflag=None, hm_smooth=None, smooth=None, scale=None, maxdistm=None, minnumants=None, mingoodfrac=None, refant=None, flag_intent=None, qa_intent=None, qa_bandpass_intent=None, accept_threshold=None, flag_hi=None, fhi_limit=None, fhi_minsample=None, ants_with_wvr_thresh=None, ants_with_wvr_nr_thresh=None)[source]

Bases: pipeline.hifa.tasks.wvrgcal.wvrgcal.WvrgcalInputs

WvrgcalflagInputs defines the inputs for the Wvrgcalflag pipeline task.

ants_with_wvr_nr_thresh

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

ants_with_wvr_thresh

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

fhi_limit

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

fhi_minsample

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

flag_hi

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

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

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

pipeline.hifa.tasks.wvrgcalflag.wvrgcalflagsetter module

class pipeline.hifa.tasks.wvrgcalflag.wvrgcalflagsetter.WvrgcalFlagSetter(inputs)[source]

Bases: pipeline.infrastructure.basetask.StandardTaskTemplate

Inputs

alias of WvrgcalFlagSetterInputs

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

flags_to_set(flags)[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

class pipeline.hifa.tasks.wvrgcalflag.wvrgcalflagsetter.WvrgcalFlagSetterInputs(context, table, vis=None, datatask=None)[source]

Bases: pipeline.infrastructure.vdp.StandardInputs

This class handles the setting of bad antennas in wvrgcal.

class pipeline.hifa.tasks.wvrgcalflag.wvrgcalflagsetter.WvrgcalFlagSetterResult(jobs=None, results=None)[source]

Bases: pipeline.infrastructure.basetask.Results

merge_with_context(context)[source]

Merge these results with the given context.

This method will be called during the execution of accept(). For calibration tasks, a typical implementation will register caltables with the pipeline callibrary.

At this point the result is deemed safe to merge, so no further checks on the context need be performed.

Parameters

context (Context) – the target Context

Module contents