From 0066bc63831e82d5ef6df061555e0cd1a7ca756d Mon Sep 17 00:00:00 2001 From: Christopher Mayes <31023527+ChristopherMayes@users.noreply.github.com> Date: Wed, 28 Jun 2023 13:30:39 -0700 Subject: [PATCH] Make sure i0 is increased --- pmd_beamphysics/interfaces/genesis.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pmd_beamphysics/interfaces/genesis.py b/pmd_beamphysics/interfaces/genesis.py index 99e00ad..d566fdf 100644 --- a/pmd_beamphysics/interfaces/genesis.py +++ b/pmd_beamphysics/interfaces/genesis.py @@ -520,6 +520,7 @@ def genesis4_par_to_data(h5, species='electron', smear=True): assert len(current) == 1 # Skip zero current slices. These usually have nans in the particle data. if current == 0: + i0 += sample continue x.append( g['x'][:])