Skip to content

Commit

Permalink
Check if particle tracks is set
Browse files Browse the repository at this point in the history
  • Loading branch information
James Parkhurst committed Oct 21, 2024
1 parent bbc2ee9 commit 2722864
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/parakeet/simulate/_exit_wave.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ def get_particle_positions(particle_tracks, sample, scan):
# Save the first position
position0 = position.copy()

# If no tracks just return original positions
if particle_tracks is None:
return position0

# For each image number and fraction update the particle position and
# save the difference in position w.r.t the original particle position
particle_positions = []
Expand Down

0 comments on commit 2722864

Please sign in to comment.