code: def calc_acceleration(xdata, dt):
      
      acceleration = _np.diff(_np.diff(xdata))/dt**2
      return acceleration
docs: Calculates the acceleration from the position
      
      Parameters
      ----------
      xdata : ndarray
          Position data
      dt : float
          time between measurements
  
      Returns
      -------
      acceleration : ndarray
          values of acceleration from position 
          2 to N.