Skip to content
Snippets Groups Projects
Commit 92ea88d1 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Updated the plotting script that analyses the 26 neighbouring cells.

parent c40c0b5a
No related branches found
No related tags found
No related merge requests found
......@@ -34,9 +34,7 @@ rc('font', family='serif')
import sys
import os
print "Plotting..."
plot_limit = 0.02
# Read Quickshed accelerations
data=loadtxt( "interaction_dump_all.dat" )
......@@ -93,31 +91,22 @@ stdz_s = std(errz_s[abs(errz_s) < 0.1])
figure(frameon=True)
subplot(311, title="Acceleration along X")
#plot(id[abs(errx_s) > 0.001], e_errx_s , 'ro')
plot(pos_x, e_errx_bh , 'bx', label='B-H')
plot(pos_x, e_errx_s , 'ro')
#text( 0., 0.1, "axis=( %d %d %d )"%(axis[orientation*3 + 0], axis[orientation*3 + 1], axis[orientation*3 + 2]) , ha='center', backgroundcolor='w', fontsize=14)
ylim(-0.1, 0.1)
ylim(-plot_limit, plot_limit)
grid()
subplot(312, title="Acceleration along Y")
#plot(id[abs(erry_s) > 0.001], e_erry_s , 'ro')
plot(pos_x, e_erry_bh , 'bx', label='B-H')
plot(pos_y, e_erry_bh , 'bx', label='B-H')
plot(pos_y, e_erry_s , 'ro')
#text( 0., 0.1, "axis=( %d %d %d )"%(axis[orientation*3 + 0], axis[orientation*3 + 1], axis[orientation*3 + 2]) , ha='center', backgroundcolor='w', fontsize=14)
ylim(-0.1, 0.1)
ylim(-plot_limit, plot_limit)
grid()
subplot(313, title="Acceleration along Z")
#plot(id[abs(errz_s) > 0.001], e_errz_s , 'ro', label="Sorted")
plot(pos_x, e_errz_bh , 'bx', label='B-H')
plot(pos_z, e_errz_bh , 'bx', label='B-H')
plot(pos_z, e_errz_s , 'ro', label="Sorted")
#text( 0., 0.1, "axis=( %d %d %d )"%(axis[orientation*3 + 0], axis[orientation*3 + 1], axis[orientation*3 + 2]) , ha='center', backgroundcolor='w', fontsize=14)
legend(loc="upper right")
ylim(-0.1, 0.1)
#xlim(0, size(id)-1)
ylim(-plot_limit, plot_limit)
grid()
savefig("accelerations_relative_all.png")
......@@ -128,34 +117,21 @@ close()
figure(frameon=True)
subplot(311, title="Acceleration along X")
#plot(id[abs(errx_s) > 0.001], e_errx_s , 'ro')
plot(pos_x, accx_bh, 'bx')
plot(pos_x, accx_s , 'ro')
#text( 0., 0.1, "axis=( %d %d %d )"%(axis[orientation*3 + 0], axis[orientation*3 + 1], axis[orientation*3 + 2]) , ha='center', backgroundcolor='w', fontsize=14)
ylim(-250, 250)
grid()
subplot(312, title="Acceleration along Y")
#plot(id[abs(erry_s) > 0.001], e_erry_s , 'ro')
#plot(pos_y, accy_u , 'gs')
plot(pos_y, accy_s , 'ro')
plot(pos_y, accz_bh , 'bx', label="B-H")
#text( 0., 0.1, "axis=( %d %d %d )"%(axis[orientation*3 + 0], axis[orientation*3 + 1], axis[orientation*3 + 2]) , ha='center', backgroundcolor='w', fontsize=14)
#ylim(-70, 70)
plot(pos_y, accy_bh , 'bx', label="B-H")
ylim(-250, 250)
grid()
subplot(313, title="Acceleration along Z")
#plot(id[abs(errz_s) > 0.001], e_errz_s , 'ro', label="Sorted")
plot(pos_z, accz_bh , 'bx', label="B-H")
plot(pos_z, accz_s , 'ro', label="Sorted")
#plot(pos_z, accz_u , 'gs', label="Unsorted")
#text( 0., 0.1, "axis=( %d %d %d )"%(axis[orientation*3 + 0], axis[orientation*3 + 1], axis[orientation*3 + 2]) , ha='center', backgroundcolor='w', fontsize=14)
legend(loc="upper right")
#ylim(-70, 70)
ylim(-250, 250)
grid()
......@@ -215,12 +191,8 @@ close()
print "E_error for sorted: ( x= %4.3e"%std(e_errx_s), "y= %4.3e"%std(e_erry_s), "z= %4.3e"%std(e_errz_s), ") Combined YZ = %4.3e"%(( std(e_erry_s) + std(e_errz_s) )/2.)
print "E_error for BH : ( x= %4.3e"%std(e_errx_bh), "y= %4.3e"%std(e_erry_bh), "z= %4.3e"%std(e_errz_bh), ") Combined YZ = %4.3e"%(( std(e_erry_bh) + std(e_errz_bh) )/2.)
#print std(e_errx_s), std(e_erry_s), std(e_errz_s)
#print "Min for sorted: ( x= %4.3e"%min(errx_s), "y= %4.3e"%min(erry_s), "z= %4.3e"%min(errz_s), ") Combined YZ = %4.3e"%(min( min(erry_s), min(errz_s) ))
#print "Max for sorted: ( x= %4.3e"%max(errx_s), "y= %4.3e"%max(erry_s), "z= %4.3e"%max(errz_s), ") Combined YZ = %4.3e"%(max( max(erry_s), max(errz_s) ))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment