def max_standard_deviation(window):
    """Return the maximal spatial velocity standard deviation in a window over all the times."""
    max_std = 0
    for i in range(window.shape[1]):
        current_std = window[:, i].std()
        max_std = max(max_std, current_std)
    return max_std