argosim.plot_utils module#

Plot utils.

This module contains functions to plot the antenna array, beam, baselines, uv-coverage and sky models.

Authors:

Ezequiel Centofanti <ezequiel.centofanti@cea.fr>

argosim.plot_utils.plot_antenna_arr(array, ax=None, fig=None, title='Array', antenna_idx=True, s=20, c='mediumblue')[source]#

Plot antenna array.

Function to plot the antenna array in ground coordinates.

Parameters:
  • array (np.ndarray) – The antenna array positions in the ground.

  • ax (matplotlib.axes.Axes) – The axis to plot the antenna array. For plotting on a specific subplot axis.

  • fig (matplotlib.figure.Figure) – The figure to plot the antenna array. For plotting on a specific subplot axis.

  • title (str) – The title of the plot.

  • antenna_idx (bool) – If True, annotate the antenna indices on the plot.

  • s (int) – The size of the scatter points. Default is 20.

  • c (str) – The color of the scatter points. Default is “mediumblue”.

Return type:

None

argosim.plot_utils.plot_baselines(baselines, ax=None, fig=None, title=None, ENU=False, s=5, c='darkred')[source]#

Plot baselines.

Function to plot the baselines in uv-space.

Parameters:
  • baselines (np.ndarray) – The uv-space sampling positions.

  • ax (matplotlib.axes.Axes) – The axis to plot the baselines. For plotting on a specific subplot axis.

  • fig (matplotlib.figure.Figure) – The figure to plot the baselines. For plotting on a specific subplot axis.

  • title (str) – The title of the plot. If None, a default title is used.

  • ENU (bool) – If True, plot the baselines in East-North-Up coordinates. Otherwise, plot in uv-space.

  • s (int) – The size of the scatter points. Default is 5.

  • c (str) – The color of the scatter points. Default is “darkred”.

Return type:

None

argosim.plot_utils.plot_beam_and_fit(beam, fov_size, fit_result=None)[source]#

Plot beam and fit.

Plot the beam and overlay the fitted ellipse.

Parameters:
  • beam (np.ndarray) – 2D beam image.

  • fov_size (tuple) – The field of view size in degrees.

  • fit_result (dict) – Dictionary containing the ellipse parameters (center, width, height, angle_deg, eccentricity). If None, it is computed from the beam.

Return type:

None

argosim.plot_utils.plot_beam_fit(beam, fit_result=None)[source]#

Plot beam fit.

Plot the beam and overlay the fitted ellipse.

Parameters:
  • beam (np.ndarray) – 2D beam image.

  • fit_result (dict) – Dictionary containing the ellipse parameters (center, width, height, angle_deg, eccentricity). If None, it is computed from the beam.

Return type:

None

argosim.plot_utils.plot_sky(image, fov_size, ax=None, fig=None, title=None, cbar=True)[source]#

Plot sky.

Function to plot the sky model.

Parameters:
  • image (np.ndarray) – The image to be plotted in real space.

  • fov_size (tuple) – The field of view size in degrees.

  • ax (matplotlib.axes.Axes) – The axis to plot the sky model. For plotting on a specific subplot axis.

  • fig (matplotlib.figure.Figure) – The figure to plot the sky model. For plotting on a specific subplot axis.

  • title (str) – The title of the plot. Default is “Sky”.

  • cbar (bool) – If True, display a colorbar. Default is True.

Return type:

None

argosim.plot_utils.plot_sky_uv(image_uv, fov_size, ax=None, fig=None, title='Sky uv', cbar=False, scale='linear')[source]#

Plot sky uv.

Function to plot the absolute value of an image in uv-space.

Parameters:
  • image_uv (np.ndarray) – The image to be plotted in uv-space.

  • fov_size (tuple) – The field of view size in degrees.

  • ax (matplotlib.axes.Axes) – The axis to plot the sky model in uv-space. For plotting on a specific subplot axis.

  • fig (matplotlib.figure.Figure) – The figure to plot the sky model in uv-space. For plotting on a specific subplot axis.

  • title (str) – The title of the plot. Default is “Sky uv”.

  • cbar (bool) – If True, display a colorbar. Default is False.

  • scale (str) – The scale of the uv-image. Default is ‘linear’. Options are ‘linear’ or ‘log’.

Return type:

None

argosim.plot_utils.plot_uv_hist(baselines, bins=20, output_folder=None)[source]#

Plot uv histogram.

Function to plot the histogram of the uv-sampling distribution.

Parameters:
  • baselines (np.ndarray) – The uv-space sampling positions.

  • bins (int) – The number of bins for the histogram.

  • output_folder (str) – The output folder to save the plot.

Returns:

The histogram of the uv-sampling distribution.

Return type:

np.ndarray