:orphan: :mod:`astrohack.io.position_mds` ================================ .. py:module:: astrohack.io.position_mds Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: astrohack.io.position_mds.AstrohackPositionFile .. class:: AstrohackPositionFile(file: str) Data class for position data. Data within an object of this class can be selected for further inspection, plotted or produce a report .. method:: 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 Export antenna position fit results to a text file. :param destination: Name of the destination folder to contain exported fit results :type destination: str :param ant: List of antennas/antenna to be exported, defaults to "all" when None, ex. ea25 :type ant: list or str, optional :param ddi: List of ddis/ddi to be exported, defaults to "all" when None, ex. 0 :type ddi: list or int, optional :param position_unit: Unit to list position fit results, defaults to 'm' :type position_unit: str, optional :param time_unit: Unit for time in position fit results, defaults to 'hour' :type time_unit: str, optional :param delay_unit: Unit for delays, defaults to 'nsec' :type delay_unit: str, optional :param phase_unit: Unit for phasess, defaults to 'deg' :type phase_unit: str, optional .. _Description: Produce a text file with the fit results from astrohack.locit for better determination of antenna locations. .. method:: export_results_to_parminator(self, filename: str, ant: Union[str, List[str]] = 'all', ddi: int = None, correction_threshold: float = 0.01) -> None Export antenna position fit results to a VLA parminator file. :param filename: Name of the parminator file to be created :type filename: str :param ant: List of antennas/antenna to be exported, defaults to "all" when None, ex. ea25 :type ant: list or str, optional :param ddi: List of ddis/ddi to be exported, defaults to "all" when None, ex. 0 :type ddi: list or int, optional :param correction_threshold: Correction threshold in meters to include an antenna position correction in output. :type correction_threshold: float, optional .. _Description: Produce a VLA parminator compatible text file with the fit results from astrohack.locit. .. method:: 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 Plot the sky coverage of the data used for antenna position fitting :param destination: Name of the destination folder to contain the plots :type destination: str :param ant: List of antennas/antenna to be plotted, defaults to "all" when None, ex. ea25 :type ant: list or str, optional :param ddi: List of ddis/ddi to be plotted, defaults to "all" when None, ex. 0 :type ddi: list or int, optional :param angle_unit: Unit for angle in plots, defaults to 'deg' :type angle_unit: str, optional :param time_unit: Unit for time in plots, defaults to 'hour' :type time_unit: str, optional :param display: Display plots inline or suppress, defaults to True :type display: bool, optional :param figure_size: 2 element array/list/tuple with the plot size in inches :type figure_size: numpy.ndarray, list, tuple, optional :param dpi: plot resolution in pixels per inch, default is 300 :type dpi: int, optional :param parallel: If True will use an existing astrohack client to produce plots in parallel, default is False :type parallel: bool, optional .. _Description: 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 .. method:: 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 Plot the delays used for antenna position fitting and optionally the resulting fit. :param destination: Name of the destination folder to contain the plots :type destination: str :param ant: List of antennas/antenna to be plotted, defaults to "all" when None, ex. ea25 :type ant: list or str, optional :param ddi: List of ddis/ddi to be plotted, defaults to "all" when None, ex. 0 :type ddi: list or int, optional :param angle_unit: Unit for angle in plots, defaults to 'deg' :type angle_unit: str, optional :param time_unit: Unit for time in plots, defaults to 'hour' :type time_unit: str, optional :param delay_unit: Unit for delay in plots, defaults to 'nsec' :type delay_unit: str, optional :param plot_model: Plot the fitted model results alongside the data. :type plot_model: bool, optional :param display: Display plots inline or suppress, defaults to True :type display: bool, optional :param figure_size: 2 element array/list/tuple with the plot size in inches :type figure_size: numpy.ndarray, list, tuple, optional :param dpi: plot resolution in pixels per inch, default is 300 :type dpi: int, optional :param parallel: If True will use an existing astrohack client to produce plots in parallel, default is False :type parallel: bool, optional .. _Description: 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. .. method:: 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 Plot Antenna position corrections on an array configuration plot :param destination: Name of the destination folder to contain plot :type destination: str :param ant: Select which antennas are to be plotted, defaults to all when None, ex. ea25 :type ant: list or str, optional :param ddi: List of ddis/ddi to be plotted, defaults to "all" when None, ex. 0 :type ddi: list or int, optional :param unit: Unit for the plot, valid values are length units, default is km :type unit: str, optional :param box_size: Size of the box for plotting the inner part of the array in unit, default is 5 km :type box_size: int, float, optional :param scaling: scaling factor to plotting the corrections, default is 250 :type scaling: int, float, optional :param display: Display plots inline or suppress, defaults to False :type display: bool, optional :param figure_size: 2 element array/list/tuple with the plot sizes in inches :type figure_size: numpy.ndarray, list, tuple, optional :param dpi: dots per inch to be used in plots, default is 300 :type dpi: int, optional .. _Description: 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.