pipeline.hif.tasks.bandpass package¶
Submodules¶
pipeline.hif.tasks.bandpass.adapters module¶
The adapters module contains classes that adapt Heuristics in the
pipeline.heuristics
package, allowing them to be called directly with
low-level objects from the pipeline domain.
Heuristics in the pipeline.heuristics package have simple interfaces; to maximize their ease of use, their interfaces accept only Python and NumPy primitives.
As the pipeline deals with complex lower-level objects and structures, we need a way to convert from these structures to the simple primitives demanded by the Heuristics. The classes in this module encapsulate that logic, converting objects or reading calibration tables as necessary and extracting the information needed by the wrapped Heuristic.
-
class
pipeline.hif.tasks.bandpass.adapters.
DegAmpAdapter
(heuristic)[source]¶ Bases:
pipeline.hif.tasks.bandpass.adapters.PolynomialHeuristicAdapter
-
class
pipeline.hif.tasks.bandpass.adapters.
DegPhaseAdapter
(heuristic)[source]¶ Bases:
pipeline.hif.tasks.bandpass.adapters.PolynomialHeuristicAdapter
-
class
pipeline.hif.tasks.bandpass.adapters.
PhaseUpSolIntAdapter
(heuristic)[source]¶ Bases:
pipeline.infrastructure.adapters.Adapter
PhaseUpSolIntAdapter adapts the
PhaseUpSolInt
heuristic, taking in a MeasurementSet and intent and passing the median integration time for observations with that intent through to the science heuristic.-
calculate
(ms, intent)[source]¶ Extract the integration time for observations with the given intent from the measurement set and pass it to the wrapped heuristic, returning the result.
- Parameters
ms (
MeasurementSet
) – the MeasurementSet to examineintent (string) – the intent for which to find the integration time
-
-
class
pipeline.hif.tasks.bandpass.adapters.
PolynomialHeuristicAdapter
(heuristic)[source]¶ Bases:
pipeline.infrastructure.adapters.Adapter
PolynomialHeuristicAdapter converts from the pipeline interface for a polynomial order heuristic, the string name of a caltable, to the data types needed by the heuristic itself, which are numerical data arrays.
-
calculate
(ms, caltable, spw)[source]¶ Make a calculation based on the given parameters.
This is an abstract method and must be implemented by all Heuristic subclasses.
Note
The signature and return types of
calculate()
are intended to be implementation specific. Refer to the documentation of the implementing class for the appropriate signature.
-
read_caltable
(ms, caltable, spw)[source]¶ Method to read channel calibration table and return it as a Python array.
Keyword arguments: table – The name of the calibration table spw – The SpW of interest. msobject – MeasurementSet domain object from which the calibration
was calculated.
Returns: data - ‘view’ of calibration gains in numpy complex array[antenna,channel] flag - flags associated with data array bool[antenna,channel]
-
pipeline.hif.tasks.bandpass.bandpassmode module¶
-
class
pipeline.hif.tasks.bandpass.bandpassmode.
BandpassMode
(inputs)[source]¶ Bases:
pipeline.infrastructure.basetask.ModeTask
-
Inputs
¶ alias of
BandpassModeInputs
-
pipeline.hif.tasks.bandpass.bandpassworker module¶
-
class
pipeline.hif.tasks.bandpass.bandpassworker.
BandpassWorker
(inputs)[source]¶ Bases:
pipeline.infrastructure.basetask.StandardTaskTemplate
BandpassWorker performs a simple bandpass calibration exactly as specified by the inputs, with no analysis or parameter refinement.
As this task has no analysis, it is not expected to be used in an interactive session. The expected use-case for this task is as a worker task for higher-level tasks.
-
Inputs
¶ alias of
BandpassWorkerInputs
-
analyse
(result)[source]¶ Determine the best parameters by analysing the given jobs before returning any final jobs to execute.
- Parameters
jobs (a list of
JobRequest
) – the job requests generated byprepare()
- Return type
Result
-
-
class
pipeline.hif.tasks.bandpass.bandpassworker.
BandpassWorkerInputs
(context, output_dir=None, vis=None, caltable=None, field=None, spw=None, antenna=None, intent=None, solint=None, combine=None, refant=None, minblperant=None, minsnr=None, solnorm=None, bandtype=None, fillgaps=None, degamp=None, degphase=None, visnorm=None, maskcenter=None, maskedge=None, append=None, scan=None, opacity=None, parang=None)[source]¶ Bases:
pipeline.hif.tasks.bandpass.common.VdpCommonBandpassInputs
BandpassInputs defines the inputs required by the
Bandpass
task.
pipeline.hif.tasks.bandpass.channelbandpass module¶
-
class
pipeline.hif.tasks.bandpass.channelbandpass.
ChannelBandpass
(inputs)[source]¶ Bases:
pipeline.hif.tasks.bandpass.bandpassworker.BandpassWorker
-
Inputs
¶ alias of
ChannelBandpassInputs
-
-
class
pipeline.hif.tasks.bandpass.channelbandpass.
ChannelBandpassInputs
(context, output_dir=None, vis=None, caltable=None, field=None, spw=None, antenna=None, intent=None, solint=None, combine=None, refant=None, minblperant=None, minsnr=None, solnorm=None, fillgaps=None, append=None, scan=None, opacity=None, parang=None)[source]¶ Bases:
pipeline.hif.tasks.bandpass.common.VdpCommonBandpassInputs
-
property
bandtype
¶
-
minsnr
¶ 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])
-
property
pipeline.hif.tasks.bandpass.common module¶
-
class
pipeline.hif.tasks.bandpass.common.
BandpassResults
(final: List[pipeline.infrastructure.callibrary.CalApplication] = None, pool: List[pipeline.infrastructure.callibrary.CalApplication] = None, preceding: List[pipeline.infrastructure.basetask.Results] = None, applies_adopted: bool = False, unregister_existing: bool = False)[source]¶ Bases:
pipeline.infrastructure.basetask.Results
BandpassResults is the results class common to all pipeline bandpass calibration tasks.
-
merge_with_context
(context: pipeline.infrastructure.launcher.Context)[source]¶
-
-
class
pipeline.hif.tasks.bandpass.common.
VdpCommonBandpassInputs
(context, output_dir=None, vis=None, intent=None, field=None, spw=None, refant=None, antenna=None, minblperant=None, opacity=None, selectdata=None, uvrange=None)[source]¶ Bases:
pipeline.hif.tasks.common.commoncalinputs.VdpCommonCalibrationInputs
CommonBandpassInputs is the base class for defines inputs that are common to all pipeline bandpass calibration tasks.
CommonBandpassInputs should be considered an abstract class. Refer to the specializations that inherit from CommonBandpassInputs for concrete implementations.
-
caltable
¶ 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])
-
combine
¶ 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])
-
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:
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])
-
solint
¶ 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])
-
solnorm
¶ 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])
-
pipeline.hif.tasks.bandpass.phcorbandpass module¶
-
class
pipeline.hif.tasks.bandpass.phcorbandpass.
PhcorBandpass
(inputs)[source]¶ Bases:
pipeline.hif.tasks.bandpass.bandpassworker.BandpassWorker
-
Inputs
¶ alias of
PhcorBandpassInputs
-
-
class
pipeline.hif.tasks.bandpass.phcorbandpass.
PhcorBandpassInputs
(context, mode=None, phaseup=None, phaseupbw=None, phaseupsolint=None, solint=None, **parameters)[source]¶ Bases:
pipeline.hif.tasks.bandpass.bandpassmode.BandpassModeInputs
-
phaseup
¶ 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])
-
phaseupbw
¶ 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])
-
phaseupsolint
¶ 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])
-
solint
¶ 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])
-
pipeline.hif.tasks.bandpass.qa module¶
-
class
pipeline.hif.tasks.bandpass.qa.
BandpassListQAHandler
[source]¶ Bases:
pipeline.infrastructure.pipelineqa.QAPlugin
QA handler for a list containing BandpassResults.
-
child_cls
¶
-
result_cls
¶ alias of
collections.abc.Iterable
-
-
class
pipeline.hif.tasks.bandpass.qa.
BandpassQAHandler
[source]¶ Bases:
pipeline.infrastructure.pipelineqa.QAPlugin
QA handler for an uncontained BandpassResult.
-
child_cls
= None¶
-
result_cls
¶
-
-
class
pipeline.hif.tasks.bandpass.qa.
BandpassQAPool
(rawdata, caltable)[source]¶ Bases:
pipeline.infrastructure.pipelineqa.QAScorePool
-
score_types
= {'AMPLITUDE_SCORE_SNR': 'amplitude SNR', 'PHASE_SCORE_DD': 'phase derivative'}¶
-
short_msg
= {'AMPLITUDE_SCORE_SNR': 'Amp SNR', 'PHASE_SCORE_DD': 'Phase derivative'}¶
-
pipeline.hif.tasks.bandpass.renderer module¶
Created on 11 Sep 2014
@author: sjw
-
class
pipeline.hif.tasks.bandpass.renderer.
AdoptedTR
(vis, gaintable)¶ Bases:
tuple
-
property
gaintable
¶ Alias for field number 1
-
property
vis
¶ Alias for field number 0
-
property
-
class
pipeline.hif.tasks.bandpass.renderer.
BandpassAmpVsFreqPlotRenderer
(context, results, plots)[source]¶ Bases:
pipeline.hif.tasks.bandpass.renderer.BaseBandpassPlotRenderer
-
class
pipeline.hif.tasks.bandpass.renderer.
BandpassApplication
(ms, bandtype, solint, intent, spw, gaintable)¶ Bases:
tuple
-
property
bandtype
¶ Alias for field number 1
-
property
gaintable
¶ Alias for field number 5
-
property
intent
¶ Alias for field number 3
-
property
ms
¶ Alias for field number 0
-
property
solint
¶ Alias for field number 2
-
property
spw
¶ Alias for field number 4
-
property
-
class
pipeline.hif.tasks.bandpass.renderer.
BandpassPhaseVsFreqPlotRenderer
(context, results, plots)[source]¶ Bases:
pipeline.hif.tasks.bandpass.renderer.BaseBandpassPlotRenderer
-
class
pipeline.hif.tasks.bandpass.renderer.
BaseBandpassPlotRenderer
(uri, context, results, plots, title, outfile, score_types)[source]¶ Bases:
pipeline.infrastructure.renderer.basetemplates.JsonPlotRenderer
-
class
pipeline.hif.tasks.bandpass.renderer.
PhaseupApplication
(ms, calmode, solint, minblperant, minsnr, flagged, phaseupbw)¶ Bases:
tuple
-
property
calmode
¶ Alias for field number 1
-
property
flagged
¶ Alias for field number 5
-
property
minblperant
¶ Alias for field number 3
-
property
minsnr
¶ Alias for field number 4
-
property
ms
¶ Alias for field number 0
-
property
phaseupbw
¶ Alias for field number 6
-
property
solint
¶ Alias for field number 2
-
property
-
class
pipeline.hif.tasks.bandpass.renderer.
T2_4MDetailsBandpassRenderer
(uri='bandpass.mako', description='Bandpass calibration', always_rerender=False)[source]¶ Bases:
pipeline.infrastructure.renderer.basetemplates.T2_4MDetailsDefaultRenderer
T2_4MDetailsBandpassRenderer generates the detailed T2_4M-level plots and output specific to the bandpass calibration task.