pipeline.infrastructure.displays package¶
Submodules¶
pipeline.infrastructure.displays.plotmosaic module¶
-
pipeline.infrastructure.displays.plotmosaic.
baars_taper_factor
(taper_dB)[source]¶ Converts a taper in dB to the constant X in the formula FWHM=X*lambda/D for the parabolic illumination pattern. We assume that taper_dB comes in as a positive value. - Todd Hunter
-
pipeline.infrastructure.displays.plotmosaic.
central_obstruction_factor
(diameter, obscuration=0.75)[source]¶ Computes the scale factor of an Airy pattern as a function of the central obscuration, using Table 10.1 of Schroeder’s “Astronomical Optics”. – Todd Hunter
-
pipeline.infrastructure.displays.plotmosaic.
get_arc_formatter
(precision)[source]¶ Presents a value of equatorial arc in user-friendly units.
-
pipeline.infrastructure.displays.plotmosaic.
is_tsys_only
(field)[source]¶ Returns True if the field was only used to observe Tsys fields.
-
pipeline.infrastructure.displays.plotmosaic.
label_format
(x, _)[source]¶ Labels plot axes for plots specified in units of arcseconds
-
pipeline.infrastructure.displays.plotmosaic.
plot_mosaic
(ms, source, figfile)[source]¶ Produce a plot of the pointings with the primary beam FWHM and field names.
-
pipeline.infrastructure.displays.plotmosaic.
primary_beam_fwhm
(wavelength, diameter, taper)[source]¶ - Implements the Baars formula: b*lambda / D.
- if use2007formula==True, use the formula from Baars 2007 book
(see au.baarsTaperFactor)
- In either case, the taper value is expected to be entered as positive.
Note: if a negative value is entered, it is converted to positive.
The effect of the central obstruction on the pattern is also accounted for by using a spline fit to Table 10.1 of Schroeder’s Astronomical Optics. The default values correspond to our best knowledge of the ALMA 12m antennas.
diameter: outer diameter of the dish in meters obscuration: diameter of the central obstruction in meters
pipeline.infrastructure.displays.plotpwv module¶
-
pipeline.infrastructure.displays.plotpwv.
MAD
(a, c=0.6745, axis=0)[source]¶ Median Absolute Deviation along given axis of an array:
median(abs(a - median(a))) / c
c = 0.6745 is the constant to convert from MAD to std; it is used by default
-
pipeline.infrastructure.displays.plotpwv.
getObservatoryName
(ms)[source]¶ Returns the observatory name in the specified ms.
-
pipeline.infrastructure.displays.plotpwv.
plotPWV
(ms, figfile='', plotrange=[0, 0, 0, 0], clip=True)[source]¶ Read and plot the PWV values from the ms via the ASDM_CALWVR table. If that table is not found, read them from the ASDM_CALATMOSPHERE table. Different antennas are shown in different colored points.
- Parameters
ms – The measurement set
figfile: True, False, or a string
- plotrange: The ranges for the X and Y axes (default=[0,0,0,0] which is autorange)
clip: True = do not plot outliers beyond 5 * MAD from the median.
If figfile is not a string, the file created will be <ms>.pwv.png.
pipeline.infrastructure.displays.plotstyle module¶
pipeline.infrastructure.displays.plotweather module¶
-
pipeline.infrastructure.displays.plotweather.
ComputeDewPointCFromRHAndTempC
(relativeHumidity, temperature)[source]¶ inputs: relativeHumidity in percentage, temperature in C output: in degrees C Uses formula from http://en.wikipedia.org/wiki/Dew_point#Calculating_the_dew_point
-
pipeline.infrastructure.displays.plotweather.
RescaleXAxisTimeTicks
(xlim, adesc)[source]¶ Plotting utility routine
-
pipeline.infrastructure.displays.plotweather.
computeWVP
(d)[source]¶ This simply converts the specified temperature (in Celsius) to water vapor pressure, which can be used to estimate the relative humidity from the measured dew point.
-
pipeline.infrastructure.displays.plotweather.
plot_weather
(vis='', figfile='', station=[], help=False)[source]¶ Compiles and plots the major weather parameters for the specified ms. Station can be a single integer or integer string, or a list of two integers. The default empty list means to plot all data from up to 2 of the stations present in the data. The default plot file name will be ‘vis’.weather.png.
pipeline.infrastructure.displays.pointing module¶
-
pipeline.infrastructure.displays.pointing.
Deg2DMS
(x, prec=0)[source]¶ Converts an angle in degree to dms angle (ddmmss.s) and returns a list of strings of degree, arcminute, and arcsecond values in a specified precision, e.g., [‘+01’, ‘02’, ‘23.4’] for ‘+01.02.23.4’. Note dgree string is always associated with a sign.
-
pipeline.infrastructure.displays.pointing.
Deg2HMS
(x, prec=0)[source]¶ Converts an angle in degree to hour angle and returns a list of strings of hour, minute, and second values in a specified precision, e.g., [‘01’, ‘02’, ‘23.4’] for ‘01:02:23.4’
-
pipeline.infrastructure.displays.pointing.
GLGBlabel
(span)[source]¶ return (GLlocator, GBlocator, GLformatter, GBformatter) for Galactic coordinate
-
class
pipeline.infrastructure.displays.pointing.
MapAxesManagerBase
[source]¶ Bases:
object
-
property
direction_reference
¶
-
property
ofs_coord
¶
-
property
-
class
pipeline.infrastructure.displays.pointing.
PointingAxesManager
[source]¶ Bases:
pipeline.infrastructure.displays.pointing.MapAxesManagerBase
-
MATPLOTLIB_FIGURE_ID
= 9005¶
-
property
axes
¶
-
property
direction_reference
¶
-
init_axes
(xlocator, ylocator, xformatter, yformatter, xrotation, yrotation, aspect, xlim=None, ylim=None, reset=False)[source]¶
-
property
ofs_coord
¶
-
-
pipeline.infrastructure.displays.pointing.
RADEClabel
(span, ofs_coord)[source]¶ return (RAlocator, DEClocator, RAformatter, DECformatter)
-
class
pipeline.infrastructure.displays.pointing.
SingleDishPointingChart
(context, ms, antenna, target_field_id=None, reference_field_id=None, target_only=True, ofs_coord=False)[source]¶ Bases:
object
-
plot
(**kwargs)¶
-
-
pipeline.infrastructure.displays.pointing.
XYlabel
(span, direction_reference, ofs_coord=False)[source]¶
pipeline.infrastructure.displays.summary module¶
-
class
pipeline.infrastructure.displays.summary.
FieldVsTimeChart
(inputs)[source]¶ Bases:
object
-
Inputs
¶ alias of
FieldVsTimeChartInputs
-
plot
(**kwargs)¶
-
-
class
pipeline.infrastructure.displays.summary.
FieldVsTimeChartInputs
(context, vis=None, output=None)[source]¶ Bases:
pipeline.infrastructure.vdp.StandardInputs
-
output
¶ 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])
-
-
class
pipeline.infrastructure.displays.summary.
IntentVsTimeChart
(inputs)[source]¶ Bases:
object
-
Inputs
¶ alias of
IntentVsTimeChartInputs
-
-
class
pipeline.infrastructure.displays.summary.
IntentVsTimeChartInputs
(context, vis=None, output=None)[source]¶ Bases:
pipeline.infrastructure.vdp.StandardInputs
-
output
¶ 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])
-
-
class
pipeline.infrastructure.displays.summary.
MosaicChart
(context, ms, source)[source]¶ Bases:
object
-
class
pipeline.infrastructure.displays.summary.
PlotAntsChart
(context, ms, polarlog=False)[source]¶ Bases:
object
-
draw_pad_map_in_subplot
(plf, antennas, xlimit=None, ylimit=None, showemptypads=True)[source]¶ Draw a map of pads and antennas on them.
plf: a matplotlib.pyplot.figure instance pads: a dictionary of antennas {“Name”: (X, Y, Z), …} antennas: a dictionary of antennas {“AntennaName”: “PadName”, …} xlimit, ylimit: lists (or tuples, arrays) for the x and y axis limits.
if not given, automatically adjusted.
showemptypads: set False not to draw pads and their names
-
-
class
pipeline.infrastructure.displays.summary.
UVChart
(context, ms, customflagged=False, output_dir=None, title_prefix=None)[source]¶ Bases:
object
-
preferred_intent_order
= ['TARGET', 'AMPLITUDE', 'BANDPASS', 'PHASE']¶
-
-
pipeline.infrastructure.displays.summary.
get_intent_subscan_time_ranges
(msname, casa_intent, scanid)[source]¶ This function returns a list of start/end epoch pair of consequtive integrations (a subscan) with a selected intent in a selected scan. It can be used to filter subscans with an intent in a mixed intents scans, e.g., an ALMA TP scan that has both ‘TARGET’ and ‘REFERENCE’ subscans.
- Parameters
msname: (string) the name of MeasurementSet casa_intent: (string) CASA intent to filter scanid: (int) a Scan ID to search. Must be
- Returns
a list of start/end epoch tuple, e.g., [(start_epoch, end_epoch), (start_epoch, end_epoch), ….]