wf_psf.plotting.plots_interface module
Plot Interface.
An interface module with classes to handle different plot configurations.
- Author:
Jennifer Pollack <jennifer.pollack@cea.fr>
- class wf_psf.plotting.plots_interface.MetricsPlotHandler(plotting_params, metrics, list_of_stars, metric_name, rmse, std_rmse, plot_title, plots_dir)[source]
Bases:
object
MetricsPlotHandler class.
A class to handle plot parameters for various metrics results.
- Parameters:
id (str) – Class ID name
plotting_params (Recursive Namespace object) –
metrics (dict) – Dictionary containing list of metrics
list_of_stars (list) – List containing the number of training stars per run
metric_name (str) – Name of metric
rmse (str) – Root-mean square error label
std_rmse (str) – Standard error on root-mean square error standard label
plots_dir (str) – Output directory for metrics plots
Methods
get_metrics
(dataset)Get Metrics.
plot
()Plot.
- get_metrics(dataset)[source]
Get Metrics.
A function to get metrics: rmse, rmse_std for each run input, e.g. wf-outputs-xxxxxxxxxxxx.
- ids = ('poly_metrics', 'opd_metrics', 'poly_pixel')
- class wf_psf.plotting.plots_interface.MonochromaticMetricsPlotHandler(plotting_params, metrics_confs, metrics, list_of_stars, plots_dir)[source]
Bases:
object
MonochromaticMetricsPlotHandler class.
A class to handle plot parameters for monochromatic metrics results.
- Parameters:
id (str) – Class ID name
plotting_params (Recursive Namespace object) – RecursiveNamespace object containing plotting parameters
metrics_confs (dict) – Dictionary containing the metric configurations as RecursiveNamespace objects for each run
metrics (list) – Dictionary containing list of metrics
list_of_stars (list) – List containing the number of stars used for each training data set
plots_dir (str) – Output directory for metrics plots
Methods
plot
()Plot.
- ids = ('mono_metrics',)
- class wf_psf.plotting.plots_interface.ShapeMetricsPlotHandler(plotting_params, metrics, list_of_stars, plots_dir)[source]
Bases:
object
ShapeMetricsPlotHandler class.
A class to handle plot parameters shape metrics results.
- Parameters:
id (str) – Class ID name
plotting_params (Recursive Namespace object) – Recursive Namespace Object containing plotting parameters
metrics (list) – Dictionary containing list of metrics
list_of_stars (list) – List containing the number of stars used for each training data set
plots_dir (str) – Output directory for metrics plots
Methods
plot
()Plot.
- id = 'shape_metrics'
- wf_psf.plotting.plots_interface.define_plot_style()[source]
Define Plot Style.
A function to set plot_style parameters.
- wf_psf.plotting.plots_interface.get_number_of_stars(metrics)[source]
Get Number of Stars.
A function to get the number of stars used in training the model.
- wf_psf.plotting.plots_interface.make_plot(x_axis, y_axis, y_axis_err, label, plot_title, x_axis_label, y_right_axis_label, y_left_axis_label, filename, plot_show=False)[source]
Make Plot.
A function to generate metrics plots.
- Parameters:
x_axis (list) – x-axis values
y_axis (list) – y-axis values
y_axis_err (list) – Error values for y-axis points
label (str) – Label for the points
plot_title (str) – Name of plot
x_axis_label (str) – Label for x-axis
y_left_axis_label (str) – Label for left vertical axis of plot
y_right_axis_label (str) – Label for right vertical axis of plot
filename (str) – Name of file to save plot
plot_show (bool) – Boolean flag to set plot display
- wf_psf.plotting.plots_interface.plot_metrics(plotting_params, list_of_metrics, metrics_confs, plot_saving_path)[source]
Plot model results.
- Parameters:
plotting_params (RecursiveNamespace Object) – Recursive Namespace object containing plot configuration parameters
list_of_metrics (list) – List containing all model metrics
metrics_confs (list) – List containing all metrics configuration parameters
plot_saving_path (str) – Directory path for saving output plots