Plotting#

Plotting Module#

High-level plotting routines for corner plots, chains, radar diagrams, best-fit spectra, CCFs, and RV–v sin i maps.

class ForMoSA.nested_sampling.plotting.Plotting(results, logger, log_level='INFO')[source]#

Bases: object

Class of visualisation of the results of the nested sampling.

Parameters:
  • results (NSResults) – Instance of class NSResults

  • logger (Logger) – Logger used

  • log_level (str) – Level of the Logger

Notes

Authors: Paulina Palma-Bifani, Matthieu Ravet and Allan Denis

property logger: Logger#

Logger.

property ns_results: NSResults#

Instance of classe NSResults.

plot_corner()[source]#

Corner plot the posterior samples from the nested sampling results.

Parameters:

config (CornerPlotConfig) – Instance of class CornerPlotConfig

Return type:

Figure

Returns:

matplotlib.figure.Figure – Figure containin corner plots.

Notes

Authors: Paulina Palma-Bifani, Matthieu Ravet and Allan Denis

plot_chains()[source]#

Plot the chains of the samples results.

Parameters:
  • Returns

  • --------

  • tuple[matplotlib.figure.Figure – Tuple containing Figure and Ax objects

  • matplotlib.axes._axes.Axes] – Tuple containing Figure and Ax objects

Return type:

tuple[Figure, Axes]

Notes

Authors: Paulina Palma-Bifani, Matthieu Ravet and Allan Denis

plot_radars()[source]#

Plot spider plot of the samples results.

Return type:

tuple[Figure, Axes]

Returns:

tuple[matplotlib.figure.Figure, matplotlib.axes._axes.Axes]

Notes

Authors: Bhavesh Rajpoot (adapted from Paulina Palma-Bifani, Matthieu Ravet, Allan Denis)

plot_fit(observations, best_fit, figsize=(18, 8), plot_native_model=False, native_model=None)[source]#

Plot best fit

Parameters:
  • observations (ObservationSet) – Instance of class ObservationSet

  • best_fit (list[ObservedModel]) – List of instances of class ObservedModel corresponding to the best-fit model for each observation

  • figsize (tuple[float, float]) – Size of the figure

  • plot_native_model (bool) – Whether to plot the native model

  • native_model (ObservedModel | None) – As instance of ObservedModel

Return type:

tuple[Figure, Axes, Axes, Axes, Axes]

Returns:

tuple[Figure, Axes, Axes, Axes, Axes] – Figure and ax objects

Notes

Authors: Paulina Palma-Bifani, Matthieu Ravet and Allan Denis

plot_ccf(rv_grid, ccf, acf, ccf_star=None, title=None)[source]#

Plot the Cross-Correlation Function (CCF).

Parameters:
  • rv_grid (ndarray) – Grid of radial velocity values (in km/s)

  • ccf (ndarray) – Corresponding ccf (cross-correlation) values

  • acf (ndarray) – acf (aut-correlation) values

  • ccf_star (ndarray | None) – ccf values with star speckles

  • title (str)

Return type:

tuple[Figure, Axes]

Returns:

tuple[Figure, Axes] – Figure and Axes objects

Notes

Authors: Bhavesh Rajpoot and Allan Denis

plot_rv_vsini_map(rv_grid, vsini_grid, logL_map, title=None)[source]#

Plot the RV vs v.sin(i) loglikelihood map.

Parameters:
  • rv_grid (ndarray) – Grid of radial velocity values (in km/s)

  • ccf (np.ndarray) – Corresponding ccf (cross-correlation) values

  • acf (np.ndarray) – acf (aut-correlation) values

  • ccf_star (np.ndarray) – ccf values with star speckles

  • vsini_grid (ndarray)

  • logL_map (ndarray)

  • title (str)

Return type:

tuple[list[Figure], list[Axes]]

Returns:

tuple[Figure, Axes] – Figure and Axes objects

Notes

Authors: Bhavesh Rajpoot (adapted from Allan Denis)