astrohack.io.panel_mds

Module Contents

Classes

AstrohackPanelFile

Data class for panel data.

class AstrohackPanelFile(file: str)[source]

Data class for panel data.

Data within an object of this class can be selected for further inspection, plotted or produce a report

get_antenna(self, ant: str, ddi: int)astrohack.antenna.antenna_surface.AntennaSurface[source]

Retrieve an AntennaSurface object for interaction

Parameters
  • ant (str) – Antenna to be retrieved, ex. ea25.

  • ddi (int) – DDI to be retrieved for ant_id, ex. 0

Returns

AntennaSurface object describing for further interaction

Return type

AntennaSurface

export_screws(self, destination: str, ant: Union[str, List[str]] = 'all', ddi: Union[str, int, List[int]] = 'all', unit: str = 'mm', threshold: float = None, panel_labels: bool = True, display: bool = False, colormap: str = 'RdBu_r', figure_size: Union[Tuple, List[float], numpy.array] = None, dpi: int = 300)None[source]

Export screw adjustments to text files and optionally plots.

Parameters
  • destination (str) – Name of the destination folder to contain exported screw adjustments

  • ant (list or str, optional) – List of antennas/antenna to be exported, defaults to “all” when None, ex. ea25

  • ddi (list or int, optional) – List of ddis/ddi to be exported, defaults to “all” when None, ex. 0

  • unit (str, optional) – Unit for screws adjustments, most length units supported, defaults to “mm”

  • threshold (float, optional) – Threshold below which data is considered negligible, value is assumed to be in the same unit as the plot, if not given defaults to 10% of the maximal deviation

  • panel_labels (bool, optional) – Add panel labels to antenna surface plots, default is True

  • display (bool, optional) – Display plots inline or suppress, defaults to True

  • colormap (str, optional) – Colormap for screw adjustment map, default is RdBu_r

  • figure_size (numpy.ndarray, list, tuple, optional) – 2 element array/list/tuple with the screw adjustment map size in inches

  • dpi (int, optional) – Screw adjustment map resolution in pixels per inch, default is 300

Produce the screw adjustments from astrohack.panel results to be used at the antenna site to improve the antenna surface

plot_antennas(self, destination: str, ant: Union[str, List[str]] = 'all', ddi: Union[str, int, List[int]] = 'all', plot_type: str = 'deviation', plot_screws: bool = False, amplitude_limits: Union[Tuple, List[float], numpy.array] = None, phase_unit: str = 'deg', phase_limits: Union[Tuple, List[float], numpy.array] = None, deviation_unit: str = 'mm', deviation_limits: Union[Tuple, List[float], numpy.array] = None, panel_labels: bool = False, display: bool = False, colormap: str = 'viridis', figure_size: Union[Tuple, List[float], numpy.array] = (8.0, 6.4), dpi: int = 300, parallel: bool = False)None[source]

Create diagnostic plots of antenna surfaces from panel data file.

Parameters
  • destination (str) – Name of the destination folder to contain plots

  • ant (list or str, optional) – List of antennas/antenna to be plotted, defaults to “all” when None, ex. ea25

  • ddi (list or int, optional) – List of ddis/ddi to be plotted, defaults to “all” when None, ex. 0

  • plot_type (str, optional) – type of plot to be produced, deviation, phase, ancillary or all, default is deviation

  • plot_screws (bool, optional) – Add screw positions to plot

  • amplitude_limits (numpy.ndarray, list, tuple, optional) – Lower than Upper limit for amplitude in volts default is None (Guess from data)

  • phase_unit (str, optional) – Unit for phase plots, defaults is ‘deg’

  • phase_limits (numpy.ndarray, list, tuple, optional) – Lower than Upper limit for phase, value in phase_unit, default is None (Guess from data)

  • deviation_unit (str, optional) – Unit for deviation plots, defaults is ‘mm’

  • deviation_limits (numpy.ndarray, list, tuple, optional) – Lower than Upper limit for deviation, value in deviation_unit, default is None (Guess from data)

  • panel_labels (bool, optional) – Add panel labels to antenna surface plots, default is False

  • display (bool, optional) – Display plots inline or suppress, defaults to True

  • colormap (str, optional) – Colormap for plots, default is viridis

  • figure_size (numpy.ndarray, list, tuple, optional) – 2 element array/list/tuple with the plot sizes in inches

  • dpi (int, optional) – dots per inch to be used in plots, default is 300

  • parallel (bool, optional) – If True will use an existing astrohack client to produce plots in parallel, default is False

Produce plots from astrohack.panel results to be analyzed to judge the quality of the results

Additional Information .. rubric:: Available plot types: - deviation: Surface deviation estimated from phase and wavelength, three plots are produced for each antenna and ddi combination, surface before correction, the corrections applied and the corrected surface, most length units available - phase: Phase deviations over the surface, three plots are produced for each antenna and ddi combination, phase before correction, the corrections applied and the corrected phase, deg and rad available as units - ancillary: Two ancillary plots with useful information: The mask used to select data to be fitted, the amplitude data used to derive the mask, units are irrelevant for these plots - all: All the plots listed above. In this case the unit parameter is taken to mean the deviation unit, the phase unit is set to degrees

export_to_fits(self, destination: str, ant: Union[str, List[str]] = 'all', ddi: Union[str, int, List[int]] = 'all', parallel: bool = False)None[source]

Export contents of an Astrohack MDS file to several FITS files in the destination folder

Parameters
  • destination (str) – Name of the destination folder to contain plots

  • ant (list or str, optional) – List of antennas/antenna to be plotted, defaults to “all” when None, ex. ea25

  • ddi (list or int, optional) – List of ddis/ddi to be plotted, defaults to “all” when None, ex. 0

  • parallel (bool, optional) – If True will use an existing astrohack client to export FITS in parallel, default is False

Export the products from the panel mds onto FITS files to be read by other software packages

Additional Information

The FITS fils produced by this method have been tested and are known to work with CARTA and DS9

export_gain_tables(self, destination: str, ant: Union[str, List[str]] = 'all', ddi: Union[str, int, List[int]] = 'all', wavelengths: Union[float, List[float]] = None, wavelength_unit: str = 'cm', frequencies: Union[float, List[float]] = None, frequency_unit: str = 'GHz', rms_unit: str = 'mm', parallel: bool = False)None[source]

Compute estimated antenna gains in dB and saves them to ASCII files.

Parameters
  • destination (str) – Name of the destination folder to contain ASCII files

  • ant (list or str, optional) – List of antennas/antenna to be exported, defaults to “all” when None, ex. ea25

  • ddi (list or int, optional) – List of ddis/ddi to be exported, defaults to “all” when None, ex. 0

  • wavelengths (list or float, optional) – List of wavelengths at which to compute the gains.

  • wavelength_unit (str, optional) – Unit for the wavelengths being used, default is cm.

  • frequencies (list or float, optional) – List of frequencies at which to compute the gains.

  • frequency_unit (str, optional) – Unit for the frequencies being used, default is GHz.

  • rms_unit (str, optional) – Unit for the Antenna surface RMS, default is mm.

  • parallel (bool, optional) – If True will use an existing astrohack client to produce ASCII files in parallel, default is False

Export antenna gains in dB from astrohack.panel for analysis.

Additional Information

Selecting frequencies and wavelengths:

If neither a frequency list nor a wavelength list is provided, export_gains_table will try to use a predefined list set for the telescope associated with the dataset. If both are provided, export_gains_table will combine both lists.

observation_summary(self, summary_file: str, ant: Union[str, List[str]] = 'all', ddi: Union[str, int, List[int]] = 'all', az_el_key: str = 'center', phase_center_unit: str = 'radec', az_el_unit: str = 'deg', time_format: str = '%d %h %Y, %H:%M:%S', tab_size: int = 3, print_summary: bool = True, parallel: bool = False)None[source]

Create a Summary of observation information

Parameters
  • summary_file (str) – Text file to put the observation summary

  • ant (list or str, optional) – antenna ID to use in subselection, defaults to “all” when None, ex. ea25

  • ddi (list or int, optional) – data description ID to use in subselection, defaults to “all” when None, ex. 0

  • az_el_key (str, optional) – What type of Azimuth & Elevation information to print, ‘mean’, ‘median’ or ‘center’, default is ‘center’

  • phase_center_unit (str, optional) – What unit to display phase center coordinates, ‘radec’ and angle units supported, default is ‘radec’

  • az_el_unit (str, optional) – Angle unit used to display Azimuth & Elevation information, default is ‘deg’

  • time_format (str, optional) – datetime time format for the start and end dates of observation, default is “%d %h %Y, %H:%M:%S”

  • tab_size (int, optional) – Number of spaces in the tab levels, default is 3

  • print_summary (bool, optional) – Print the summary at the end of execution, default is True

  • parallel (bool, optional) – Run in parallel, defaults to False

Additional Information

This method produces a summary of the data in the AstrohackPanelFile displaying general information, spectral information, beam image characteristics and aperture image characteristics.