Skip to content

Commit

Permalink
updated to work with openmc_tally_unit_converter 0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell committed Nov 17, 2021
1 parent b49d6db commit 71c4688
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ and other mesh tally results.

Example 1 shows a Numpy array plotted
```python
from regular_mesh_plotter import plot_regular_mesh_values
plot_regular_mesh_values(
values: np.ndarray,
filename: Optional[str] = None,
Expand Down Expand Up @@ -153,7 +154,7 @@ plot_regular_mesh_dose_tally_with_geometry(
plane_normal: List[float] = [0, 0, 1],
rotate_mesh: float = 0,
rotate_geometry: float = 0,
required_units="picosievert cm **2 / simulated_particle",
required_units="picosievert / source_particle",
source_strength: float = None,
std_dev_or_tally_value: str = "tally_value",
):
Expand Down
4 changes: 2 additions & 2 deletions examples/plot_regular_mesh_dose_tally.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
x_label="X [cm]",
y_label="Y [cm]",
rotate_plot=0,
required_units="picosievert / simulated_particle",
required_units="picosievert / source_particle",
source_strength=None,
label="Effective dose [picosievert / simulated_particle]",
label="Effective dose [picosievert / source_particle]",
)

# displays the plot
Expand Down
33 changes: 33 additions & 0 deletions examples_from_readme.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "0555ced4-6613-455d-8854-580533dfe09b",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.11"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
4 changes: 2 additions & 2 deletions regular_mesh_plotter/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def plot_regular_mesh_dose_tally(
x_label="X [cm]",
y_label="Y [cm]",
rotate_plot: float = 0,
required_units="picosievert cm **2 / simulated_particle",
required_units="picosievert / source_particle",
source_strength: float = None,
std_dev_or_tally_value: str = "tally_value",
):
Expand Down Expand Up @@ -260,7 +260,7 @@ def plot_regular_mesh_dose_tally_with_geometry(
plane_normal: List[float] = [0, 0, 1],
rotate_mesh: float = 0,
rotate_geometry: float = 0,
required_units="picosievert cm **2 / simulated_particle",
required_units="picosievert / source_particle",
source_strength: float = None,
std_dev_or_tally_value: str = "tally_value",
):
Expand Down

0 comments on commit 71c4688

Please sign in to comment.