solpolpy.plotting#

Functions#

plot_collection(collection[, figsize, show_colorbar, ...])

Plot a solpolpy NDCollection input or output.

get_colormap_str(→ str)

Retrieve a color map name from an input FITS file.

Module Contents#

solpolpy.plotting.plot_collection(collection: ndcube.NDCollection, figsize=(8, 8), show_colorbar=False, lat_ticks=None, lon_ticks=None, major_formatter='dd', xlabel='HP Longitude', ylabel='HP Latitude', vmin=None, vmax=None, cmap='Greys_r', ignore_alpha=True, fontsize=18)#

Plot a solpolpy NDCollection input or output.

Parameters:
  • collection (NDCollection) – collection to visualize

  • figsize (Tuple[float, float]) – figure size according to Matplotlib

  • show_colorbar (bool) – whether to show a colorbar

  • lat_ticks (Optional[np.ndarray]) – if provided, shows as the tick marks for latitude. default values used otherwise.

  • lon_ticks (Optional[np.ndarray]) – if provided, shows as the tick marks for longitude. default values used otherwise.

  • major_formatter (str) – the formatter for major tickmarks as specified by Matplotlib

  • xlabel (str) – label for plot x axes

  • ylabel (str) – label for plot y axes

  • vmin (float, list of floats, or None) – minimum values of the plots. if a list is provided, they are applied left to right to each plot

  • vmax (float, list of floats, or None) – maximum values of the plots. if a list is provided, they are applied left to right to each plot

  • cmap (str or Matplotlib colormap) – a Matplotlib accepted colormap or colormap string

  • ignore_alpha (bool) – whether to plot the alpha array. defaults to True as it is not normally helpful to visualize.

  • fontsize (int) – font size for some aspects of the plot

Returns:

the plotted figure and axes are returned for any additional edits

Return type:

Matplotlib figure and axes

solpolpy.plotting.get_colormap_str(meta: astropy.io.fits.Header) str#

Retrieve a color map name from an input FITS file.

Parameters:

meta (fits.Header) – header of the data

Returns:

name of appropriate colormap

Return type:

str