Add plotting geometry lines to plot if file exists
This commit is contained in:
@@ -46,6 +46,12 @@ XZ_PLANES=[0.]
|
||||
YZ_PLANES=[1010, 1100, 1300, 1550,
|
||||
2050, 2300, 2900, 3500]
|
||||
|
||||
try:
|
||||
# image data generated from MCNP plot output for geometry lines
|
||||
geometry=load('/home/glavic_a/estia/media/data and simulation/shielding/e2-estia_baseline_v07-0-gb8bc945_lines.npz')
|
||||
except:
|
||||
geometry=None
|
||||
|
||||
def read_tally(fname, use_tally=None):
|
||||
if fname.endswith('.gz'):
|
||||
txt=gzip.open(fname, 'r').read()
|
||||
@@ -99,6 +105,11 @@ def plot_xy(outfile, res, zidx=5):
|
||||
xlabel('x [m]')
|
||||
ylabel('y [m]')
|
||||
title('XY plane at z=%.1fm'%((z[zidx]+z[zidx+1])/200.))
|
||||
if geometry is not None:
|
||||
ax.pcolormesh(geometry['x'], geometry['y'],
|
||||
log10(geometry['lines']*0+2e-3),
|
||||
norm=Rnorm, cmap=Rcmap
|
||||
)
|
||||
|
||||
divider = make_axes_locatable(ax)
|
||||
cax = divider.append_axes("bottom", size="5%", pad=0.6)
|
||||
|
||||
Reference in New Issue
Block a user