plot_map

sitelle.plot.plot_map(data, ax=None, region=None, projection=None, colorbar=False, xlims=None, ylims=None, **kwargs)

Helper function to plot 2D maps

Parameters:
  • data (2D ndarray) – The 2D map to be plotted
  • ax (Axes) – (Optional) The matplotlib axes on which to plot. If None, a new one will be created.
  • region (tuple, Optional) – a region in pixel (obtained with numpy.where() for example) to plot on top of the image
  • projection (astropy.wcs.WCS, Optional) – a WCS projection to plot the map on
  • colorbar (bool, Default = False) – if True , a color bar is associated to the plot
  • pmin (integer between 0 and 100) – (Optional) if passed, vmin set to np.nanpercentile(data, pmin)
  • pmax (integer between 0 and 100) – (Optional) if passed, vmax set to np.nanpercentile(data, pmax)
  • kwargs (dict) – Additional keyword arguments passed to matplotlib.pyplot.imshow() function (e.g vmin, cmap etc..)
Returns:

  • fig (Figure) – The figure containing the plot.
  • ax (Axes) – The axes containing the plot.