Skip to content

Option units for geometry plot - #2575

Merged
paulromano merged 3 commits into
openmc-dev:developfrom
shimwell:option_units_for_geometry_plot
Jun 24, 2023
Merged

paulromano merged 3 commits into
openmc-dev:developfrom
shimwell:option_units_for_geometry_plot

Conversation

@shimwell

@shimwell shimwell commented Jun 22, 2023 •

Copy link
Copy Markdown
Member

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

makeclean commented Jun 22, 2023 via email

Copy link
Copy Markdown
Contributor

@shimwell

shimwell commented Jun 22, 2023 •

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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

@paulromano paulromano left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread openmc/universe.py Outdated
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
@shimwell

Copy link
Copy Markdown
Member Author

Thanks Paul, tests are passing again now.

@paulromano
paulromano merged commit b489023 into openmc-dev:develop Jun 24, 2023
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
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