Paul Romano
85c963e223
Move 'import lxml' to third-party block of imports ( #2803 )
2023-12-13 14:11:32 +00:00
Paul Romano
94f02ae10b
Bump version to 0.14.0-dev ( #2740 )
2023-10-31 16:55:19 -05:00
Patrick Shriwise
bd1c2286f8
Make BoundingBox a mutable type and add convenience methods. ( #2717 )
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-10-17 17:51:05 +00:00
Jonathan Shimwell
eb3eec8e71
added padding arg to bounding_region ( #2701 )
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-09-29 15:30:46 +00:00
Paul Romano
7b0eb9d402
Avoid warning due to bounding box calculation in Universe.plot ( #2681 )
2023-09-14 05:04:25 +00:00
Jonathan Shimwell
457bea6f0b
replaced ordereddict with {} ( #2641 )
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-08-19 12:15:11 +00:00
Patrick Shriwise
fa245b0087
Fixing Universe.plot seed. ( #2647 )
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-08-19 05:51:08 +00:00
Jonathan Shimwell
0964024442
added universe plot tests to catch color=None and axis values ( #2637 )
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-08-19 05:20:43 +00:00
Christopher Billingham
21d88473c8
Simplify infinity check ( #2587 )
2023-07-05 08:21:36 -05:00
Jonathan Shimwell
b489023340
Option units for geometry plot ( #2575 )
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-06-24 18:03:56 -05:00
Jonathan Shimwell
ee7b95245a
Static errors continuation ( #2557 )
...
Co-authored-by: Christina Cai <chrsitinacai48933@gmail.com>
Co-authored-by: christinacai123 <63215816+christinacai123@users.noreply.github.com>
2023-06-16 22:34:02 -05:00
Jonathan Shimwell
a288e42a06
corrected pixel index for axis height ( #2553 )
2023-06-08 17:29:55 +00:00
Jonathan Shimwell
6c7f857e1e
Auto pixel calc for universe plot ( #2513 )
2023-05-23 06:28:16 -05:00
Jonathan Shimwell
d8dbd9bfca
auto width and origin for edge cases ( #2512 )
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-05-15 22:48:45 +00:00
Patrick Myers
1cb22075ef
Changed xml to lxml ( #2489 )
2023-05-09 10:41:04 -05:00
Jonathan Shimwell
4248beff1b
Auto origin and width for plots ( #2492 )
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-05-02 16:41:25 +00:00
Jonathan Shimwell
01a4acdc65
Merge pull request #2487 from gridley/legend_color_fix
...
pass 0-1 RGB value to matplotlib in universe plot legend
2023-04-27 09:35:46 +01:00
Gavin Ridley
6440153c74
pass 0-1 RGB value to matplotlib in universe plot legend
2023-04-21 16:41:49 -04:00
Jonathan Shimwell
3ad8781444
Merge branch 'develop' into adding_bounding_box_class
2023-04-21 14:46:52 +01:00
Jonathan Shimwell
cb7a443776
Merge branch 'develop' into adding_outlines_to_plot
2023-04-20 08:07:43 +01:00
Paul Romano
c808067764
Merge pull request #2472 from gridley/plot_auto_legend
...
add auto legend to universe.plot
2023-04-19 20:52:00 -05:00
Gavin Ridley
22f4fc0902
Update openmc/universe.py
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-04-19 12:22:39 -04:00
Gavin Ridley
2f87ce7f27
Update openmc/universe.py
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-04-19 12:22:29 -04:00
Jonathan Shimwell
a8e7d38555
moved plot outline test, added levels
2023-04-19 16:02:07 +01:00
Jonathan Shimwell
887cfd2e78
[skip ci] review improvment from Paul
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-04-19 15:59:55 +01:00
Jonathan Shimwell
2487c52d6e
working for libpng and no libpng users
2023-04-19 12:00:31 +01:00
Jonathan Shimwell
37f9bdfaca
[skip ci] improve doc string from review
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-04-19 08:07:41 +01:00
Paul Romano
b5d30ff553
Refactor BoundingBox implementation
2023-04-18 22:26:37 -05:00
Gavin Ridley
a02d583ac1
review comments addressed
2023-04-18 11:24:20 -04:00
Jonathan Shimwell
8606e07a67
added plot axis labels
2023-04-18 16:18:03 +01:00
Jonathan Shimwell
f1ce0913b3
remove comment
2023-04-18 15:37:07 +01:00
Jonathan Shimwell
ffaea61874
converting rgb to int
2023-04-18 15:10:49 +01:00
Gavin Ridley
ad33834e0f
default to legend label using ID if no name given
...
Co-authored-by: Jonathan Shimwell <drshimwell@gmail.com>
2023-04-17 12:18:03 -04:00
Gavin Ridley
f65de85f9f
add versionadded for legend kwarg
...
Co-authored-by: Jonathan Shimwell <drshimwell@gmail.com>
2023-04-17 12:17:09 -04:00
Gavin Ridley
e4c3323601
remove unnecessary error checking
...
Co-authored-by: Jonathan Shimwell <drshimwell@gmail.com>
2023-04-17 12:15:29 -04:00
Gavin Ridley
3880d1cec8
line length suggestion
...
Co-authored-by: Jonathan Shimwell <drshimwell@gmail.com>
2023-04-17 12:14:52 -04:00
Jonathan Shimwell
95a07b8085
adding optional outline to plots
2023-04-17 15:13:56 +01:00
Gavin Ridley
8bc434a67d
move legend outside image
...
Co-authored-by: Jonathan Shimwell <drshimwell@gmail.com>
2023-04-14 12:36:24 -04:00
Gavin Ridley
6b03287d52
add auto legend to universe.plot
2023-04-13 16:09:07 -04:00
Jonathan Shimwell
04d9e27866
moving get_all_universes method
2023-02-16 16:24:24 +00:00
Josh May
b41c8330f1
Update openmc/universe.py
...
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
2023-02-09 09:41:23 -08:00
josh
6d69c782ae
abstract _partial_deepcopy and reformat docstrings
2023-02-06 17:45:18 +00:00
josh
3d6179fa32
remove try/except for class-specific 'deepcopy'
2023-01-17 02:43:02 +00:00
josh
e799346502
switch universe deepcopying for a fresh instance on clones
2023-01-12 21:58:22 +00:00
valeriogiusti
43c0dcb1b8
Update universe.py
...
Running a Jupyter notebook prepared some time ago, I got the following error when trying to plot a universe.
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-6-6d5315041afe> in <module>
1 universe = openmc.Universe(cells=(fuel, moderator))
----> 2 universe.plot(origin=[0.,0.,0.],width=[2.4,2.4],basis='xy')
~/.local/lib/python3.8/site-packages/openmc/universe.py in plot(self, origin, width, pixels, basis, color_by, colors, seed, openmc_exec, axes, **kwargs)
362 if not img_path.is_file():
363 img_path = img_path.with_suffix('.ppm')
--> 364 img = mpimg.imread(img_path)
365
366 # Create a figure sized such that the size of the axes within
/usr/lib/python3/dist-packages/matplotlib/image.py in imread(fname, format)
1434 return handler(fd)
1435 else:
-> 1436 return handler(fname)
1437
1438
/usr/lib/python3/dist-packages/matplotlib/image.py in read_png(*args, **kwargs)
1388 def read_png(*args, **kwargs):
1389 from matplotlib import _png
-> 1390 return _png.read_png(*args, **kwargs)
1391
1392 handlers = {'png': read_png, }
TypeError: Object does not appear to be a 8-bit string path or a Python file-like object
```
The error disappears and the plot is correctly shown if line 364 is changed as follows:
`img = mpimg.imread(str(img_path))`
Does this change sound reasonable? I'm running Python 3.8.10.
2022-12-01 11:49:52 +01:00
josh
3f83699c22
update styling
2022-11-30 00:59:26 +00:00
josh
71631ada04
fix universe's get_nuclide_density without volumes present
2022-11-29 03:39:39 +00:00
Paul Romano
53b6d8ab11
Change 0.14.0 --> 0.13.2
2022-10-21 07:08:52 -05:00
Paul Romano
a0e5ba4418
Add 0.13.2 release notes
2022-10-21 07:08:49 -05:00
Paul Romano
004199c49d
Handle possibility of .ppm file in Universe.plot
2022-10-05 09:08:02 -05:00