Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
correlation::app::PlotExportService Class Reference

Stateless service executing plot file exports decoupled from UI frameworks. More...

#include <PlotExportService.hpp>

Static Public Member Functions

static std::string getComparisonKey (const correlation::analysis::Histogram *hist)
 Determines the comparison curve key for a given histogram (e.g. "Total" or first partial).
static std::expected< void, std::string > exportHistogram (const std::string &filepath, const correlation::analysis::Histogram &hist, const correlation::plotters::PlotConfig &config, const std::map< std::string, real_t > &ashcroft_weights={})
 Exports a single histogram plot to file (SVG or PDF).
static std::expected< void, std::string > exportComparison (const std::string &filepath, std::span< const correlation::plotters::LabeledHistogram > datasets, const std::string &comparison_key, const correlation::plotters::PlotConfig &config)
 Exports a comparison overlay plot to file (SVG or PDF).

Detailed Description

Stateless service executing plot file exports decoupled from UI frameworks.

Member Function Documentation

◆ exportComparison()

std::expected< void, std::string > correlation::app::PlotExportService::exportComparison ( const std::string & filepath,
std::span< const correlation::plotters::LabeledHistogram > datasets,
const std::string & comparison_key,
const correlation::plotters::PlotConfig & config )
staticnodiscard

Exports a comparison overlay plot to file (SVG or PDF).

Parameters
[in]filepathTarget destination file path.
[in]datasetsComparison datasets to render.
[in]comparison_keyKey for the compared curve.
[in]configPlot styling configuration.
Returns
Expected void on success or error description string on failure.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportHistogram()

std::expected< void, std::string > correlation::app::PlotExportService::exportHistogram ( const std::string & filepath,
const correlation::analysis::Histogram & hist,
const correlation::plotters::PlotConfig & config,
const std::map< std::string, real_t > & ashcroft_weights = {} )
staticnodiscard

Exports a single histogram plot to file (SVG or PDF).

Parameters
[in]filepathTarget destination file path.
[in]histHistogram to render.
[in]configPlot styling configuration.
[in]ashcroft_weightsElement weights for S(Q) partials if applicable.
Returns
Expected void on success or error description string on failure.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getComparisonKey()

std::string correlation::app::PlotExportService::getComparisonKey ( const correlation::analysis::Histogram * hist)
staticnodiscard

Determines the comparison curve key for a given histogram (e.g. "Total" or first partial).

Parameters
[in]histHistogram to inspect.
Returns
Key string.
Here is the caller graph for this function:

The documentation for this class was generated from the following files: