def test_n_dimensional_oetf_reverse_BT2100_HLG(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ oetf_reverse_BT2100_HLG` definition n-dimensional arrays support. """ E_p = 0.212132034355964 E = 0.18 / 12 np.testing.assert_almost_equal(oetf_reverse_BT2100_HLG(E_p), E, decimal=7) E_p = np.tile(E_p, 6) E = np.tile(E, 6) np.testing.assert_almost_equal(oetf_reverse_BT2100_HLG(E_p), E, decimal=7) E_p = np.reshape(E_p, (2, 3)) E = np.reshape(E, (2, 3)) np.testing.assert_almost_equal(oetf_reverse_BT2100_HLG(E_p), E, decimal=7) E_p = np.reshape(E_p, (2, 3, 1)) E = np.reshape(E, (2, 3, 1)) np.testing.assert_almost_equal(oetf_reverse_BT2100_HLG(E_p), E, decimal=7)
def test_nan_oetf_reverse_BT2100_HLG(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ oetf_reverse_BT2100_HLG` definition nan support. """ oetf_reverse_BT2100_HLG( np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]))
def test_nan_oetf_reverse_BT2100_HLG(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ oetf_reverse_BT2100_HLG` definition nan support. """ oetf_reverse_BT2100_HLG( np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]))
def test_oetf_reverse_BT2100_HLG(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ oetf_reverse_BT2100_HLG` definition. """ self.assertAlmostEqual(oetf_reverse_BT2100_HLG(0.0), 0.0, places=7) self.assertAlmostEqual( oetf_reverse_BT2100_HLG(0.212132034355964), 0.18 / 12, places=7) self.assertAlmostEqual( oetf_reverse_BT2100_HLG(0.999999995536569), 1.0, places=7)
def test_oetf_reverse_BT2100_HLG(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ oetf_reverse_BT2100_HLG` definition. """ self.assertAlmostEqual(oetf_reverse_BT2100_HLG(0.0), 0.0, places=7) self.assertAlmostEqual(oetf_reverse_BT2100_HLG(0.212132034355964), 0.18 / 12, places=7) self.assertAlmostEqual(oetf_reverse_BT2100_HLG(0.999999995536569), 1.0, places=7)
def test_domain_range_scale_oetf_reverse_BT2100_HLG(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ oetf_reverse_BT2100_HLG` definition domain and range scale support. """ E_p = 0.212132034355964 E = oetf_reverse_BT2100_HLG(E_p) d_r = (('reference', 1), (1, 1), (100, 100)) for scale, factor in d_r: with domain_range_scale(scale): np.testing.assert_almost_equal(oetf_reverse_BT2100_HLG(E_p * factor), E * factor, decimal=7)
def test_domain_range_scale_oetf_reverse_BT2100_HLG(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ oetf_reverse_BT2100_HLG` definition domain and range scale support. """ E_p = 0.212132034355964 E = oetf_reverse_BT2100_HLG(E_p) d_r = (('reference', 1), (1, 1), (100, 100)) for scale, factor in d_r: with domain_range_scale(scale): np.testing.assert_almost_equal( oetf_reverse_BT2100_HLG(E_p * factor), E * factor, decimal=7)
def test_n_dimensional_oetf_reverse_BT2100_HLG(self): """ Tests :func:`colour.models.rgb.transfer_functions.itur_bt_2100.\ oetf_reverse_BT2100_HLG` definition n-dimensional arrays support. """ E_p = 0.212132034355964 E = oetf_reverse_BT2100_HLG(E_p) E_p = np.tile(E_p, 6) E = np.tile(E, 6) np.testing.assert_almost_equal( oetf_reverse_BT2100_HLG(E_p), E, decimal=7) E_p = np.reshape(E_p, (2, 3)) E = np.reshape(E, (2, 3)) np.testing.assert_almost_equal( oetf_reverse_BT2100_HLG(E_p), E, decimal=7) E_p = np.reshape(E_p, (2, 3, 1)) E = np.reshape(E, (2, 3, 1)) np.testing.assert_almost_equal( oetf_reverse_BT2100_HLG(E_p), E, decimal=7)