cars.pipelines.analysis.report_tools
CARS analysis pipeline report tools module
Functions
|
Transform absolute paths in the HTML content. |
|
Merge the reports pdfs into one report pdf |
|
Generate a report PDF using HTML and WeasyPrint. |
|
Wrapper to ensure that the decorated function returns a |
|
Normalize image for better visualization |
|
Generate the epipolar images overview |
|
Generate the envelope interpretation image |
|
Generate the dsm overview image |
|
Convert to overview |
|
Generates a hillshade from a Digital Surface Model (DSM). |
|
Generate a satellite position plot using Matplotlib. |
|
Geneate a report with the satellite positions and infos |
Module Contents
- cars.pipelines.analysis.report_tools.make_paths_relative(html_content, output_file_path)[source]
Transform absolute paths in the HTML content.
- Parameters:
html_content – html content
output_file_path
- Returns:
htm content with relative paths
- cars.pipelines.analysis.report_tools.merge_reports(reports_html_files, report_file_html, report_file_pdf)[source]
Merge the reports pdfs into one report pdf
- Parameters:
reports_html_files (list of str) – list of paths to the reports htmls to merge
report_file_html (str) – path to the merged report html
report_file_pdf (str) – path to the merged report pdf
- cars.pipelines.analysis.report_tools.generate_report_cars_output(report_file, output_dir, log_error, used_conf)[source]
Generate a report PDF using HTML and WeasyPrint.
- Parameters:
report_file – path to the report pdf to generate
output_dir – cars output directory
log_error – error log string or status
used_conf – configuration dictionary
- cars.pipelines.analysis.report_tools.safe_list_return(func)[source]
Wrapper to ensure that the decorated function returns a list even in case of exceptions. :param func: :return:
- cars.pipelines.analysis.report_tools.normalize_image(img)[source]
Normalize image for better visualization :param img: input image :return: clipped and normalized image
- cars.pipelines.analysis.report_tools.generate_epipolar_images(output_dir, used_resolution, images_dir)[source]
Generate the epipolar images overview
- Parameters:
output_dir (str) – cars output directory
used_resolution (float) – used resolution for the report
images_dir (str) – path to the directory to save the generated image
:return path to the generated image :rtype: str
- cars.pipelines.analysis.report_tools.generate_envelope_images(output_dir, used_resolution, images_dir)[source]
Generate the envelope interpretation image
- Parameters:
output_dir (str) – cars output directory
used_resolution (float) – used resolution for the report
images_dir (str) – path to the directory to save the generated image
:return path to the generated image :rtype: str
- cars.pipelines.analysis.report_tools.generate_dsm_overview(output_dir, images_dir)[source]
Generate the dsm overview image
- Parameters:
output_dir (str) – cars output directory
images_dir (str) – path to the directory to save the generated image
:return path to the generated image :rtype: str
- cars.pipelines.analysis.report_tools.save_robust_overview(input_path, output_png, title, cmap=None)[source]
Convert to overview :param input_path: :param output_png: :param title: :param cmap: :return:
- cars.pipelines.analysis.report_tools.generate_hillshade(dsm_path, output_path, azimuth=315, altitude=45)[source]
Generates a hillshade from a Digital Surface Model (DSM).
Parameters: - dsm_path: Path to the input .tif file - output_path: Path to save the generated hillshade - azimuth: Direction of the light source (0-360, 315 is North-West) - altitude: Solar elevation angle (0-90)