Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post-processing refactoring #4410

Merged
merged 31 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ece10db
fix typos
gmalinve Mar 25, 2024
4f57c5a
fix typos
gmalinve Mar 25, 2024
7c874b8
fix typos and refactoring
gmalinve Mar 26, 2024
f5826e9
Merge branch 'main' into refacto_keywords_args
gmalinve Mar 26, 2024
e760c9d
decorator + test
gmalinve Mar 26, 2024
0603b5e
remove pass
gmalinve Mar 26, 2024
58a5227
Merge branch 'main' into refacto_keywords_args
gmalinve Mar 26, 2024
9fd0110
add decorator in pyaedt_function_handler
gmalinve Mar 26, 2024
1da55dd
refactoring Post-Processing
gmalinve Mar 27, 2024
cf84870
refactoring Post-Processing
gmalinve Mar 27, 2024
05a47d0
Merge branch 'main' into refacto_keywords_args
gmalinve Mar 28, 2024
096df9d
fix doc
gmalinve Mar 28, 2024
4258b13
remove import
gmalinve Mar 28, 2024
91ca32b
remove import
gmalinve Mar 28, 2024
c88ad78
refacto AdvancedPostProcessing.py
gmalinve Mar 28, 2024
61f4322
refacto AdvancedPostProcessing.py
gmalinve Mar 28, 2024
bf3cce5
refacto solutions.py
gmalinve Mar 28, 2024
a761ca1
Merge branch 'main' into refacto_keywords_args
gmalinve Mar 28, 2024
7267ab5
Merge branch 'main' into refacto_keywords_args
maxcapodi78 Apr 3, 2024
cb5c69a
back compatibility with ipy
Apr 3, 2024
13f65c9
Merge remote-tracking branch 'origin/refacto_keywords_args' into refa…
Apr 3, 2024
8590292
reverted unit test
Apr 3, 2024
caf6f3d
fixed UT
Apr 3, 2024
d053b96
fixed UT
Apr 3, 2024
345d2b0
Merge branch 'main' into refacto_keywords_args
maxcapodi78 Apr 3, 2024
b6cc6a1
Apply suggestions from code review
maxcapodi78 Apr 4, 2024
2acaac0
Update pyaedt/modules/PostProcessor.py
maxcapodi78 Apr 4, 2024
f65a6c6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 4, 2024
6d59955
PR review
gmalinve Apr 4, 2024
f58ef11
Merge branch 'main' into refacto_keywords_args
maxcapodi78 Apr 4, 2024
cc3eb6f
Merge branch 'main' into refacto_keywords_args
maxcapodi78 Apr 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 26 additions & 28 deletions _unittest/test_12_1_PostProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,25 +98,25 @@ def test_01_Animate_plt(self):
phases = [str(i * 5) + "deg" for i in range(2)]
model_gif = self.aedtapp.post.plot_animated_field(
quantity="Mag_E",
object_list=cutlist,
objects=cutlist,
plot_type="CutPlane",
setup_name=self.aedtapp.nominal_adaptive,
intrinsics={"Freq": "5GHz", "Phase": "0deg"},
export_path=self.local_scratch.path,
variation_variable="Phase",
variation_list=phases,
variations=phases,
show=False,
export_gif=True,
export_path=self.local_scratch.path,
)
assert os.path.exists(model_gif.gif_file)
setup_name = self.aedtapp.existing_analysis_sweeps[0]
intrinsic = {"Freq": "5GHz", "Phase": "180deg"}
pl1 = self.aedtapp.post.create_fieldplot_volume("NewObject_IJD39Q", "Mag_E", setup_name, intrinsic)
model_gif2 = self.aedtapp.post.animate_fields_from_aedtplt(
plotname=pl1.name,
plot_name=pl1.name,
plot_folder=None,
variation_variable="Phase",
variation_list=phases,
variations=phases,
project_path="",
export_gif=False,
show=False,
Expand All @@ -136,9 +136,7 @@ def test_02_export_fields(self):
plot2 = self.aedtapp.post.create_fieldplot_volume(vollist, quantity_name2, setup_name, intrinsic)

self.aedtapp.post.export_field_jpg(
os.path.join(self.local_scratch.path, "prova2.jpg"),
plot2.name,
plot2.plotFolder,
os.path.join(self.local_scratch.path, "prova2.jpg"), plot2.name, plot2.plot_folder
)
assert os.path.exists(os.path.join(self.local_scratch.path, "prova2.jpg"))
assert os.path.exists(
Expand Down Expand Up @@ -225,7 +223,7 @@ def test_07_export_fields_from_Calculator(self):
os.path.join(self.local_scratch.path, "Efield.fld"),
grid_stop=[5, 5, 5],
grid_step=[0.5, 0.5, 0.5],
isvector=True,
is_vector=True,
intrinsics="5GHz",
)
assert os.path.exists(os.path.join(self.local_scratch.path, "Efield.fld"))
Expand All @@ -235,10 +233,10 @@ def test_07_export_fields_from_Calculator(self):
"Setup1 : LastAdaptive",
self.aedtapp.available_variations.nominal_w_values_dict,
os.path.join(self.local_scratch.path, "MagEfieldSph.fld"),
gridtype="Spherical",
grid_type="Spherical",
grid_stop=[5, 300, 300],
grid_step=[5, 50, 50],
isvector=False,
is_vector=False,
intrinsics="5GHz",
)
assert os.path.exists(os.path.join(self.local_scratch.path, "MagEfieldSph.fld"))
Expand All @@ -248,10 +246,10 @@ def test_07_export_fields_from_Calculator(self):
"Setup1 : LastAdaptive",
self.aedtapp.available_variations.nominal_w_values_dict,
os.path.join(self.local_scratch.path, "MagEfieldCyl.fld"),
gridtype="Cylindrical",
grid_type="Cylindrical",
grid_stop=[5, 300, 5],
grid_step=[5, 50, 5],
isvector=False,
is_vector=False,
intrinsics="5GHz",
)
assert os.path.exists(os.path.join(self.local_scratch.path, "MagEfieldCyl.fld"))
Expand All @@ -271,12 +269,12 @@ def test_09_manipulate_report(self):
assert self.aedtapp.post.create_report("dB(S(1,1))")
assert self.aedtapp.post.create_report(
expressions="MaxMagDeltaS",
variations={"Pass": ["All"]},
setup_sweep_name="Setup1 : AdaptivePass",
variations={"Pass": ["All"]},
primary_sweep_variable="Pass",
report_category="Modal Solution Data",
plot_type="Rectangular Plot",
plotname="Solution Convergence Plot",
plot_name="Solution Convergence Plot",
)
new_report = self.aedtapp.post.reports_by_category.modal_solution("dB(S(1,1))")
assert new_report.create()
Expand Down Expand Up @@ -501,13 +499,13 @@ def test_14_Field_Ploton_cutplanedesignname(self):
assert plot1.update_field_plot_settings()
self.aedtapp.logger.info("Generating the image")
plot_obj = self.aedtapp.post.plot_field_from_fieldplot(
plotname=plot1.name,
plot_name=plot1.name,
project_path=self.local_scratch.path,
meshplot=False,
imageformat="jpg",
mesh_plot=False,
image_format="jpg",
view="xy",
show=False,
plot_label=plot1.name + " label",
show=False,
)
assert os.path.exists(plot_obj.image_file)
os.unlink(plot_obj.image_file)
Expand All @@ -526,13 +524,13 @@ def test_14_Field_Ploton_cutplanedesignname(self):
assert os.path.exists(plot_obj.image_file)

plot_obj = self.aedtapp.post.plot_field_from_fieldplot(
plotname=plot1.name,
plot_name=plot1.name,
project_path=self.local_scratch.path,
meshplot=False,
imageformat="jpg",
mesh_plot=False,
image_format="jpg",
view="xy",
show=False,
plot_label=plot1.name + " label",
show=False,
file_format="aedtplt",
)
assert os.path.exists(plot_obj.image_file)
Expand All @@ -557,11 +555,11 @@ def test_14B_Field_Ploton_Vector(self):
"CutPlane",
setup_name=setup_name,
intrinsics=intrinsic,
export_path=self.local_scratch.path,
mesh_on_fields=False,
imageformat="jpg",
view="isometric",
show=False,
export_path=self.local_scratch.path,
image_format="jpg",
)
assert os.path.exists(plot_obj.image_file)

Expand All @@ -580,11 +578,11 @@ def test_15_export_plot(self):
def test_16_create_field_plot(self):
cutlist = ["Global:XY"]
plot = self.aedtapp.post._create_fieldplot(
objlist=cutlist,
quantityName="Mag_E",
objects=cutlist,
quantity="Mag_E",
setup_name=self.aedtapp.nominal_adaptive,
intrinsics={},
listtype="CutPlane",
list_type="CutPlane",
)
assert plot

Expand Down
Loading
Loading