Source code for ewoksid16b.tests.test_calibration

import numpy as np
import pytest

from ..tasks.utils import calibration


[docs] @pytest.mark.parametrize( "coefficients, expected", [ (np.array([0, 1]), np.array([0, 1, 2, 3])), (np.array([1, 2]), np.array([1, 3, 5, 7])), ], ) def test_apply_calibration(coefficients, expected): xy_ch = np.array([0, 1, 2, 3]) result = calibration.apply_calibration(xy_ch, coefficients) assert np.array_equal(result, expected)