def test_nan_oetf_BT1886(self): """ Tests :func:`colour.models.rgb.transfer_functions.bt_1886.\ oetf_BT1886` definition nan support. """ oetf_BT1886(np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]))
def test_n_dimensional_oetf_BT1886(self): """ Tests :func:`colour.models.rgb.transfer_functions.bt_1886.\ oetf_BT1886` definition n-dimensional arrays support. """ L = 184.32 V = 0.268401363726554 np.testing.assert_almost_equal( oetf_BT1886(L), V, decimal=7) L = np.tile(L, 6) V = np.tile(V, 6) np.testing.assert_almost_equal( oetf_BT1886(L), V, decimal=7) L = np.reshape(L, (2, 3)) V = np.reshape(V, (2, 3)) np.testing.assert_almost_equal( oetf_BT1886(L), V, decimal=7) L = np.reshape(L, (2, 3, 1)) V = np.reshape(V, (2, 3, 1)) np.testing.assert_almost_equal( oetf_BT1886(L), V, decimal=7)
def test_nan_oetf_BT1886(self): """ Tests :func:`colour.models.rgb.transfer_functions.bt_1886.\ oetf_BT1886` definition nan support. """ oetf_BT1886( np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]))
def test_oetf_BT1886(self): """ Tests :func:`colour.models.rgb.transfer_functions.bt_1886.\ oetf_BT1886` definition. """ self.assertAlmostEqual(oetf_BT1886(0.0), 0.0, places=7) self.assertAlmostEqual(oetf_BT1886(0.016317514686316), 0.18, places=7) self.assertAlmostEqual(oetf_BT1886(1.0), 1.0, places=7)
def test_oetf_BT1886(self): """ Tests :func:`colour.models.rgb.transfer_functions.bt_1886.\ oetf_BT1886` definition. """ self.assertAlmostEqual(oetf_BT1886(64.0), 0.0, places=7) self.assertAlmostEqual(oetf_BT1886(184.32), 0.268401363726554, places=7) self.assertAlmostEqual(oetf_BT1886(940), 1.000000000000000, places=7)
def test_oetf_BT1886(self): """ Tests :func:`colour.models.rgb.transfer_functions.bt_1886.\ oetf_BT1886` definition. """ self.assertAlmostEqual( oetf_BT1886(64.0), 0.0, places=7) self.assertAlmostEqual( oetf_BT1886(184.32), 0.268401363726554, places=7) self.assertAlmostEqual( oetf_BT1886(940), 1.000000000000000, places=7)