demcompare.report

Generate demcompare report from DEM comparison results (graphs, stats, …)

Steps: - init SphinxProjectManager class structure - create all data and documentation structure for each classif_layer and mode - create sphinx source rst report and add to SphinxProjectManager object - Compile SphinxProjectManager object to generate html and pdf report

Module Contents

Functions

fill_report_stats(→ str)

Fill report with statistics information for all cases:

fill_report_image_views(→ str)

Fill report with image views: snapshots, cdf, pdf information

fill_report(→ str)

Fill sphinx demcompare report into a string from cfg and stats_dataset

generate_report(cfg[, stats_datasets])

Generate demcompare report

demcompare.report.fill_report_stats(working_dir: str, stats_dataset: demcompare.stats_dataset.StatsDataset, src: str) str[source]

Fill report with statistics information for all cases: without coreg: - two dems : diff of the two dems - one dsm : stats on the dem alone.

with coreg and two dems: diff of two coregistered dems.

TODO: if refacto report, use only csv or stats_dataset but not both

Parameters:
  • working_dir (str) – directory in which to find mode.csv files for each mode in modename

  • stats_dataset (StatsDataset) – StatsDataset object

  • src (str) – report source

Returns:

filled src

Return type:

demcompare.report.fill_report_image_views(working_dir: str, stats_dataset: demcompare.stats_dataset.StatsDataset, src: str) str[source]

Fill report with image views: snapshots, cdf, pdf information

Parameters:
  • working_dir – directory in which to find mode.csv files for each mode in modename

  • src – report source

Returns:

filled src

demcompare.report.fill_report(cfg: demcompare.internal_typing.ConfigType, stats_datasets: List[demcompare.stats_dataset.StatsDataset] = None) str[source]

Fill sphinx demcompare report into a string from cfg and stats_dataset

Parameters:
  • cfg – input demcompare configuration

  • stats_dataset – stats dataset demcompare object containing results

demcompare.report.generate_report(cfg: demcompare.internal_typing.ConfigType, stats_datasets: List[demcompare.stats_dataset.StatsDataset] = None)[source]

Generate demcompare report

Parameters:
  • cfg – input demcompare configuration

  • stats_dataset – stats dataset demcompare object containing results