sec_interp.gui.preview_reporter module

Reporting and results formatting for SecInterp preview.

This module provides the PreviewReporter class to handle the formatting of preview generation results and performance metrics into human-readable messages.

class sec_interp.gui.preview_reporter.PreviewReporter

Bases: object

Formatter for preview generation results and status messages.

static format_drillhole_summary(drillhole_data: Any | None) → str

Format a summary line for drillhole data.

static format_geology_summary(geol_data: list[GeologySegment] | None) → str

Format a summary line for geology data.

static format_performance_metrics(metrics: MetricsCollector, result: PreviewResult) → list[str]

Format performance metrics into a list of strings.

static format_result_metrics(result: PreviewResult) → list[str]

Format elevation metrics for the results message.

static format_results_message(result: PreviewResult, metrics: MetricsCollector, vert_exag: float | None = None, auto_vert_exag: bool = False) → str

Format results message for display using core result objects.

Parameters:
  • result – The preview result object containing data and metadata.

  • metrics – Performance metrics collector.

  • vert_exag – The applied vertical exaggeration factor, if known.

  • auto_vert_exag – Whether the exaggeration was set automatically.

Returns:

A formatted string ready for display in the UI.

static format_structure_summary(struct_data: list[StructureMeasurement] | None, buffer_dist: float) → str

Format a summary line for structural data.

static format_vertical_exaggeration(vert_exag: float | None, auto_vert_exag: bool) → list[str]

Format the applied vertical exaggeration factor, if known.

Parameters:
  • vert_exag – The applied VE factor, or None when unavailable.

  • auto_vert_exag – Whether the factor was set automatically.

Returns:

A list of message lines (empty when no factor is known).