frostie.plotting¶
Functions¶
|
Plot median and confidence regions from posterior samples. |
|
Plot posterior distributions from a dynesty results object. |
Module Contents¶
- frostie.plotting.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.
- Parameters:
wavelengths (ndarray) – Data wavelength grid (x-axis).
reflectance (ndarray) – Observed data.
uncertainty (ndarray) – 1σ uncertainties.
model_function (callable) – Function that takes a sample vector and returns (model_wavelengths, model_spectrum).
samples (dynesty.results.Results) – Dynesty results object.
num_draws (int) – Number of spectra to draw from the posterior.
title (str) – Title for the plot.
plot_residuals (bool) – If True, add a residuals panel.
zoomed_inset (bool) – If True, adds a zoomed-in subplot in the upper right corner.
- frostie.plotting.plot_posteriors(results, param_names=None, transform_log10f=True, n_sigma=2, truths=None)¶
Plot posterior distributions from a dynesty results object.
- Parameters:
results (dynesty.results.Results) – Full dynesty results object.
param_names (list) – Names of the parameters (in order).
transform_log10f (bool) – Whether to convert log10f_* parameters to linear f.
n_sigma (float) – Sigma level to define the confidence interval (e.g., 1 for 68%, 2 for 95%).
truths (list or None) – 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).