def test_initialize_bps(variable, expected):
    """Tests initialation BPS velocity perturbation method."""
    seed = 42
    timestep = 1
    pixelsperkm = 1
    v = np.ones((8, 8))
    velocity = np.stack([v, v])
    perturbator = initialize_bps(velocity, pixelsperkm, timestep, seed=seed)
    assert_array_almost_equal(perturbator[variable], expected)
Tests initialation BPS velocity perturbation method.
pysteps/tests/test_noise_motion.py