Skip to content

Commit 2682ae5

Browse files
committed
examples: boris: analysis: a little more intuitive
1 parent c0e9a68 commit 2682ae5

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

examples/boris/Boris_SDC_Plots.ipynb

Lines changed: 30 additions & 30 deletions
Large diffs are not rendered by default.

examples/boris/boris_analyse.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ def _read_data(self):
175175
self._dist_mean = self._distances.mean(axis=0)
176176

177177

178-
def get_meetup_after(data, first=0):
178+
def get_meetup_after(data, after=0):
179179
_dist = data.dist_max - data.dist_min
180-
return np.where(_dist[first:] == _dist[first:].min())[0][0] + first
180+
return np.where(_dist[after:] == _dist[after:].min())[0][0] + after
181181

182182

183183
def plot_trajectories(data, until=None):
@@ -263,7 +263,7 @@ def plot_particle_meetup(data, step, width=10):
263263

264264
plt.figure(figsize=(15, 15), dpi=1200)
265265
ax = plt.axes(projection='3d')
266-
plt.title("Particle Meetup\ndot: start; square: end")
266+
plt.title("Particle Meetup at step %d\ndot: start; square: end" % step)
267267
if data.nparticles <= 5:
268268
for p in range(data.nparticles):
269269
ax.plot(data.x[p][start:stop], data.y[p][start:stop], data.z[p][start:stop], '--%s' % colors[p])

0 commit comments

Comments
 (0)