diff --git a/examples/plot_rz_slices_ring_source.py b/examples/plot_rz_slices_ring_source.py index 34c1391..e51daf7 100644 --- a/examples/plot_rz_slices_ring_source.py +++ b/examples/plot_rz_slices_ring_source.py @@ -75,7 +75,7 @@ outline=True, norm=LogNorm(), slice_index=slice_index, - mirror=True + mirror=True, ) plot.figure.savefig(f"rz_ring_source_reflected_{slice_index}.png") @@ -87,4 +87,3 @@ slice_index=slice_index, ) plot.figure.savefig(f"rz_ring_source_{slice_index}.png") - diff --git a/src/openmc_cylindrical_mesh_plotter/core.py b/src/openmc_cylindrical_mesh_plotter/core.py index 6e53ec8..1b04d09 100644 --- a/src/openmc_cylindrical_mesh_plotter/core.py +++ b/src/openmc_cylindrical_mesh_plotter/core.py @@ -254,7 +254,7 @@ def plot_mesh_tally_rz_slice( score, slice_index, ) - + if mirror: data_reflected = np.fliplr(data) data = np.concatenate((data_reflected, data), axis=1) @@ -309,7 +309,7 @@ def plot_mesh_tally_rz_slice( # Combine R, G, B values into a single int rgb = (img * 256).astype(int) image_value = (rgb[..., 0] << 16) + (rgb[..., 1] << 8) + (rgb[..., 2]) - + if mirror: image_value_reflected = np.fliplr(image_value) image_value = np.concatenate((image_value_reflected, image_value), axis=1)