small bug fix in plot electron density energy dep.

This commit is contained in:
Jonas Kellerer
2021-05-11 12:11:11 +02:00
parent 15ed6d9b4f
commit 3223da11ba
@@ -39,11 +39,11 @@ def plotElectronDensityVsZ(filename, E_th_max, E_beta_min, filename_output):
print("beta density: ")
beta_energy = E_beta_min
beta_energy_index = np.where(Emins >= beta_energy)[-1][-1]
beta_energy_index = np.where(Emins <= beta_energy)[-1][-1]
beta_particles = particles[:,:,:,beta_energy_index:]
beta_particles_longitudinal = np.sum(beta_particles, axis=(1,2,3))
n_beta = beta_particles_longitudinal / volumes_longitudinal
secondary_particles = particles[:,:,:,thermal_energy_index+1:beta_energy_index-1]
secondary_particles_longitudinal = np.sum(secondary_particles, axis=(1,2,3))