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

FEAT: Improve antenna array processing and plotting #4626

Merged
merged 35 commits into from
May 13, 2024

Conversation

Devin-Crawford
Copy link
Contributor

Minor improvements to plotting and functionality to support array phase excitations for beam-steering in HFSS.

- Add default matplotlib settings to plot.py
- Add decorator update_plot_settings to plot.py
- Update some docstrings
- Correct some errors of return type for plotting methods.
Bring all plotting and rendering
into the method plot_farfield_contour so that it
can be customized to far-field data.
@ansys-reviewer-bot
Copy link
Contributor

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

@codecov-commenter
Copy link

codecov-commenter commented May 3, 2024

Codecov Report

Attention: Patch coverage is 50.56180% with 44 lines in your changes are missing coverage. Please review.

Project coverage is 80.76%. Comparing base (69d7709) to head (2dbf369).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4626      +/-   ##
==========================================
- Coverage   80.82%   80.76%   -0.07%     
==========================================
  Files         120      120              
  Lines       54600    54679      +79     
==========================================
+ Hits        44132    44161      +29     
- Misses      10468    10518      +50     

Devin-Crawford and others added 6 commits May 4, 2024 09:45
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
pyaedt/generic/plot.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@SMoraisAnsys SMoraisAnsys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
@dcrawforAtAnsys Thanks for this improvement!
@Samuelopez-ansys Thanks for helping with debugging. What was the issue ?

@Samuelopez-ansys
Copy link
Member

@SMoraisAnsys After debugging, I found that with the new decorator, the plot is opened in the unit test, but until the user do not close it, the script/test is alive forever. We need to have two options, check a matplotlib option to allow going ahead with the script when show=True, or like I did, do not test the show=True case. We can discuss it later.

@dcrawforAtAnsys

Add suggestions from @PipKat

Co-authored-by: Kathy Pippert <[email protected]>
Copy link
Contributor Author

@Devin-Crawford Devin-Crawford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions were added.

@Devin-Crawford Devin-Crawford marked this pull request as ready for review May 13, 2024 06:34
@Samuelopez-ansys
Copy link
Member

@dcrawforAtAnsys If @PipKat suggestions were added, please resolve the conversation.

Co-authored-by: Kathy Pippert <[email protected]>
@Samuelopez-ansys
Copy link
Member

@dcrawforAtAnsys Can we merge?

@Devin-Crawford Devin-Crawford merged commit 2e21c89 into main May 13, 2024
33 checks passed
@Devin-Crawford Devin-Crawford deleted the add/antenna-methods branch May 13, 2024 14:54
SMoraisAnsys added a commit that referenced this pull request May 24, 2024
Following #4626 and #4708, theses changes aim at making our
code base consistent. The changes consist in returning Matplotlib
figure objects on methods that were returning a list of value.
In the case of polar_plot_3d_pyvista, a Pyvista plotter object
is returned when, before, a boolean was returned if one wanted to
show the figure or save it in a file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Package and maintenance related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants