Commit c0ad5e53 authored by frey_m's avatar frey_m
Browse files

AMR test case: Print some info when plotting.

modified:   ippl/test/AMR/amr_plot_tools/field.py
parent adffd9d7
......@@ -46,11 +46,18 @@ try:
plt = doGridPlot(i, j, val, "horizontal grid", "vertical grid", r'$E_x$ [V/m]')
plt.savefig(f + '_slice_z_Ex.png')#, bbox_inches='tight')
print ("max. Ex: ", max(val))
print ("min. Ex: ", min(val))
# electric field in vertical direction
val = np.extract(data[:, 2] == mid, data[:, 4])
plt = doGridPlot(i, j, val, "horizontal grid", "vertical grid", r'$E_y$ [V/m]')
plt.savefig(f + '_slice_z_Ey.png')#bbox_inches='tight')
print ("max. Ey: ", max(val))
print ("min. Ey: ", min(val))
# center in z
mid = int(0.5 * max(data[:, 0]))
i = np.extract(data[:, 0] == mid, data[:, 1])
......@@ -59,6 +66,9 @@ try:
plt = doGridPlot(i, j, val, "vertical grid", "longitudinal grid", r'$E_z$ [V/m]')
plt.savefig(f + '_slice_x_Ez.png')# bbox_inches='tight')
print ("max. Ez: ", max(val))
print ("min. Ez: ", min(val))
elif 'scalar' in f:
data = match(f, scalar_field_pattern)
......@@ -92,6 +102,9 @@ try:
plt = doGridPlot(i, j, val, "horizontal grid", "vertical grid", clab)
plt.savefig(f + '_slice_z.png')# bbox_inches='tight')
print ("max. value (slice z): ", max(val))
print ("min. value (slice z): ", min(val))
else:
raise RuntimeError('This type of file is not supported.')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment