|
14 | 14 |
|
15 | 15 |
|
16 | 16 | class Report: |
17 | | - def __init__(self, data: DataSet) -> None: |
18 | | - self.output_path: str = os.path.join(data.data_path, "stats") |
19 | | - self.dataset_name: str = os.path.basename(data.data_path) |
20 | | - self.io_handler: io.IoFilesystemBase = data.io_handler |
| 17 | + def __init__(self, data: DataSet, stats = None) -> None: |
| 18 | + self.output_path = os.path.join(data.data_path, "stats") |
| 19 | + self.dataset_name = os.path.basename(data.data_path) |
| 20 | + self.io_handler = data.io_handler |
21 | 21 |
|
22 | 22 | self.mapi_light_light_green = [255, 255, 255] |
23 | 23 | self.mapi_light_green = [0, 0, 0] |
@@ -190,7 +190,7 @@ def make_dataset_summary(self) -> None: |
190 | 190 | [ |
191 | 191 | "Processing Time", |
192 | 192 | #f"{self.stats['processing_statistics']['steps_times']['Total Time']:.2f} seconds", |
193 | | - self.stats['odm_processing_statistics']['total_time_human'], |
| 193 | + self.stats['odm_processing_statistics']['total_time_human'] if 'odm_processing_statistics' in self.stats else f"{self.stats['processing_statistics']['steps_times']['Total Time']:.2f} seconds", |
194 | 194 | ], |
195 | 195 | ["Capture Start", self.stats["processing_statistics"]["start_date"]], |
196 | 196 | ["Capture End", self.stats["processing_statistics"]["end_date"]], |
@@ -262,11 +262,12 @@ def make_processing_summary(self) -> None: |
262 | 262 | ]) |
263 | 263 |
|
264 | 264 | # GSD (if available) |
265 | | - if self.stats['odm_processing_statistics'].get('average_gsd'): |
266 | | - rows.insert(3, [ |
267 | | - "Average Ground Sampling Distance (GSD)", |
268 | | - f"{self.stats['odm_processing_statistics']['average_gsd']:.1f} cm" |
269 | | - ]) |
| 265 | + if 'odm_processing_statistics' in self.stats: |
| 266 | + if self.stats['odm_processing_statistics'].get('average_gsd'): |
| 267 | + rows.insert(3, [ |
| 268 | + "Average Ground Sampling Distance (GSD)", |
| 269 | + f"{self.stats['odm_processing_statistics']['average_gsd']:.1f} cm" |
| 270 | + ]) |
270 | 271 |
|
271 | 272 | row_gps_gcp = [" / ".join(geo_string) + " errors"] |
272 | 273 | geo_errors = [] |
@@ -724,6 +725,7 @@ def generate_report(self) -> None: |
724 | 725 | else: |
725 | 726 | self.make_align_details() |
726 | 727 |
|
| 728 | + self.make_orientation_details() |
727 | 729 | self.add_page_break() |
728 | 730 |
|
729 | 731 | self.make_features_details() |
|
0 commit comments