def test_n_dimensional_ootf_reverse_BT2100_PQ(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ ootf_reverse_BT2100_PQ` definition n-dimensional arrays support. """ F_D = 779.98836083411584 E = 0.1 np.testing.assert_almost_equal(ootf_reverse_BT2100_PQ(F_D), E, decimal=7) F_D = np.tile(F_D, 6) E = np.tile(E, 6) np.testing.assert_almost_equal(ootf_reverse_BT2100_PQ(F_D), E, decimal=7) F_D = np.reshape(F_D, (2, 3)) E = np.reshape(E, (2, 3)) np.testing.assert_almost_equal(ootf_reverse_BT2100_PQ(F_D), E, decimal=7) F_D = np.reshape(F_D, (2, 3, 1)) E = np.reshape(E, (2, 3, 1)) np.testing.assert_almost_equal(ootf_reverse_BT2100_PQ(F_D), E, decimal=7)
def test_nan_ootf_reverse_BT2100_PQ(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ ootf_reverse_BT2100_PQ` definition nan support. """ ootf_reverse_BT2100_PQ( np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]))
def test_ootf_reverse_BT2100_PQ(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ ootf_reverse_BT2100_PQ` definition. """ self.assertAlmostEqual(ootf_reverse_BT2100_PQ(0.0), 0.0, places=7) self.assertAlmostEqual( ootf_reverse_BT2100_PQ(779.98836083411584), 0.1, places=7) self.assertAlmostEqual( ootf_reverse_BT2100_PQ(9999.993723673924300), 1.0, places=7)
def test_ootf_reverse_BT2100_PQ(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ ootf_reverse_BT2100_PQ` definition. """ self.assertAlmostEqual(ootf_reverse_BT2100_PQ(0.0), 0.0, places=7) self.assertAlmostEqual(ootf_reverse_BT2100_PQ(779.98836083411584), 0.1, places=7) self.assertAlmostEqual(ootf_reverse_BT2100_PQ(9999.993723673924300), 1.0, places=7)
def test_domain_range_scale_ootf_reverse_BT2100_PQ(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ ootf_reverse_BT2100_PQ` definition domain and range scale support. """ F_D = 779.98836083411584 E = ootf_reverse_BT2100_PQ(F_D) d_r = (('reference', 1), (1, 1), (100, 100)) for scale, factor in d_r: with domain_range_scale(scale): np.testing.assert_almost_equal(ootf_reverse_BT2100_PQ(F_D * factor), E * factor, decimal=7)
def test_domain_range_scale_ootf_reverse_BT2100_PQ(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ ootf_reverse_BT2100_PQ` definition domain and range scale support. """ F_D = 779.98836083411584 E = ootf_reverse_BT2100_PQ(F_D) d_r = (('reference', 1), (1, 1), (100, 100)) for scale, factor in d_r: with domain_range_scale(scale): np.testing.assert_almost_equal( ootf_reverse_BT2100_PQ(F_D * factor), E * factor, decimal=7)
def test_n_dimensional_ootf_reverse_BT2100_PQ(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ ootf_reverse_BT2100_PQ` definition n-dimensional arrays support. """ F_D = 779.98836083411584 E = ootf_reverse_BT2100_PQ(F_D) F_D = np.tile(F_D, 6) E = np.tile(E, 6) np.testing.assert_almost_equal( ootf_reverse_BT2100_PQ(F_D), E, decimal=7) F_D = np.reshape(F_D, (2, 3)) E = np.reshape(E, (2, 3)) np.testing.assert_almost_equal( ootf_reverse_BT2100_PQ(F_D), E, decimal=7) F_D = np.reshape(F_D, (2, 3, 1)) E = np.reshape(E, (2, 3, 1)) np.testing.assert_almost_equal( ootf_reverse_BT2100_PQ(F_D), E, decimal=7)