예제 #1
0
    def test_n_dimensional_CCT_to_uv_Krystek1985(self):
        """
        Tests :func:`colour.temperature.cct.CCT_to_uv_Krystek1985` definition
        n-dimensional arrays support.
        """

        CCT = 7000
        xy = np.array([0.183513095046506, 0.305827773965731])
        np.testing.assert_almost_equal(
            CCT_to_uv_Krystek1985(CCT),
            xy,
            decimal=7)

        CCT = np.tile(CCT, 6)
        xy = np.tile(xy, (6, 1))
        np.testing.assert_almost_equal(
            CCT_to_uv_Krystek1985(CCT),
            xy,
            decimal=7)

        CCT = np.reshape(CCT, (2, 3))
        xy = np.reshape(xy, (2, 3, 2))
        np.testing.assert_almost_equal(
            CCT_to_uv_Krystek1985(CCT),
            xy,
            decimal=7)
예제 #2
0
    def test_n_dimensional_CCT_to_uv_Krystek1985(self):
        """
        Tests :func:`colour.temperature.krystek1985.CCT_to_uv_Krystek1985`
        definition n-dimensional arrays support.
        """

        CCT = 7000
        uv = CCT_to_uv_Krystek1985(CCT)

        CCT = np.tile(CCT, 6)
        uv = np.tile(uv, (6, 1))
        np.testing.assert_almost_equal(
            CCT_to_uv_Krystek1985(CCT), uv, decimal=7)

        CCT = np.reshape(CCT, (2, 3))
        uv = np.reshape(uv, (2, 3, 2))
        np.testing.assert_almost_equal(
            CCT_to_uv_Krystek1985(CCT), uv, decimal=7)
예제 #3
0
    def test_CCT_to_uv_Krystek1985(self):
        """
        Tests :func:`colour.temperature.cct.CCT_to_uv_Krystek1985` definition.
        """

        np.testing.assert_almost_equal(
            CCT_to_uv_Krystek1985(1000),
            np.array([0.223421163527869, 0.499258998136231]),
            decimal=7)

        np.testing.assert_almost_equal(
            CCT_to_uv_Krystek1985(7000),
            np.array([0.183513095046506, 0.305827773965731]),
            decimal=7)

        np.testing.assert_almost_equal(
            CCT_to_uv_Krystek1985(15000),
            np.array([0.182148234861937, 0.281354360914682]),
            decimal=7)
예제 #4
0
    def test_CCT_to_uv_Krystek1985(self):
        """
        Tests :func:`colour.temperature.krystek1985.CCT_to_uv_Krystek1985`
        definition.
        """

        np.testing.assert_almost_equal(
            CCT_to_uv_Krystek1985(1000),
            np.array([0.448087794140145, 0.354731965027727]),
            decimal=7)

        np.testing.assert_almost_equal(
            CCT_to_uv_Krystek1985(7000),
            np.array([0.198152565091092, 0.307023596915037]),
            decimal=7)

        np.testing.assert_almost_equal(
            CCT_to_uv_Krystek1985(15000),
            np.array([0.185675876767054, 0.282233658593898]),
            decimal=7)