Skip to content

Commit

Permalink
Merge pull request #41 from ChristopherMayes/fix_genesis_skip
Browse files Browse the repository at this point in the history
Fix importing Genesis4 with zero current slices
  • Loading branch information
ChristopherMayes authored Jun 28, 2023
2 parents 7d3a7a6 + 0066bc6 commit 3607576
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pmd_beamphysics/interfaces/genesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'][:])
Expand Down

0 comments on commit 3607576

Please sign in to comment.