asp_plot.report#

Attributes#

Classes#

ASPReportPDF

FPDF subclass with custom header and footer for ASP reports.

AlignmentReportPage

A PDF page for the pc_align-vs-ICESat-2 alignment workflow.

ReportMetadata

Metadata about the output DEM for the report title page.

ReportSection

A section of the PDF report containing a figure with title and caption.

Functions#

compile_report(sections, processing_parameters_dict, ...)

Compile a PDF report with ASP processing results and plots.

Module Contents#

class asp_plot.report.ASPReportPDF(report_title='ASP Output Quality Report')#

Bases: fpdf.FPDF

FPDF subclass with custom header and footer for ASP reports.

footer()#
header()#
report_title = 'ASP Output Quality Report'#
class asp_plot.report.AlignmentReportPage#

A PDF page for the pc_align-vs-ICESat-2 alignment workflow.

Each page carries (optionally) a small kwargs table, a single-row alignment-stats table, a description paragraph, a status/message block, and an optional figure with caption below. Rendered by compile_report alongside ReportSection entries. Body text blocks are rendered left-aligned (not justified) to avoid large inter-word gaps.

title#

Page heading.

Type:

str

parameters#

Alignment kwargs passed to Altimetry.align_and_evaluate. Rendered as a small two-column table above the stats table. Use an empty dict to skip.

Type:

dict

stats_row#

Single-row alignment statistics (e.g. p16_beg/p50_beg/… from pc_align_report). Rendered as a horizontal 1-row table with column headers. Values are formatted to two significant figures. Use an empty dict to skip.

Type:

dict

description#

Long-form explanation of pc_align and the meaning of each column in the parameters and stats tables. Rendered between the stats table and the status message. Empty string to skip.

Type:

str

status_message#

Short status paragraph (e.g. path to aligned DEM, or a note that alignment was skipped / produced no significant improvement).

Type:

str

image_path#

Optional absolute path to a PNG figure rendered below the tables.

Type:

str or None

caption#

Optional caption shown below the figure when image_path is set.

Type:

str

figure_number#

Auto-assigned by compile_report().

Type:

int

caption: str = ''#
description: str = ''#
figure_number: int = 0#
image_path: str | None = None#
parameters: dict#
stats_row: dict#
status_message: str = ''#
title: str#
class asp_plot.report.ReportMetadata#

Metadata about the output DEM for the report title page.

dem_dimensions#

(width, height) in pixels.

Type:

tuple

dem_gsd_m#

Ground sample distance in meters.

Type:

float

dem_crs#

Coordinate reference system string (e.g. “EPSG:32616”).

Type:

str

dem_nodata_percent#

Percentage of nodata pixels.

Type:

float

dem_elevation_range#

(min, max) elevation in meters.

Type:

tuple

dem_filename#

DEM filename.

Type:

str

reference_dem#

Reference DEM path or description.

Type:

str

acquisition_dates#

Scene acquisition date strings (e.g. “2017-07-31 19:07:28 UTC”) when recoverable from scene metadata. Empty list if not found.

Type:

list of str

acquisition_dates: list = []#
dem_crs: str = ''#
dem_dimensions: tuple = (0, 0)#
dem_elevation_range: tuple = (0, 0)#
dem_filename: str = ''#
dem_gsd_m: float = 0.0#
dem_nodata_percent: float = 0.0#
reference_dem: str = ''#
class asp_plot.report.ReportSection#

A section of the PDF report containing a figure with title and caption.

title#

Section heading displayed above the figure.

Type:

str

image_path#

Absolute path to the PNG image file.

Type:

str

caption#

Caption text displayed below the figure.

Type:

str

figure_number#

Auto-assigned by compile_report().

Type:

int

caption: str = ''#
figure_number: int = 0#
image_path: str#
title: str#
asp_plot.report.compile_report(sections, processing_parameters_dict, report_pdf_path, report_title='ASP Output Quality Report', report_metadata=None, report_command=None)#

Compile a PDF report with ASP processing results and plots.

Creates a structured PDF report with a title page, figure sections with captions, and a processing parameters appendix.

Parameters:
  • sections (list of ReportSection) – Ordered list of report sections, each containing a title, image path, and optional caption.

  • processing_parameters_dict (dict) – Dictionary containing processing parameters from ASP logs.

  • report_pdf_path (str) – Output path for the PDF report.

  • report_title (str, optional) – Title for the report. Default is “ASP Output Quality Report”.

  • report_metadata (ReportMetadata, optional) – DEM metadata for the title page summary table. Default is None.

  • report_command (str, optional) – The asp_plot CLI command used to generate this report. Default is None.

Returns:

Generates a PDF report at the specified path.

Return type:

None

Notes

Required keys in processing_parameters_dict: - processing_timestamp: When the processing was performed - reference_dem: Path to reference DEM used - bundle_adjust: Bundle adjustment command - bundle_adjust_run_time: Time to run bundle adjustment - stereo: Stereo command - stereo_run_time: Time to run stereo - point2dem: Point2dem command - point2dem_run_time: Time to run point2dem

asp_plot.report.logger#