pleiades.sammy.results.manager module

class pleiades.sammy.results.manager.ResultsManager(lpt_file_path: Path = None, lst_file_path: Path = None)[source]

Bases: object

A class to manage and extract results from SAMMY calculations.

run_results

A container for multiple fit results.

Type:

RunResults

add_fit_result(fit_result: FitResults)[source]

Add a FitResults object to the RunResults.

get_single_fit_results(index: int) FitResults[source]

Retrieve a single fit result from the list.

print_fit_result(index: int)[source]

Print a specific fit result in a readable format.

print_number_of_fit_results()[source]

Print the number of fit results.

print_run_results()[source]

Print the run results in a readable format.

print_results_data()[source]

Print the results data in a readable format.

plot_transmission(override_data_type: bool = False, show_diff: bool = False, plot_uncertainty: bool = False, figsize=None, title=None, xscale='linear', yscale='linear', data_color='#433E3F', final_color='#ff6361', show=True)[source]

Plot the transmission data from the results.

Parameters:
  • override_data_type (bool) – Force plotting even if data type is not transmission.

  • show_diff (bool) – If True, plot the residuals.

  • plot_uncertainty (bool) – If True, plot error bars.

  • figsize (tuple) – Figure size (width, height) in inches.

  • title (str) – Plot title.

  • xscale (str) – X-axis scale (‘linear’ or ‘log’).

  • yscale (str) – Y-axis scale (‘linear’ or ‘log’).

  • data_color (str) – Color for experimental data points.

  • final_color (str) – Color for fitted theoretical curve.

  • show (bool) – If True, display the plot. If False, return figure object.

Returns:

The figure object if show=False, None otherwise.

Return type:

matplotlib.figure.Figure

plot_cross_section(override_data_type: bool = False, show_diff: bool = False, plot_uncertainty: bool = False)[source]

Plot the cross-section data from the results.

get_data()[source]

Get the data from the results.