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.

def calc_acceleration(xdata, dt):
    """
    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.

    """
    acceleration = _np.diff(_np.diff(xdata))/dt**2
    return acceleration