Esempio n. 1
0
    def test_IPT_hue_angle(self):
        """
        Tests :func:`colour.models.ipt.IPT_hue_angle` definition.
        """

        np.testing.assert_almost_equal(IPT_hue_angle(
            np.array([0.07049534, 0.10080000, 0.09558313])),
                                       43.478309455309819,
                                       decimal=7)

        np.testing.assert_almost_equal(IPT_hue_angle(
            np.array([0.47097710, 0.34950000, 0.11301649])),
                                       17.919454543301892,
                                       decimal=7)

        np.testing.assert_almost_equal(IPT_hue_angle(
            np.array([0.25506814, 0.19150000, 0.08849752])),
                                       24.802982601941753,
                                       decimal=7)
Esempio n. 2
0
    def test_IPT_hue_angle(self):
        """
        Tests :func:`colour.models.ipt.IPT_hue_angle` definition.
        """

        np.testing.assert_almost_equal(
            IPT_hue_angle(np.array([0.20654008, 0.12197225, 0.05136952])),
            22.838754548625527,
            decimal=7)

        np.testing.assert_almost_equal(
            IPT_hue_angle(np.array([0.14222010, 0.23042768, 0.10495772])),
            24.488834912466245,
            decimal=7)

        np.testing.assert_almost_equal(
            IPT_hue_angle(np.array([0.07818780, 0.06157201, 0.28099326])),
            77.640533743711813,
            decimal=7)
Esempio n. 3
0
    def test_nan_IPT_hue_angle(self):
        """
        Tests :func:`colour.models.ipt.IPT_hue_angle` definition nan support.
        """

        cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
        cases = set(permutations(cases * 3, r=3))
        for case in cases:
            IPT = np.array(case)
            IPT_hue_angle(IPT)
Esempio n. 4
0
    def test_IPT_hue_angle(self):
        """
        Tests :func:`colour.models.ipt.IPT_hue_angle` definition.
        """

        np.testing.assert_almost_equal(IPT_hue_angle(
            np.array([0.07049534, 0.10080000, 0.09558313])),
                                       0.758839653196139,
                                       decimal=7)

        np.testing.assert_almost_equal(IPT_hue_angle(
            np.array([0.47097710, 0.34950000, 0.11301649])),
                                       0.312753481942075,
                                       decimal=7)

        np.testing.assert_almost_equal(IPT_hue_angle(
            np.array([0.25506814, 0.19150000, 0.08849752])),
                                       0.432893710718754,
                                       decimal=7)