pipeline.hifv.tasks.priorcals package

Submodules

pipeline.hifv.tasks.priorcals.opacitiesdisplay module

class pipeline.hifv.tasks.priorcals.opacitiesdisplay.opacitiesSummaryChart(context, result)[source]

Bases: object

get_figfile()[source]
plot()[source]

pipeline.hifv.tasks.priorcals.priorcals module

Example usage:

inputs = pipeline.vla.tasks.priorcals.Priorcals.Inputs(context) task = pipeline.vla.tasks.priorcals.Priocals(inputs) result = task.exectue(dry_run=False) result.accept(context)

class pipeline.hifv.tasks.priorcals.priorcals.Priorcals(inputs)[source]

Bases: pipeline.infrastructure.basetask.StandardTaskTemplate

Inputs

alias of PriorcalsInputs

analyse(results)[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.hifv.tasks.priorcals.priorcals.PriorcalsInputs(context, vis=None, tecmaps=None, swpow_spw=None)[source]

Bases: pipeline.infrastructure.vdp.StandardInputs

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

tecmaps

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

pipeline.hifv.tasks.priorcals.priorcals.correct_ant_posns(vis_name, print_offsets=False)[source]

Given an input visibility MS name (vis_name), find the antenna position offsets that should be applied. This application should be via the gencal task, using caltype=’antpos’.

If the print_offsets parameter is True, will print out each of the found offsets (or indicate that none were found), otherwise runs silently.

A list is returned where the first element is the returned error code, the second element is a string of the antennas, and the third element is a list of antenna Bx,By,Bz offsets. An example return list might look like: [ 0, ‘ea01,ea19’, [0.0184, -0.0065, 0.005, 0.0365, -0.0435, 0.0543] ]

Usage examples:

CASA <1>: antenna_offsets = correct_ant_posns(‘test.ms’) CASA <2>: if (antenna_offsets[0] == 0): CASA <3>: gencal(vis=’test.ms’, caltable=’cal.G’, caltype=’antpos’, antenna=antenna_offsets[1], parameter=antenna_offsets[2])

This function does NOT work for VLA datasets, only EVLA. If an attempt is made to use the function for VLA data (prior to 2010), an error code of 1 is returned.

The offsets are retrieved over the internet. A description and the ability to manually examine and retrieve offsets is at: http://www.vla.nrao.edu/astro/archive/baselines/ If the attempt to establish the internet connection fails, an error code of 2 is returned.

Uses the same algorithm that the AIPS task VLANT does.

bjb nrao spring 2012

Update: BJB NRAO Spring 2020 (fixed version)

pipeline.hifv.tasks.priorcals.qa module

class pipeline.hifv.tasks.priorcals.qa.PriorcalsListQAHandler[source]

Bases: pipeline.infrastructure.pipelineqa.QAPlugin

QA handler for a list containing PriorcalsResults.

child_cls

alias of pipeline.hifv.tasks.priorcals.resultobjects.PriorcalsResults

generating_task

alias of pipeline.hifv.tasks.priorcals.priorcals.Priorcals

handle(context, result)[source]
result_cls

alias of collections.abc.Iterable

class pipeline.hifv.tasks.priorcals.qa.PriorcalsQAHandler[source]

Bases: pipeline.infrastructure.pipelineqa.QAPlugin

child_cls = None
generating_task

alias of pipeline.hifv.tasks.priorcals.priorcals.Priorcals

handle(context, result)[source]
result_cls

alias of pipeline.hifv.tasks.priorcals.resultobjects.PriorcalsResults

pipeline.hifv.tasks.priorcals.renderer module

Created on 24 Oct 2014

@author: brk

class pipeline.hifv.tasks.priorcals.renderer.T2_4MDetailspriorcalsRenderer(uri='priorcals.mako', description='Priorcals (gaincurves, opacities, antenna positions corrections, rq gains, and switched power)', always_rerender=False)[source]

Bases: pipeline.infrastructure.renderer.basetemplates.T2_4MDetailsDefaultRenderer

get_display_context(context, results)[source]
class pipeline.hifv.tasks.priorcals.renderer.VLASubPlotRenderer(context, result, plots, json_path, template, filename_prefix)[source]

Bases: object

property dirname
property filename
get_file()[source]
property path
render()[source]

pipeline.hifv.tasks.priorcals.resultobjects module

class pipeline.hifv.tasks.priorcals.resultobjects.PriorcalsResults(final=None, pool=None, preceding=None, gc_result=None, oc_result=None, rq_result=None, antpos_result=None, antcorrect=None, tecmaps_result=None, sw_result=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

pipeline.hifv.tasks.priorcals.swpowdisplay module

class pipeline.hifv.tasks.priorcals.swpowdisplay.swpowPerAntennaChart(context, result, yaxis)[source]

Bases: object

plot()[source]
class pipeline.hifv.tasks.priorcals.swpowdisplay.swpowSummaryChart(context, result)[source]

Bases: object

create_plot(prefix)[source]
get_figfile(prefix)[source]
get_plot_wrapper(prefix)[source]
plot()[source]

Module contents