def test_nan_log_decoding_SLog3(self): """ Tests :func:`colour.models.rgb.transfer_functions.sony_slog.\ log_decoding_SLog3` definition nan support. """ log_decoding_SLog3(np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]))
def test_nan_log_decoding_SLog3(self): """ Tests :func:`colour.models.rgb.transfer_functions.sony_slog.\ log_decoding_SLog3` definition nan support. """ log_decoding_SLog3(np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]))
def test_domain_range_scale_log_decoding_SLog3(self): """ Tests :func:`colour.models.rgb.transfer_functions.sony_slog.\ log_decoding_SLog3` definition domain and range scale support. """ y = 0.41055718475073 x = log_decoding_SLog3(y) 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_SLog3(y * factor), x * factor, decimal=7)
def test_domain_range_scale_log_decoding_SLog3(self): """ Tests :func:`colour.models.rgb.transfer_functions.sony_slog.\ log_decoding_SLog3` definition domain and range scale support. """ y = 0.41055718475073 x = log_decoding_SLog3(y) 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_SLog3(y * factor), x * factor, decimal=7)
def test_n_dimensional_log_decoding_SLog3(self): """ Tests :func:`colour.models.rgb.transfer_functions.sony_slog.\ log_decoding_SLog3` definition n-dimensional arrays support. """ y = 0.41055718475073 x = log_decoding_SLog3(y) y = np.tile(y, 6) x = np.tile(x, 6) np.testing.assert_almost_equal(log_decoding_SLog3(y), x, decimal=7) y = np.reshape(y, (2, 3)) x = np.reshape(x, (2, 3)) np.testing.assert_almost_equal(log_decoding_SLog3(y), x, decimal=7) y = np.reshape(y, (2, 3, 1)) x = np.reshape(x, (2, 3, 1)) np.testing.assert_almost_equal(log_decoding_SLog3(y), x, decimal=7)
def test_n_dimensional_log_decoding_SLog3(self): """ Tests :func:`colour.models.rgb.transfer_functions.sony_slog.\ log_decoding_SLog3` definition n-dimensional arrays support. """ y = 0.41055718475073 x = log_decoding_SLog3(y) y = np.tile(y, 6) x = np.tile(x, 6) np.testing.assert_almost_equal(log_decoding_SLog3(y), x, decimal=7) y = np.reshape(y, (2, 3)) x = np.reshape(x, (2, 3)) np.testing.assert_almost_equal(log_decoding_SLog3(y), x, decimal=7) y = np.reshape(y, (2, 3, 1)) x = np.reshape(x, (2, 3, 1)) np.testing.assert_almost_equal(log_decoding_SLog3(y), x, decimal=7)
def test_log_decoding_SLog3(self): """ Tests :func:`colour.models.rgb.transfer_functions.sony_slog.\ log_decoding_SLog3` definition. """ self.assertAlmostEqual(log_decoding_SLog3(0.092864125122190), 0.0, places=7) self.assertAlmostEqual(log_decoding_SLog3(0.41055718475073), 0.18, places=7) self.assertAlmostEqual(log_decoding_SLog3(0.410557184750733, 12), 0.18, places=7) self.assertAlmostEqual(log_decoding_SLog3(0.406392694063927, 10, False), 0.18, places=7) self.assertAlmostEqual(log_decoding_SLog3(0.393489294768447, 10, False, False), 0.18, places=7) self.assertAlmostEqual(log_decoding_SLog3(0.596027343690123), 1.0, places=7)
def test_log_decoding_SLog3(self): """ Tests :func:`colour.models.rgb.transfer_functions.sony_slog.\ log_decoding_SLog3` definition. """ self.assertAlmostEqual( log_decoding_SLog3(0.092864125122190), 0.0, places=7) self.assertAlmostEqual( log_decoding_SLog3(0.41055718475073), 0.18, places=7) self.assertAlmostEqual( log_decoding_SLog3(0.410557184750733, 12), 0.18, places=7) self.assertAlmostEqual( log_decoding_SLog3(0.406392694063927, 10, False), 0.18, places=7) self.assertAlmostEqual( log_decoding_SLog3(0.393489294768447, 10, False, False), 0.18, places=7) self.assertAlmostEqual( log_decoding_SLog3(0.596027343690123), 1.0, places=7)