astrohack.io.holog_mds

Module Contents

Classes

AstrohackHologFile

Data class for holog data.

class AstrohackHologFile(file: str)[source]

Data class for holog data.

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

plot_diagnostics(self, destination: str, delta: float = 0.01, ant: Union[str, List[str]] = 'all', ddi: Union[str, int, List[int]] = 'all', map_id: Union[int, List[int], str] = 'all', complex_split: str = 'polar', display: bool = False, figure_size: Union[Tuple, List[float], numpy.array] = None, dpi: int = 300, parallel: bool = False)None[source]

Plot diagnostic calibration plots from the holography data file.

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

  • delta (float, optional) – Defines a fraction of cell_size around which to look for peaks., defaults to 0.01

  • 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

  • map_id (list or int, optional) – map ID to use in subselection. This relates to which antenna are in the mapping vs. scanning configuration, defaults to “all” when None, ex. 0

  • complex_split (str, optional) – How to split complex data, cartesian (real + imaginary) or polar (amplitude + phase), default is polar

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

  • 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) – Run in parallel, defaults to False

Additional Information The visibilities extracted by extract_holog are complex due to the nature of interferometric measurements. To ease the visualization of the complex data it can be split into real and imaginary parts (cartesian) or in amplitude and phase (polar).

Available complex splitting possibilities:

  • cartesian: Split is done to a real part and an imaginary part in the plots

  • polar: Split is done to an amplitude and a phase in the plots

plot_lm_sky_coverage(self, destination: str, ant: Union[str, List[str]] = 'all', ddi: Union[str, int, List[int]] = 'all', map_id: Union[int, List[int], str] = 'all', angle_unit: str = 'deg', time_unit: str = 'hour', plot_correlation: Union[str, List[str]] = None, complex_split: str = 'polar', phase_unit: str = 'deg', display: bool = False, figure_size: Union[Tuple, List[float], numpy.array] = None, dpi: int = 300, parallel: bool = False)None[source]

Plot directional cosine coverage.

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

  • 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

  • map_id (list or int, optional) – map ID to use in subselection. This relates to which antenna are in the mapping vs. scanning configuration, defaults to “all” when None, ex. 0

  • angle_unit (str, optional) – Unit for L and M axes in plots, default is ‘deg’.

  • time_unit (str, optional) – Unit for time axis in plots, default is ‘hour’.

  • plot_correlation (str, list, optional) – Which correlation to plot against L and M, default is None (no correlation plots).

  • complex_split (str, optional) – How to split complex data, cartesian (real + imaginary) or polar (amplitude + phase), default is polar

  • phase_unit (str) – Unit for phase in ‘polar’ plots, default is ‘deg’.

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

  • 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) – Run in parallel, defaults to False

Additional Information The visibilities extracted by extract_holog are complex due to the nature of interferometric measurements. To ease the visualization of the complex data it can be split into real and imaginary parts (cartesian) or in amplitude and phase (polar).

Available complex splitting possibilities:

  • cartesian: Split is done to a real part and an imaginary part in the plots

  • polar: Split is done to an amplitude and a phase in the plots

Plotting correlations:

  • RR, RL, LR, LL: Are available for circular systems

  • XX, XY, YX, YY: Are available for linear systems

  • all: Plot all correlations in dataset

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

Export data compatible to AIPS’s HOLOG task

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

  • 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

  • map_id (list or int, optional) – map ID to use in subselection. This relates to which antenna are in the mapping vs. scanning configuration, defaults to “all” when None, ex. 0

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

Additional Information

This method converts the data for an Antenna mapping to the ASCII format used by AIPS’s HOLOG task. Currently only stokes I is supported.

observation_summary(self, summary_file: str, ant: Union[str, List[str]] = 'all', ddi: Union[str, int, List[int]] = 'all', map_id: Union[int, List[int], str] = '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

  • map_id (list or int, optional) – map ID to use in subselection. This relates to which antenna are in the mapping vs. scanning configuration, 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 AstrohackHologFile displaying general information, spectral information and suggested beam image characteristics.