frostie.plotting ================ .. py:module:: frostie.plotting Functions --------- .. autoapisummary:: frostie.plotting.plot_spectrum_with_uncertainty frostie.plotting.plot_posteriors Module Contents --------------- .. py:function:: plot_spectrum_with_uncertainty(wavelengths, reflectance, uncertainty, model_function, samples, num_draws=200, title='Posterior Model Fit', plot_residuals=True, plot_uncertainty=False) Plot median and confidence regions from posterior samples. :param wavelengths: Data wavelength grid (x-axis). :type wavelengths: ndarray :param reflectance: Observed data. :type reflectance: ndarray :param uncertainty: 1σ uncertainties. :type uncertainty: ndarray :param model_function: Function that takes a sample vector and returns (model_wavelengths, model_spectrum). :type model_function: callable :param samples: Dynesty results object. :type samples: dynesty.results.Results :param num_draws: Number of spectra to draw from the posterior. :type num_draws: int :param title: Title for the plot. :type title: str :param plot_residuals: If True, add a residuals panel. :type plot_residuals: bool :param zoomed_inset: If True, adds a zoomed-in subplot in the upper right corner. :type zoomed_inset: bool .. py:function:: plot_posteriors(results, param_names=None, transform_log10f=True, n_sigma=2, truths=None) Plot posterior distributions from a dynesty results object. :param results: Full dynesty results object. :type results: dynesty.results.Results :param param_names: Names of the parameters (in order). :type param_names: list :param transform_log10f: Whether to convert log10f_* parameters to linear f. :type transform_log10f: bool :param n_sigma: Sigma level to define the confidence interval (e.g., 1 for 68%, 2 for 95%). :type n_sigma: float :param truths: True parameter values to show on the plot (same length/order as param_names), assumed to be in final plotted units (e.g., f, not log10f). :type truths: list or None