Skip to content

Commit

Permalink
but fix in tracking when no particles are in a certain frame
Browse files Browse the repository at this point in the history
  • Loading branch information
ronshnapp committed May 2, 2024
1 parent 74d2eba commit ccd7cce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions myptv/tracking_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ def track_single_frame(self, frame_num):
will use the 4 frame tracking. If a particle has no previous links,
it will attempt a nearest neighbour tracking.
'''
p1_lst = self.particles[frame_num]
p2_lst = self.particles[frame_num+1]
try:
p1_lst = self.particles[frame_num]
p2_lst = self.particles[frame_num+1]
except:
return None


# try 4 frame tracking for particles that are connected at least once
Expand Down

0 comments on commit ccd7cce

Please sign in to comment.