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

Option units for geometry plot #2575

Merged

Conversation

shimwell
Copy link
Member

@shimwell shimwell commented Jun 22, 2023

Description

It would be handy for people with large models to be able to plot geometry with different units. The default is still cm so this won't break anything for existing scripts. I have a few models where meters would be ideal so I would just add axis_units='m' to the arguments. Is there any chance we can allow axis units on the universe.plot?

Fixes # (issue)
No issue sorry

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@makeclean
Copy link
Contributor

makeclean commented Jun 22, 2023 via email

@shimwell
Copy link
Member Author

shimwell commented Jun 22, 2023

I had not really thought about mesh plots.

This proposed change is to the geometry plotting which is currently disconnected to mesh plotting.

@shimwell
Copy link
Member Author

tests appear to be failing on np.product which has changed to np.prod. There is a PR in for fixing that already so I think that is unrelated to this PR

Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

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

Thanks for this improvement @shimwell! Pushing another commit here should resolve the test failures

openmc/universe.py Outdated Show resolved Hide resolved
@shimwell
Copy link
Member Author

Thanks Paul, tests are passing again now.

@paulromano paulromano merged commit b489023 into openmc-dev:develop Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants