Update python scripts.
This commit is contained in:
parent
7dcaaffc16
commit
e82d4378c6
2 changed files with 20 additions and 17 deletions
|
|
@ -9,22 +9,23 @@ from scipy.constants import e, k
|
|||
m_i = 1.9712e-25
|
||||
|
||||
# paths = ['../quasiNeutral_fullAblation/','../Poisson_fullAblation/']
|
||||
# paths = ['../quasiNeutral_partialAblation/','../Poisson_partialAblation/']
|
||||
paths = ['../2024-09-27_17.41.21/']
|
||||
for path in paths:
|
||||
# paths = ['../quasiNeutral_partialAblation/','../quasiNeutral_partialAblation_cs/','../Poisson_partialAblation/']
|
||||
paths = ['../2024-10-04_12.10.38/']
|
||||
labels = [path[3:-1] for path in paths]
|
||||
|
||||
for path, label in zip(paths, labels):
|
||||
filesCum_i = sorted(glob.glob(path+'time_*_fCum_i.csv'))
|
||||
start = 0
|
||||
end = len(filesCum_i)
|
||||
every = 100
|
||||
|
||||
for fileCum_i in filesCum_i[start:end:every]:
|
||||
for fileCum_i in filesCum_i[start:end+1:every]:
|
||||
time, x, v, f_i = readF.read(fileCum_i)
|
||||
|
||||
plt.plot(v**2*m_i*0.5/e, f_i[0]*e/m_i/v, label='{:.3f} ns'.format(time*1e9))
|
||||
|
||||
time, x, v, f_i = readF.read(filesCum_i[-1])
|
||||
|
||||
plt.plot(v**2*m_i*0.5/e, f_i[0]*e/m_i/v, label='{:.3f} ns'.format(time*1e9), color='k')
|
||||
plt.plot(v**2*m_i*0.5/e, f_i[0]*e/m_i/v, label='time_max', color='k')
|
||||
|
||||
plt.yscale('log')
|
||||
plt.ylim([1e18,1e24])
|
||||
|
|
@ -35,7 +36,7 @@ for path in paths:
|
|||
|
||||
plt.legend()
|
||||
|
||||
plt.title('r = {:.1f} mm, time_max={:.1f} ns '.format(x[0]*1e3, time*1e9) + path)
|
||||
plt.title('r = {:.1f} mm, time_max={:.1f} ns, '.format(x[0]*1e3, time*1e9) + label)
|
||||
|
||||
plt.show()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue