def test_n_dimensional_log_decoding_ACEScct(self): """ Test :func:`colour.models.rgb.transfer_functions.aces.\ log_decoding_ACEScct` definition n-dimensional arrays support. """ ACEScct = 0.413588402492442 lin_AP1 = log_decoding_ACEScct(ACEScct) ACEScct = np.tile(ACEScct, 6) lin_AP1 = np.tile(lin_AP1, 6) np.testing.assert_almost_equal( log_decoding_ACEScct(ACEScct), lin_AP1, decimal=7 ) ACEScct = np.reshape(ACEScct, (2, 3)) lin_AP1 = np.reshape(lin_AP1, (2, 3)) np.testing.assert_almost_equal( log_decoding_ACEScct(ACEScct), lin_AP1, decimal=7 ) ACEScct = np.reshape(ACEScct, (2, 3, 1)) lin_AP1 = np.reshape(lin_AP1, (2, 3, 1)) np.testing.assert_almost_equal( log_decoding_ACEScct(ACEScct), lin_AP1, decimal=7 )
def test_n_dimensional_log_decoding_ACEScct(self): """ Tests :func:`colour.models.rgb.transfer_functions.aces.\ log_decoding_ACEScct` definition n-dimensional arrays support. """ log = 0.413588402492442 linear = 0.18 np.testing.assert_almost_equal(log_decoding_ACEScct(log), linear, decimal=7) log = np.tile(log, 6) linear = np.tile(linear, 6) np.testing.assert_almost_equal(log_decoding_ACEScct(log), linear, decimal=7) log = np.reshape(log, (2, 3)) linear = np.reshape(linear, (2, 3)) np.testing.assert_almost_equal(log_decoding_ACEScct(log), linear, decimal=7) log = np.reshape(log, (2, 3, 1)) linear = np.reshape(linear, (2, 3, 1)) np.testing.assert_almost_equal(log_decoding_ACEScct(log), linear, decimal=7)
def test_nan_log_decoding_ACEScct(self): """ Tests :func:`colour.models.rgb.transfer_functions.aces.\ log_decoding_ACEScct` definition nan support. """ log_decoding_ACEScct( np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]))
def test_log_decoding_ACEScct(self): """ Tests :func:`colour.models.rgb.transfer_functions.aces.\ log_decoding_ACEScct` definition. """ self.assertAlmostEqual( log_decoding_ACEScct(0.072905534195835495), 0.0, places=7) self.assertAlmostEqual( log_decoding_ACEScct(0.41358840249244228), 0.18, places=7) self.assertAlmostEqual( log_decoding_ACEScct(0.554794520547945), 1.0, places=7)
def test_domain_range_scale_log_decoding_ACEScct(self): """ Tests :func:`colour.models.rgb.transfer_functions.aces.\ log_decoding_ACEScct` definition domain and range scale support. """ ACEScc = 0.413588402492442 lin_AP1 = log_decoding_ACEScct(ACEScc) d_r = (('reference', 1), (1, 1), (100, 100)) for scale, factor in d_r: with domain_range_scale(scale): np.testing.assert_almost_equal(log_decoding_ACEScct(ACEScc * factor), lin_AP1 * factor, decimal=7)
def test_domain_range_scale_log_decoding_ACEScct(self): """ Tests :func:`colour.models.rgb.transfer_functions.aces.\ log_decoding_ACEScct` definition domain and range scale support. """ ACEScc = 0.413588402492442 lin_AP1 = log_decoding_ACEScct(ACEScc) d_r = (('reference', 1), (1, 1), (100, 100)) for scale, factor in d_r: with domain_range_scale(scale): np.testing.assert_almost_equal( log_decoding_ACEScct(ACEScc * factor), lin_AP1 * factor, decimal=7)
def test_log_decoding_ACEScct(self): """ Tests :func:`colour.models.rgb.transfer_functions.aces.\ log_decoding_ACEScct` definition. """ self.assertAlmostEqual(log_decoding_ACEScct(0.072905534195835495), 0.0, places=7) self.assertAlmostEqual(log_decoding_ACEScct(0.41358840249244228), 0.18, places=7) self.assertAlmostEqual(log_decoding_ACEScct(0.554794520547945), 1.0, places=7)
def test_ACEScc_equivalency_log_decoding_ACEScct(self): """ Tests :func:`colour.models.rgb.transfer_functions.aces.\ log_decoding_ACEScct` definition ACEScc equivalency, and explicit requirement specified by AMPAS ACES specification S-2016-001 (https://github.com/ampas/\ aces-dev/blob/v1.0.3/documents/LaTeX/S-2016-001/introduction.tex#L14) """ equiv = np.linspace(0.15525114155251146, 1.0, 100) np.testing.assert_almost_equal( log_decoding_ACEScct(equiv), log_decoding_ACEScc(equiv), decimal=7)
def test_ACEScc_equivalency_log_decoding_ACEScct(self): """ Tests :func:`colour.models.rgb.transfer_functions.aces.\ log_decoding_ACEScct` definition ACEScc equivalency, and explicit requirement specified by AMPAS ACES specification S-2016-001 (https://github.com/ampas/\ aces-dev/blob/v1.0.3/documents/LaTeX/S-2016-001/introduction.tex#L14) """ equiv = np.linspace(0.15525114155251146, 1.0, 100) np.testing.assert_almost_equal(log_decoding_ACEScct(equiv), log_decoding_ACEScc(equiv), decimal=7)
def test_n_dimensional_log_decoding_ACEScct(self): """ Tests :func:`colour.models.rgb.transfer_functions.aces.\ log_decoding_ACEScct` definition n-dimensional arrays support. """ ACEScct = 0.413588402492442 lin_AP1 = log_decoding_ACEScct(ACEScct) ACEScct = np.tile(ACEScct, 6) lin_AP1 = np.tile(lin_AP1, 6) np.testing.assert_almost_equal( log_decoding_ACEScct(ACEScct), lin_AP1, decimal=7) ACEScct = np.reshape(ACEScct, (2, 3)) lin_AP1 = np.reshape(lin_AP1, (2, 3)) np.testing.assert_almost_equal( log_decoding_ACEScct(ACEScct), lin_AP1, decimal=7) ACEScct = np.reshape(ACEScct, (2, 3, 1)) lin_AP1 = np.reshape(lin_AP1, (2, 3, 1)) np.testing.assert_almost_equal( log_decoding_ACEScct(ACEScct), lin_AP1, decimal=7)