GUIBRUSHR.GUI.Input_Output_Panels.Input_Panels.TabPanels.Frame_Retrieval_Analysis.Tab_Analysis.FrameCornerPlot.plot_pmcmcg module¶
PMCMCG Corner Plot Generator
This module generates corner plots for MCMC analysis results using different plotting libraries (corner, pygtc). It processes retrieval data and creates visualization plots with parameter distributions and confidence intervals.
The script is designed to be called from command line with specific arguments and maintains the exact sequence of operations for compatibility with the existing pipeline.
- GUIBRUSHR.GUI.Input_Output_Panels.Input_Panels.TabPanels.Frame_Retrieval_Analysis.Tab_Analysis.FrameCornerPlot.plot_pmcmcg.db_value_corner_plot(lista_par, lista_par_fix, best_fit_parameters, error_list, value_fix, target_kp, target_ecc, target_opi, target_t_eq)[source]¶
Extract database values and median values for corner plot parameters.
This function checks which parameters are available in the parameter lists and extracts corresponding target values and median values for plotting.
- Parameters:
lista_par – List of fitted parameters
lista_par_fix – List of fixed parameters
best_fit_parameters – Median values for fitted parameters
error_list – Error values for fitted parameters
value_fix – Values for fixed parameters
target_kp – Target K_p value
target_ecc – Target eccentricity
target_opi – Target omega value
target_t_eq – Target equilibrium temperature
- Returns:
- Contains values_db (list), values_median (list), index (list),
T0_f (float), et_f (float)
- Return type:
tuple
- GUIBRUSHR.GUI.Input_Output_Panels.Input_Panels.TabPanels.Frame_Retrieval_Analysis.Tab_Analysis.FrameCornerPlot.plot_pmcmcg.find_param_arr(name, lista_par, lista_par_fix, best_fit_parameters, error_list, value_fix, value=None)[source]¶
Find parameter value and error from parameter lists.
Searches for a parameter in the fitted parameters list first, then in the fixed parameters list, and finally uses the provided default value.
- Parameters:
name – Parameter name to search for
lista_par – List of fitted parameters
lista_par_fix – List of fixed parameters
best_fit_parameters – Median values for fitted parameters
error_list – Error values for fitted parameters
value_fix – Values for fixed parameters
value – Default value to use if parameter not found
- Returns:
Object containing parameter value and error
- Return type:
- GUIBRUSHR.GUI.Input_Output_Panels.Input_Panels.TabPanels.Frame_Retrieval_Analysis.Tab_Analysis.FrameCornerPlot.plot_pmcmcg.plot_corner(arr1, lista_parametri, style_corner='black', figsize=None, title_fmt='.2f', smooth=1.0, show_titles=True, truth_values=None, levels=30, quantiles=None, bins=50)[source]¶
Create a publication-ready corner plot.
- Parameters:
arr1 (array-like) – MCMC samples with shape (nsamples, ndim)
lista_parametri (list) – Parameter labels (supports LaTeX)
style_corner (str) – Style options: - Contour styles (lines + datapoints): “black”, “orange”, “blue”, “purple”, “green”, “brown” - Filled styles (filled contours, no datapoints): “blue_cmap”, “orange_cmap” - Colormap style (density gradient): “gnuplot2”
figsize (tuple, optional) – Figure size. If None, auto-calculated based on ndim
title_fmt (str) – Format string for title values
smooth (float) – Smoothing factor for contours
show_titles (bool) – Show parameter values in titles
truth_values (list, optional) – True values to overplot
levels (int) – Number of contour levels for colormap styles (default 30)
quantiles (list) – Quantiles to show (default [0.16, 0.5, 0.84])
bins (int) – Number of bins for 2D histograms
- Returns:
figure
- Return type:
matplotlib.figure.Figure
- GUIBRUSHR.GUI.Input_Output_Panels.Input_Panels.TabPanels.Frame_Retrieval_Analysis.Tab_Analysis.FrameCornerPlot.plot_pmcmcg.main()[source]¶
Generate corner plot from MCMC retrieval results.
- Command line usage:
python plot_pmcmcg.py <folder_retrieval> <ext> <target> <path_default>
- Parameters:
folder_retrieval – Path to retrieval results folder
ext – File extension for output
target – Target name
path_default – Default path for GUIBRUSHR modules