pipeline.h.heuristics package¶
Submodules¶
pipeline.h.heuristics.caltable module¶
-
class
pipeline.h.heuristics.caltable.
BandpassCaltable
[source]¶ Bases:
pipeline.h.heuristics.caltable.CaltableNamer
-
customise
(namer, task_args)[source]¶ Set any class-specific filenaming attributes on the given file namer.
This function gives subclasses an opportunity to modify the Filenamer object before the filename is returned.
- Parameters
namer – the namer to customise
task_args – the dict of extra arguments given to the file namer
- Returns
-
-
class
pipeline.h.heuristics.caltable.
CaltableNamer
[source]¶ Bases:
pipeline.infrastructure.api.Heuristic
CaltableNamer is the base class for heuristics that name calibration tables. The execution flow is largely the same for all naming heuristics, so it provides a common implementation using the Template design pattern, providing a stub method where subclasses may customise the naming class as required.
-
calculate
(output_dir='', stage=None, **task_args)[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.
-
customise
(namer, task_args)[source]¶ Set any class-specific filenaming attributes on the given file namer.
This function gives subclasses an opportunity to modify the Filenamer object before the filename is returned.
- Parameters
namer – the namer to customise
task_args – the dict of extra arguments given to the file namer
- Returns
-
-
class
pipeline.h.heuristics.caltable.
GaincalCaltable
[source]¶ Bases:
pipeline.h.heuristics.caltable.CaltableNamer
-
customise
(namer, task_args)[source]¶ Set any class-specific filenaming attributes on the given file namer.
This function gives subclasses an opportunity to modify the Filenamer object before the filename is returned.
- Parameters
namer – the namer to customise
task_args – the dict of extra arguments given to the file namer
- Returns
-
-
class
pipeline.h.heuristics.caltable.
SDSkyCaltable
[source]¶ Bases:
pipeline.h.heuristics.caltable.CaltableNamer
-
customise
(namer, task_args)[source]¶ Set any class-specific filenaming attributes on the given file namer.
This function gives subclasses an opportunity to modify the Filenamer object before the filename is returned.
- Parameters
namer – the namer to customise
task_args – the dict of extra arguments given to the file namer
- Returns
-
-
class
pipeline.h.heuristics.caltable.
UVcontCaltable
[source]¶ Bases:
pipeline.h.heuristics.caltable.CaltableNamer
-
customise
(namer, task_args)[source]¶ Set any class-specific filenaming attributes on the given file namer.
This function gives subclasses an opportunity to modify the Filenamer object before the filename is returned.
- Parameters
namer – the namer to customise
task_args – the dict of extra arguments given to the file namer
- Returns
-
-
class
pipeline.h.heuristics.caltable.
WvrgCaltable
[source]¶ Bases:
pipeline.h.heuristics.caltable.CaltableNamer
-
customise
(namer, task_args)[source]¶ Set any class-specific filenaming attributes on the given file namer.
This function gives subclasses an opportunity to modify the Filenamer object before the filename is returned.
- Parameters
namer – the namer to customise
task_args – the dict of extra arguments given to the file namer
- Returns
-
pipeline.h.heuristics.echoheuristic module¶
-
class
pipeline.h.heuristics.echoheuristic.
EchoHeuristic
(val)[source]¶ Bases:
pipeline.infrastructure.api.Heuristic
-
calculate
(*args, **kw)[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.
-
-
class
pipeline.h.heuristics.echoheuristic.
NullHeuristic
[source]¶ Bases:
pipeline.infrastructure.api.Heuristic
-
static
calculate
(*args, **kw)[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.
-
static
pipeline.h.heuristics.fieldnames module¶
-
class
pipeline.h.heuristics.fieldnames.
IntentFieldnames
[source]¶ Bases:
pipeline.infrastructure.api.Heuristic
-
calculate
(ms, intent, spw=None)[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.
-
pipeline.h.heuristics.linefinder module¶
-
class
pipeline.h.heuristics.linefinder.
HeuristicsLineFinder
[source]¶ Bases:
pipeline.infrastructure.api.Heuristic
-
calculate
(spectrum, threshold=7.0, min_nchan=3, avg_limit=2, box_size=2, tweak=False, mask=[], edge=None)[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.
-
pipeline.h.heuristics.tsysnormalize module¶
-
pipeline.h.heuristics.tsysnormalize.
TsysAfterPowerChange
(v_orig, v_new, tsys_orig=200.0, t_atm=270.0)[source]¶
-
pipeline.h.heuristics.tsysnormalize.
getPower
(vis, scan, spw, duration, fromEnd=False, skipStartSecs=1.0, skipEndSecs=1.0, datacolname='data', verbose=True)[source]¶ Return a per-antenna list of total power values for the two polarizations of the specified scan and spw. duration: number of samples to use starting from the start of the scan I think the idea here is that the sky subscan is always the first subscan of a Tsys scan. If this ever changes to one of the loads, then the result will be less than optimal. It would likely result in very small changes from the original tsys table (i.e. it will not get normalized). - Todd
-
pipeline.h.heuristics.tsysnormalize.
scienceSpwForTsysSpw
(mymsmd, tsysSpw)[source]¶ Automatically pick one science spw for the specified Tsys spw. Ideally it would be the one with the widest bandwidth, but it will likely make very little difference, so just take the first one if there are more than one.
-
pipeline.h.heuristics.tsysnormalize.
tsysNormalize
(vis, tsysTable, newTsysTable, scaleSpws=[], verbose=False)[source]¶ Generate Tsys entries for one field from other fields, using autocorr (linear!) or SQLD data to determine the change in Tsys. Inputs:
vis the MS tsysTable: the tsys caltable (default = <vis>.tsys) newTsysTable: the new tsys caltable to create (default = <tsysTable>_normalized)
pipeline.h.heuristics.tsysspwmap module¶
-
class
pipeline.h.heuristics.tsysspwmap.
SpwMap
(calSpwId)[source]¶ Bases:
object
This object is basically set up to hold the information needed
-
pipeline.h.heuristics.tsysspwmap.
tsysspwmap
(ms, tsystable, trim=True, relax=False, tsysChanTol=1)[source]¶ Generate default spwmap for ALMA Tsys, including TDM->FDM associations Input:
ms the target MeasurementSet object tsystable the input Tsys caltable (w/ TDM Tsys measurements) trim if True (the default), return minimum-length spwmap;
otherwise the spwmap will be exhaustive and include the high-numbered (and usually irrelevant) wvr spws
relax (not yet implemented)
- Output:
spw list to use in applycal spwmap parameter for the Tsys caltable
This function takes the Tsys Caltable you wish to apply to a MeasurementSet and generates a “applycal-ready” spwmap that provides the appropriate information regarding the transfer Tsys calibration from TDM spectral windows to FDM spectral windows. To execute the function:
tsysmap=tsysspwmap(vis=’my.ms’,tsystable=’mytsys.cal’)
tsysmap can then be supplied to the applycal spwmap parameter to ensure proper Tsys calibration application.