Skip to content

Commit

Permalink
Merge branch 'main' into fix_pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys authored Apr 9, 2024
2 parents 1afbbdc + dbf4a89 commit 252d870
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions _unittest/test_20_HFSS.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,7 @@ def test_20_create_voltage_on_sheet(self):

def test_21_create_open_region(self):
assert self.aedtapp.create_open_region("1GHz")
assert len(self.aedtapp.field_setups) == 3
assert self.aedtapp.create_open_region("1GHz", "FEBI")
assert self.aedtapp.create_open_region("1GHz", "PML", True, "-z")

Expand Down
8 changes: 5 additions & 3 deletions pyaedt/generic/compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ def _add_statistical_violations(self, report, pdf_report, image_name, local_conf
self._desktop_class.logger.error(msg)
return
mag_data = {i: k for i, k in sols.full_matrix_real_imag[0][sols.expressions[0]].items() if k > 0}
# mag_data is a dictionary. The key isa tuple (__AMPLITUDE, __UI), and the value is the eye value.
mystr = "Eye Mask Violation:"
result_value = "PASS"
points_to_check = [i[::-1] for i in local_config["eye_mask"]["points"]]
Expand All @@ -711,13 +712,14 @@ def _add_statistical_violations(self, report, pdf_report, image_name, local_conf
if result_value == "FAIL":
result_value = f"FAIL on {num_failed} points."
pass_fail_table.append([mystr, result_value])

result_value = "PASS"
if local_config["eye_mask"]["enable_limits"]:
mystr = "Upper/Lower Mask Violation:"
for point in mag_data:
# checking if amplitude is overcoming limits.
if (
point[1] > local_config["eye_mask"]["upper_limit"]
or point[1] < local_config["eye_mask"]["lower_limit"]
point[0] > local_config["eye_mask"]["upper_limit"]
or point[0] < local_config["eye_mask"]["lower_limit"]
):
result_value = "FAIL"
break
Expand Down
1 change: 1 addition & 0 deletions pyaedt/hfss.py
Original file line number Diff line number Diff line change
Expand Up @@ -2848,6 +2848,7 @@ def create_open_region(self, Frequency="1GHz", Boundary="Radiation", ApplyInfini

self.omodelsetup.CreateOpenRegion(vars)
self.logger.info("Open Region correctly created.")
self.save_project()
return True

@pyaedt_function_handler()
Expand Down

0 comments on commit 252d870

Please sign in to comment.