The time step argument for the np.gradient call is self.physics_fs instead of physics_dt.
np.gradient
self.physics_fs
physics_dt