Skip to content

Commit b9a3726

Browse files
committed
Remove unecessary extraneous point in dvphi
This extra point is unecessary as vphi is on phi-walls and has nphi+1 points.
1 parent ca30d88 commit b9a3726

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

stagpy/plates.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ def detect_plates_vzcheck(step, vz_thres_ratio=0):
3434

3535
# verifying horizontal plate speed and closeness of plates
3636
vphi_surf = v_x[:, -1]
37-
dvphi = np.diff(vphi_surf)
38-
dvphi = np.append(dvphi, vphi_surf[0] - vphi_surf[-1])
39-
dvphi /= (r_c[-1] * dphi)
37+
dvphi = np.diff(vphi_surf) / (r_c[-1] * dphi)
4038
dvx_thres = 16 * step.timeinfo.loc['vrms']
4139

4240
limits = []
@@ -781,7 +779,7 @@ def cmd():
781779
fig, axes = plt.subplots(nrows=3, sharex=True, figsize=(6.4, 9.6))
782780
axes[0].plot(step.geom.p_walls, vphi_surf)
783781
axes[0].set_ylabel(r"Horizontal velocity $v_\phi$")
784-
axes[1].plot(step.geom.p_walls, dvphi)
782+
axes[1].plot(phi, dvphi)
785783
axes[1].set_ylabel(r"$dv_\phi/d\phi$")
786784
axes[1].scatter(phi_lim, dvp_lim, color='red')
787785
axes[2].hist(sizeplates, 10, (0, np.pi))

0 commit comments

Comments
 (0)