plotting

This module contains a general set of plotting methods for that are inherited by the different classes of PBjam, so that they can be used to show the status of each step that has been performed.

class pbjam.plotting.plotting[source]

Class inherited by PBjam modules to plot results

This is used to standardize the plots produced at various steps of the peakbagging process.

As PBjam class is initialized, these plotting methods will be inherited. The methods will plot the relevant result based on the class they are being called from.

plot_corner(path=None, ID=None, savefig=False)[source]

Make corner plot of result.

Makes a nice corner plot of the fit parameters.

Parameters:
  • path (str, optional) – Used along with savefig, sets the output directory to store the figure. Default is to save the figure to the star directory.
  • ID (str, optional) – ID of the target to be included in the filename of the figure.
  • savefig (bool) – Whether or not to save the figure to disk. Default is False.
Returns:

fig – Figure object with the corner plot.

Return type:

Matplotlib figure object

plot_echelle(pg=None, path=None, ID=None, savefig=False)[source]

Make echelle plot

Plots an echelle diagram with mode frequencies if available.

Parameters:
  • pg (Lightkurve.periodogram object, optional) – A lightkurve periodogram to plot the echelle diagram of
  • path (str, optional) – Used along with savefig, sets the output directory to store the figure. Default is to save the figure to the star directory.
  • ID (str, optional) – ID of the target to be included in the filename of the figure.
  • savefig (bool) – Whether or not to save the figure to disk. Default is False.
Returns:

fig – Figure object with the echelle diagram.

Return type:

Matplotlib figure object

plot_prior(path=None, ID=None, savefig=False)[source]

Corner of result in relation to prior sample.

Create a corner plot showing the location of the star in relation to the rest of the prior.

Parameters:
  • path (str, optional) – Used along with savefig, sets the output directory to store the figure. Default is to save the figure to the star directory.
  • ID (str, optional) – ID of the target to be included in the filename of the figure.
  • savefig (bool) – Whether or not to save the figure to disk. Default is False.
Returns:

crnr – Corner plot figure object containing NxN axis objects.

Return type:

matplotlib figure object

plot_spectrum(pg=None, path=None, ID=None, savefig=False)[source]

Plot the power spectrum

Plot the power spectrum around the p-mode envelope. Calling this method from the different classes such as KDE or peakbag, will plot the relevant result from those classes if available.

Parameters:
  • pg (Lightkurve.periodogram object, optional) – A lightkurve periodogram to plot
  • path (str, optional) – Used along with savefig, sets the output directory to store the figure. Default is to save the figure to the star directory.
  • ID (str, optional) – ID of the target to be included in the filename of the figure.
  • savefig (bool) – Whether or not to save the figure to disk. Default is False.
Returns:

fig – Figure object with the spectrum.

Return type:

Matplotlib figure object

plot_start()[source]

Plot starting point for peakbag

Plots the starting model to be used in peakbag as a diagnotstic.