astrohack.io.position_mds

Module Contents

Classes

AstrohackPositionFile

Data class for position data.

class AstrohackPositionFile(file: str)[source]

Data class for position data.

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

export_locit_fit_results(self, destination: str, ant: Union[str, List[str]] = 'all', ddi: Union[str, int, List[int]] = 'all', position_unit: str = 'm', time_unit: str = 'hour', delay_unit: str = 'nsec', phase_unit: str = 'deg')None[source]

Export antenna position fit results to a text file.

Parameters
  • destination (str) – Name of the destination folder to contain exported fit results

  • 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

  • position_unit (str, optional) – Unit to list position fit results, defaults to ‘m’

  • time_unit (str, optional) – Unit for time in position fit results, defaults to ‘hour’

  • delay_unit (str, optional) – Unit for delays, defaults to ‘nsec’

  • phase_unit (str, optional) – Unit for phasess, defaults to ‘deg’

Produce a text file with the fit results from astrohack.locit for better determination of antenna locations.

export_results_to_parminator(self, filename: str, ant: Union[str, List[str]] = 'all', ddi: int = None, correction_threshold: float = 0.01)None[source]

Export antenna position fit results to a VLA parminator file.

Parameters
  • filename (str) – Name of the parminator file to be created

  • 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

  • correction_threshold (float, optional) – Correction threshold in meters to include an antenna position correction in output.

Produce a VLA parminator compatible text file with the fit results from astrohack.locit.

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

Plot the sky coverage of the data used for antenna position fitting

Parameters
  • destination (str) – Name of the destination folder to contain the 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

  • angle_unit (str, optional) – Unit for angle in plots, defaults to ‘deg’

  • time_unit (str, optional) – Unit for time in plots, defaults to ‘hour’

  • 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 size in inches

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

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

This method produces 4 plots for each selected antenna and DDI. These plots are: 1) Time vs Elevation 2) Time vs Hour Angle 3) Time vs Declination 4) Hour Angle vs Declination

These plots are intended to display the coverage of the sky of the fitted data

plot_delays(self, destination: str, ant: Union[str, List[str]] = 'all', ddi: Union[str, int, List[int]] = 'all', time_unit: str = 'hour', angle_unit: str = 'deg', delay_unit: str = 'nsec', plot_model: bool = True, display: bool = False, figure_size: Union[Tuple, List[float], numpy.array] = None, dpi: int = 300, parallel: bool = False)None[source]

Plot the delays used for antenna position fitting and optionally the resulting fit.

Parameters
  • destination (str) – Name of the destination folder to contain the 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

  • angle_unit (str, optional) – Unit for angle in plots, defaults to ‘deg’

  • time_unit (str, optional) – Unit for time in plots, defaults to ‘hour’

  • delay_unit (str, optional) – Unit for delay in plots, defaults to ‘nsec’

  • plot_model (bool, optional) – Plot the fitted model results alongside the data.

  • 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 size in inches

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

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

This method produces 4 plots for each selected antenna and DDI. These plots are: 1) Time vs Delays 2) Elevation vs Delays 3) Hour Angle vs Delays 4) Declination vs Delays

These plots are intended to display the gain variation with the 4 relevant parameters for the fitting and also asses the quality of the position fit.

plot_position_corrections(self, destination: str, ant: Union[str, List[str]] = 'all', ddi: Union[str, int, List[int]] = 'all', unit: str = 'km', box_size: Union[int, float] = 5, scaling: Union[int, float] = 250, figure_size: Union[Tuple, List[float], numpy.array] = None, display: bool = False, dpi: int = 300)None[source]

Plot Antenna position corrections on an array configuration plot

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

  • ant (list or str, optional) – Select which antennas are 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

  • unit (str, optional) – Unit for the plot, valid values are length units, default is km

  • box_size (int, float, optional) – Size of the box for plotting the inner part of the array in unit, default is 5 km

  • scaling (int, float, optional) – scaling factor to plotting the corrections, default is 250

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

  • 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

Plot the position corrections computed by locit on top of an array configuration plot. The corrections are too small to be visualized on the array plot since they are of the order of mm and the array is usually spread over km, or at least hundreds of meters. The scaling factor is used to bring the corrections to a scale discernible on the plot, this plot should not be used to estimate correction values, for that purpose use export_locit_fit_results instead.