@@ -578,6 +578,26 @@ def __init__(self, desktop, template):
578
578
self ._summary_font = [["" , None ]]
579
579
self .report_data = VirtualComplianceData ()
580
580
self .revision = "1.0"
581
+ self ._image_width = 800
582
+ self ._image_height = 450
583
+
584
+ @property
585
+ def image_width (self ):
586
+ """Image width resolution during export."""
587
+ return self ._image_width
588
+
589
+ @image_width .setter
590
+ def image_width (self , val ):
591
+ self ._image_width = val
592
+
593
+ @property
594
+ def image_height (self ):
595
+ """Image height resolution during export."""
596
+ return self ._image_height
597
+
598
+ @image_height .setter
599
+ def image_height (self , val ):
600
+ self ._image_height = val
581
601
582
602
@property
583
603
def dut_image (self ):
@@ -904,7 +924,9 @@ def _create_derived_reports(self):
904
924
else :
905
925
self ._summary .append ([template_report .name , "NO PASS/FAIL" ])
906
926
self ._summary_font .append (["" , None ])
907
- out = _design .post .export_report_to_jpg (self ._output_folder , aedt_report .plot_name )
927
+ out = _design .post .export_report_to_jpg (
928
+ self ._output_folder , aedt_report .plot_name , width = self .image_width , height = self .image_height
929
+ )
908
930
if out :
909
931
compliance_reports .add_image (
910
932
{
@@ -1088,7 +1110,9 @@ def _create_derived_reports(self):
1088
1110
else :
1089
1111
self ._summary .append ([template_report .name , "NO PASS/FAIL" ])
1090
1112
self ._summary_font .append (["" , None ])
1091
- out = _design .post .export_report_to_jpg (self ._output_folder , aedt_report .plot_name )
1113
+ out = _design .post .export_report_to_jpg (
1114
+ self ._output_folder , aedt_report .plot_name , width = self .image_width , height = self .image_height
1115
+ )
1092
1116
if out :
1093
1117
compliance_reports .add_image (
1094
1118
{
@@ -1184,7 +1208,9 @@ def _create_aedt_reports(self):
1184
1208
aedt_report .hide_legend ()
1185
1209
1186
1210
time .sleep (1 )
1187
- out = _design .post .export_report_to_jpg (self ._output_folder , aedt_report .plot_name )
1211
+ out = _design .post .export_report_to_jpg (
1212
+ self ._output_folder , aedt_report .plot_name , width = self .image_width , height = self .image_height
1213
+ )
1188
1214
if tpx > 0 :
1189
1215
compliance_reports .add_section ()
1190
1216
compliance_reports .add_subchapter (f"{ name } " )
@@ -1251,7 +1277,9 @@ def _create_aedt_reports(self):
1251
1277
if report_type != "contour eye diagram" and "3D" not in local_config ["report_type" ]:
1252
1278
aedt_report .hide_legend ()
1253
1279
time .sleep (1 )
1254
- out = _design .post .export_report_to_jpg (self ._output_folder , aedt_report .plot_name )
1280
+ out = _design .post .export_report_to_jpg (
1281
+ self ._output_folder , aedt_report .plot_name , width = self .image_width , height = self .image_height
1282
+ )
1255
1283
time .sleep (1 )
1256
1284
if out :
1257
1285
if tpx + tpx1 > 0 :
@@ -1460,7 +1488,7 @@ def _add_lna_violations(self, report, chapter, image_name, pass_fail_criteria):
1460
1488
test_value = limit_v ["ypoints" ][yy ]
1461
1489
range_value , x_value , result_value = self ._check_test_value (result_range , ypoints , hatch_above )
1462
1490
units = limit_v .get ("yunits" , "" )
1463
- mystr = f"Zone { zones } "
1491
+ mystr = f"Zone { zones } "
1464
1492
font_table .append ([[255 , 255 , 255 ], [255 , 0 , 0 ]] if result_value == "FAIL" else ["" , None ])
1465
1493
pass_fail_table .append (
1466
1494
[
@@ -1692,12 +1720,12 @@ def create_compliance_report(self, file_name="compliance_test.pdf", close_projec
1692
1720
str
1693
1721
Path to the output file.
1694
1722
"""
1695
- self .report_data = VirtualComplianceData ()
1696
1723
self .compute_report_data ()
1697
1724
return self .create_pdf (file_name = file_name , close_project = close_project )
1698
1725
1699
- def compute_report_data (self ):
1726
+ def compute_report_data (self ) -> VirtualComplianceData :
1700
1727
"""Compute the report data and exports all the images and table without creating the pdf."""
1728
+ self .report_data = VirtualComplianceData ()
1701
1729
if not self ._project_name :
1702
1730
self .load_project ()
1703
1731
@@ -1737,6 +1765,7 @@ def compute_report_data(self):
1737
1765
summary .add_table (
1738
1766
{"title" : f"Simulation Summary" , "content" : self ._summary , "formatting" : self ._summary_font }
1739
1767
)
1768
+ return self .report_data
1740
1769
1741
1770
def create_pdf (self , file_name , close_project = True ):
1742
1771
"""Create the PDF report after the method ``compute_report_data`` is called.
0 commit comments