API Plotting#

Functions for the generation of plots related to the fitting results.

satlas2.plotting.generateCorrelationPlot(filename: str, filter: List[str] | None = None, bins: int | None = None, burnin: int = 0, thin: int = 1, autoprocess: bool = False, source: bool = True, model: bool = True, binreduction: int = 1, bin2dreduction: int = 1, progress: bool = False, width: float = 6, height: float = 6, left: float = 0.15, right: float = 0.95, top: float = 0.85, bottom: float = 0.15) Tuple[Figure, Tuple[Axes], Axes][source]#

Given the random walk data, creates a triangle plot: distribution of a single parameter on the diagonal axes, 2D contour plots with 1, 2 and 3 sigma contours on the off-diagonal. The 1-sigma limits based on the percentile method are also indicated, as well as added to the title.

Parameters:
  • filename (str) – Filename for the h5 file containing the data from the walk.

  • filter (List[str], optional) – Only this list of columns is used for the plot, by default None.

  • bins (int, optional) – Use this number of bins for the plotting. Applies the same number of bins for each parameter. If supplied as a list, length must match the number of parameters. By default None.

  • burnin (int, optional) – Number of initial steps from the random walk to be discarded, by default 0.

  • thin (int, optional) – Take only every thin steps from the chain. (default: 1)

  • autoprocess (bool, optional) – Based on the autocorrelation time of the random walk, perform an automatic burn-in and thinning estimate, by default False.

  • source (bool, optional) – Add the source name to the plot titles, by default True.

  • model (bool, optional) – Add the model name to the plot titles, by default True.

  • binreduction (int, optional) – Reduces the amount of bins in the 1D case by this factor, by default 1.

  • bin2dreduction (int, optional) – Further reduces the amount of bins in the 2D case by this factor, by default 1.

  • progress (bool, optional) – Show a progress bar of processing the parameters, by default False.

  • width (float, optional) – Width in inches of the figure, by default 6

  • height (float, optional) – Height in inches of the figure, by default 6

  • Left (float, optional) – Extent of the left of the figure, in fraction, by default 0.15

  • right (float, optional) – Extent of the right of the figure, in fraction, by default 0.95

  • top (float, optional) – Extent of the top of the figure, in fraction, by default 0.85

  • bottom (float, optional) – Extent of the bottom of the figure, in fraction, by default 0.15

Returns:

Tuple containing the figure, the individual axes, and the colorbar axis.

Return type:

Tuple[plt.Figure, Tuple[plt.Axes], plt.Axes]

Note

When estimated automatically, the burnin and thin are set to respectively

\[2\cdot\textrm{max}\left(\tau\right)\]

and

\[\textrm{min}\left(\tau\right)/2\]
satlas2.plotting.generateWalkPlot(filename: str, filter: List[str] | None = None, burnin: int = 0, thin: int = 1, autoprocess: bool = False, source: bool = False, model: bool = True, progress: bool = False) Tuple[Figure, Tuple[Axes]][source]#

Given the random walk data, the random walk for the selected parameters is plotted.

Parameters:
  • filename (str) – Filename for the h5 file containing the data from the walk.

  • filter (List[str], optional) – Only this list of columns is used for the plot, by default None.

  • burnin (int, optional) – Number of initial steps from the random walk to be discarded, by default 0.

  • thin (int, optional) – Take only every thin steps from the chain. (default: 1)

  • autoprocess (bool, optional) – Based on the autocorrelation time of the random walk, perform an automatic burn-in and thinning estimate, by default False.

  • source (bool, optional) – Add the source name to the plot titles, by default False.

  • model (bool, optional) – Add the model name to the plot titles, by default True.

  • progress (bool, optional) – Show a progress bar of processing the parameters, by default False.

Returns:

Tuple containing the figure and the individual axes.

Return type:

Tuple[plt.Figure, Tuple[plt.Axes]]

Note

When estimated automatically, the burnin and thin are set to respectively

\[2\cdot\textrm{max}\left(\tau\right)\]

and

\[\textrm{min}\left(\tau\right)/2\]