def test_intensity_scale_methods(R1, R2, name, thrs, scales, wavelet):
    """
    Test the intensity_scale merge."""
    if name == "BMSE":
        pytest.importorskip("pywt")

    # expected reult
    int = spatialscores.intensity_scale_init(name, thrs, scales, wavelet)
    spatialscores.intensity_scale_accum(int, R1[0], R1[1])
    spatialscores.intensity_scale_accum(int, R2[0], R2[1])
    expected = spatialscores.intensity_scale_compute(int)[0][0]

    # init
    int_1 = spatialscores.intensity_scale_init(name, thrs, scales, wavelet)
    int_2 = spatialscores.intensity_scale_init(name, thrs, scales, wavelet)

    # accum
    spatialscores.intensity_scale_accum(int_1, R1[0], R1[1])
    spatialscores.intensity_scale_accum(int_2, R2[0], R2[1])

    # merge
    int = spatialscores.intensity_scale_merge(int_1, int_2)

    # compute
    score = spatialscores.intensity_scale_compute(int)[0][0]

    assert_array_almost_equal(score, expected)
Test the intensity_scale merge.
pysteps/tests/test_verification_spatialscores.py