plot_earth_layout#
- pyvisgrid.plotting.plot_earth_layout(layout: Layout | str, src_ra: float, src_dec: float, current_time: Time, show_legend: bool = True, legend_args: dict | None = None, legend_fontsize: str | int = 'x-small', show_title: bool = True, title_fontsize: str | int = 'small', coastline_width: float = 0.7, show_terrain_texture: bool = True, show_grid_lines: bool = True, show_night_shade: bool = True, marker_sizes: dict | None = None, plot_colors: dict | None = None, save_to: str | PathLike | None = None, save_args: dict | None = None, fig_args: dict | None = None, fig: Figure | None = None, mosaic_axes: dict[Axes] | None = None, mosaic_axes_key: str = 'earth', ax: Axes | None = None) tuple[Figure, Axes, dict[Axes] | None][source]#
Plots the a projected source position and the given interferometer layout on an earth visualization at a specific time.
- Parameters:
- layoutradiotools.layouts.Layout | str
The interferometer layout to plot. If a string is provided, a valid
pyvisgeninterferometer layout will be searched at this location. The string therefore has to be a valid path.- src_rafloat
The Right Ascension (RA) of the source in degrees.
- src_decfloat
The Declination (DEC) of the source in degrees.
- current_timeastropy.time.Time
The time at which to plot the positions. The view positions is then determined by the projected position of the source at this time.
- show_legendbool, optional
Whether to show a plot legend for the layout and source markers. Default is
True.- legend_argsdict | None, optional
The arguments to pass to the legend. Default is
legend_args = { "loc": "center", "bbox_to_anchor": (0.5, -0.12), "fontsize": legend_fontsize, "borderaxespad": 0, }
- legend_fontsizestr | int, optional
The font size of the legend’s text. Default is
'x-small'.- show_titlebool, optional
Whether to show the current time in the title. Default is
True.- legend_fontsizestr | int, optional
The font size of the title. Default is
'small'.- coastline_widthfloat, optional
The width of the coastlines. Default is
0.7.- show_terrain_texturebool, optional
Whether to display terrain textures. Default is
True.- show_grid_linesbool, optional
Whether to show gridlines on the globe. Default is
True.- show_night_shadebool, optional
Whether to show the night shade of the earth. Default is
True.- marker_sizesdict | None, optional
The marker sizes for the antenna (dict-key:
'antennas') and source (dict-key:'source') positions. Default ismarker_sizes = { "antennas": 13, "source": 150, }
- plot_colorsdict | None, optional
The colors for the antenna (dict-key:
'antennas') and source (dict-key:'source') positions and the connection vectors (dict-key:'connections') between the antennas. The default colors are given by the inferno colormap which resampled into 10 colors. Default iscolors = { "antennas": _default_colors[5], "source": _default_colors[-2], "connections": _default_colors[0], }
- save_tostr | PathLike | None, optional
The location to save the plot to. If set to
None, the plot won’t be saved. Default isNone.- save_argsdict | None, optional
Additional arguments to provide to the
Figure.savefigmethod. Default is{"bbox_inches": "tight"}.- fig_argsdict | None, optional
The arguments to pass to the figure. If a custom figure is given, this has no effect. Default is
None.- figmatplotlib.figure.Figure | None, optional
The figure to add the plot to. If not given, a new figure will be created. Default is
None.- mosaic_axesdict[mpl.axes.Axes] | None, optional
The axes for a mosaic subplot. Default is
None.- mosaic_axes_keystr, optional
The key of the axes of the mosaic subplot to plot the earth on. If no
mosaic_axeswas given, this has no effect. Default is'earth'.- axmatplotlib.axes.Axes | None, optional
The axes to add the plot to. If not given, a new axis will be created or if a
mosaic_axesand amosaic_axes_keyare given, the mosaic axes will be used. Default isNone.
- Returns:
- matplotlib.figure.Figure:
The figure object.
- matplotlib.axes.Axes:
The axes object.
- dict[matplotlib.axes.Axes] | None:
The mosaic subplot axes if the
mosaic_axesparameter was given. Otherwise this isNone.