code stringlengths 66 870k | docstring stringlengths 19 26.7k | func_name stringlengths 1 138 | language stringclasses 1
value | repo stringlengths 7 68 | path stringlengths 5 324 | url stringlengths 46 389 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
def test_chromatically_adapted_primaries(self) -> None:
"""
Test :func:`colour.models.rgb.derivation.\
chromatically_adapted_primaries` definition.
"""
np.testing.assert_allclose(
chromatically_adapted_primaries(
np.array([0.73470, 0.26530, 0.00000, 1.00000, ... |
Test :func:`colour.models.rgb.derivation.chromatically_adapted_primaries` definition.
| test_chromatically_adapted_primaries | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
def test_nan_chromatically_adapted_primaries(self) -> None:
"""
Test :func:`colour.models.rgb.derivation.\
chromatically_adapted_primaries` definition nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=2))))
... |
Test :func:`colour.models.rgb.derivation.chromatically_adapted_primaries` definition nan support.
| test_nan_chromatically_adapted_primaries | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
def test_primaries_whitepoint(self) -> None:
"""
Test :func:`colour.models.rgb.derivation.primaries_whitepoint`
definition.
"""
P, W = primaries_whitepoint(
np.array(
[
[0.95255240, 0.00000000, 0.00009368],
[0.3... |
Test :func:`colour.models.rgb.derivation.primaries_whitepoint`
definition.
| test_primaries_whitepoint | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
def test_nan_primaries_whitepoint(self) -> None:
"""
Test :func:`colour.models.rgb.derivation.primaries_whitepoint`
definition nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
for case in cas... |
Test :func:`colour.models.rgb.derivation.primaries_whitepoint`
definition nan support.
| test_nan_primaries_whitepoint | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
def test_RGB_luminance_equation(self) -> None:
"""
Test :func:`colour.models.rgb.derivation.RGB_luminance_equation`
definition.
"""
assert isinstance(
RGB_luminance_equation(
np.array([0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.07700]),
... |
Test :func:`colour.models.rgb.derivation.RGB_luminance_equation`
definition.
| test_RGB_luminance_equation | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
def test_RGB_luminance(self) -> None:
"""
Test :func:`colour.models.rgb.derivation.RGB_luminance`
definition.
"""
np.testing.assert_allclose(
RGB_luminance(
np.array([0.18, 0.18, 0.18]),
np.array([0.73470, 0.26530, 0.00000, 1.00000, 0.... |
Test :func:`colour.models.rgb.derivation.RGB_luminance`
definition.
| test_RGB_luminance | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
def test_n_dimensional_RGB_luminance(self) -> None:
"""
Test :func:`colour.models.rgb.derivation.RGB_luminance` definition
n_dimensional arrays support.
"""
RGB = (np.array([0.18, 0.18, 0.18]),)
P = (np.array([0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.07700]),)
... |
Test :func:`colour.models.rgb.derivation.RGB_luminance` definition
n_dimensional arrays support.
| test_n_dimensional_RGB_luminance | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
def test_nan_RGB_luminance(self) -> None:
"""
Test :func:`colour.models.rgb.derivation.RGB_luminance`
definition nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
for case in cases:
... |
Test :func:`colour.models.rgb.derivation.RGB_luminance`
definition nan support.
| test_nan_RGB_luminance | python | colour-science/colour | colour/models/rgb/tests/test_derivation.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_derivation.py | BSD-3-Clause |
def test_RGB_to_IHLS(self) -> None:
"""Test :func:`colour.models.rgb.hanbury2003.RGB_to_IHLS` definition."""
np.testing.assert_allclose(
RGB_to_IHLS(np.array([0.45620519, 0.03081071, 0.04091952])),
np.array([6.26236117, 0.12197943, 0.42539448]),
atol=TOLERANCE_ABSOLU... | Test :func:`colour.models.rgb.hanbury2003.RGB_to_IHLS` definition. | test_RGB_to_IHLS | python | colour-science/colour | colour/models/rgb/tests/test_hanbury2003.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_hanbury2003.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_IHLS(self) -> None:
"""
Test :func:`colour.models.rgb.hanbury2003.RGB_to_IHLS` definition
n-dimensional arrays support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
HYS = RGB_to_IHLS(RGB)
RGB = np.tile(RGB, (6, 1))
... |
Test :func:`colour.models.rgb.hanbury2003.RGB_to_IHLS` definition
n-dimensional arrays support.
| test_n_dimensional_RGB_to_IHLS | python | colour-science/colour | colour/models/rgb/tests/test_hanbury2003.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_hanbury2003.py | BSD-3-Clause |
def test_domain_range_scale_RGB_to_IHLS(self) -> None:
"""
Test :func:`colour.models.rgb.hanbury2003.RGB_to_IHLS` definition
domain and range scale support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
HYS = RGB_to_IHLS(RGB)
d_r = (("reference", 1), ... |
Test :func:`colour.models.rgb.hanbury2003.RGB_to_IHLS` definition
domain and range scale support.
| test_domain_range_scale_RGB_to_IHLS | python | colour-science/colour | colour/models/rgb/tests/test_hanbury2003.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_hanbury2003.py | BSD-3-Clause |
def test_nan_RGB_to_IHLS(self) -> None:
"""
Test :func:`colour.models.rgb.hanbury2003.RGB_to_IHLS` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
RGB_to_IHLS(cases) |
Test :func:`colour.models.rgb.hanbury2003.RGB_to_IHLS` definition nan
support.
| test_nan_RGB_to_IHLS | python | colour-science/colour | colour/models/rgb/tests/test_hanbury2003.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_hanbury2003.py | BSD-3-Clause |
def test_IHLS_to_RGB(self) -> None:
"""Test :func:`colour.models.rgb.hanbury2003.IHLS_to_RGB` definition."""
np.testing.assert_allclose(
IHLS_to_RGB(np.array([6.26236117, 0.12197943, 0.42539448])),
np.array([0.45620519, 0.03081071, 0.04091952]),
atol=TOLERANCE_ABSOLU... | Test :func:`colour.models.rgb.hanbury2003.IHLS_to_RGB` definition. | test_IHLS_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_hanbury2003.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_hanbury2003.py | BSD-3-Clause |
def test_n_dimensional_IHLS_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.hanbury2003.IHLS_to_RGB` definition
n-dimensional arrays support.
"""
HYS = np.array([6.26236117, 0.12197943, 0.42539448])
RGB = IHLS_to_RGB(HYS)
HYS = np.tile(HYS, (6, 1))
... |
Test :func:`colour.models.rgb.hanbury2003.IHLS_to_RGB` definition
n-dimensional arrays support.
| test_n_dimensional_IHLS_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_hanbury2003.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_hanbury2003.py | BSD-3-Clause |
def test_domain_range_scale_IHLS_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.hanbury2003.IHLS_to_RGB` definition
domain and range scale support.
"""
HYS = np.array([6.26236117, 0.12197943, 0.42539448])
RGB = IHLS_to_RGB(HYS)
d_r = (("reference", 1), ... |
Test :func:`colour.models.rgb.hanbury2003.IHLS_to_RGB` definition
domain and range scale support.
| test_domain_range_scale_IHLS_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_hanbury2003.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_hanbury2003.py | BSD-3-Clause |
def test_nan_IHLS_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.hanbury2003.IHLS_to_RGB` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
IHLS_to_RGB(cases) |
Test :func:`colour.models.rgb.hanbury2003.IHLS_to_RGB` definition nan
support.
| test_nan_IHLS_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_hanbury2003.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_hanbury2003.py | BSD-3-Clause |
def test_RGB_to_ICtCp(self) -> None:
"""Test :func:`colour.models.rgb.ictcp.RGB_to_ICtCp` definition."""
np.testing.assert_allclose(
RGB_to_ICtCp(np.array([0.45620519, 0.03081071, 0.04091952])),
np.array([0.07351364, 0.00475253, 0.09351596]),
atol=TOLERANCE_ABSOLUTE_... | Test :func:`colour.models.rgb.ictcp.RGB_to_ICtCp` definition. | test_RGB_to_ICtCp | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_ICtCp(self) -> None:
"""
Test :func:`colour.models.rgb.ictcp.RGB_to_ICtCp` definition
n-dimensional support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
ICtCp = RGB_to_ICtCp(RGB)
RGB = np.tile(RGB, (6, 1))
ICtCp... |
Test :func:`colour.models.rgb.ictcp.RGB_to_ICtCp` definition
n-dimensional support.
| test_n_dimensional_RGB_to_ICtCp | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_domain_range_scale_RGB_to_ICtCp(self) -> None:
"""
Test :func:`colour.models.rgb.ictcp.RGB_to_ICtCp` definition domain
and range scale support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
ICtCp = RGB_to_ICtCp(RGB)
d_r = (("reference", 1), (... |
Test :func:`colour.models.rgb.ictcp.RGB_to_ICtCp` definition domain
and range scale support.
| test_domain_range_scale_RGB_to_ICtCp | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_nan_RGB_to_ICtCp(self) -> None:
"""
Test :func:`colour.models.rgb.ictcp.RGB_to_ICtCp` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
RGB_to_ICtCp(cases) |
Test :func:`colour.models.rgb.ictcp.RGB_to_ICtCp` definition nan
support.
| test_nan_RGB_to_ICtCp | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_ICtCp_to_RGB(self) -> None:
"""Test :func:`colour.models.rgb.ictcp.ICtCp_to_RGB` definition."""
np.testing.assert_allclose(
ICtCp_to_RGB(np.array([0.07351364, 0.00475253, 0.09351596])),
np.array([0.45620519, 0.03081071, 0.04091952]),
atol=TOLERANCE_ABSOLUTE_... | Test :func:`colour.models.rgb.ictcp.ICtCp_to_RGB` definition. | test_ICtCp_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_n_dimensional_ICtCp_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.ictcp.ICtCp_to_RGB` definition
n-dimensional support.
"""
ICtCp = np.array([0.07351364, 0.00475253, 0.09351596])
RGB = ICtCp_to_RGB(ICtCp)
ICtCp = np.tile(ICtCp, (6, 1))
... |
Test :func:`colour.models.rgb.ictcp.ICtCp_to_RGB` definition
n-dimensional support.
| test_n_dimensional_ICtCp_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_domain_range_scale_ICtCp_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.ictcp.ICtCp_to_RGB` definition domain
and range scale support.
"""
ICtCp = np.array([0.07351364, 0.00475253, 0.09351596])
RGB = ICtCp_to_RGB(ICtCp)
d_r = (("reference", 1),... |
Test :func:`colour.models.rgb.ictcp.ICtCp_to_RGB` definition domain
and range scale support.
| test_domain_range_scale_ICtCp_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_nan_ICtCp_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.ictcp.ICtCp_to_RGB` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
ICtCp_to_RGB(cases) |
Test :func:`colour.models.rgb.ictcp.ICtCp_to_RGB` definition nan
support.
| test_nan_ICtCp_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_XYZ_to_ICtCp(self) -> None:
"""Test :func:`colour.models.rgb.ictcp.XYZ_to_ICtCp` definition."""
np.testing.assert_allclose(
XYZ_to_ICtCp(np.array([0.20654008, 0.12197225, 0.05136952])),
np.array([0.06858097, -0.00283842, 0.06020983]),
atol=TOLERANCE_ABSOLUTE... | Test :func:`colour.models.rgb.ictcp.XYZ_to_ICtCp` definition. | test_XYZ_to_ICtCp | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_n_dimensional_XYZ_to_ICtCp(self) -> None:
"""
Test :func:`colour.models.rgb.ictcp.XYZ_to_ICtCp` definition
n-dimensional support.
"""
XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
ICtCp = XYZ_to_ICtCp(XYZ)
XYZ = np.tile(XYZ, (6, 1))
ICtCp... |
Test :func:`colour.models.rgb.ictcp.XYZ_to_ICtCp` definition
n-dimensional support.
| test_n_dimensional_XYZ_to_ICtCp | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_domain_range_scale_XYZ_to_ICtCp(self) -> None:
"""
Test :func:`colour.models.rgb.ictcp.XYZ_to_ICtCp` definition domain
and range scale support.
"""
XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
ICtCp = XYZ_to_ICtCp(XYZ)
d_r = (("reference", 1), (... |
Test :func:`colour.models.rgb.ictcp.XYZ_to_ICtCp` definition domain
and range scale support.
| test_domain_range_scale_XYZ_to_ICtCp | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_nan_XYZ_to_ICtCp(self) -> None:
"""
Test :func:`colour.models.rgb.ictcp.XYZ_to_ICtCp` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
XYZ_to_ICtCp(cases) |
Test :func:`colour.models.rgb.ictcp.XYZ_to_ICtCp` definition nan
support.
| test_nan_XYZ_to_ICtCp | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_ICtCp_to_XYZ(self) -> None:
"""Test :func:`colour.models.rgb.ictcp.ICtCp_to_XYZ` definition."""
np.testing.assert_allclose(
ICtCp_to_XYZ(np.array([0.06858097, -0.00283842, 0.06020983])),
np.array([0.20654008, 0.12197225, 0.05136952]),
atol=TOLERANCE_ABSOLUTE... | Test :func:`colour.models.rgb.ictcp.ICtCp_to_XYZ` definition. | test_ICtCp_to_XYZ | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_n_dimensional_ICtCp_to_XYZ(self) -> None:
"""
Test :func:`colour.models.rgb.ictcp.ICtCp_to_XYZ` definition
n-dimensional support.
"""
ICtCp = np.array([0.06858097, -0.00283842, 0.06020983])
XYZ = ICtCp_to_XYZ(ICtCp)
ICtCp = np.tile(ICtCp, (6, 1))
... |
Test :func:`colour.models.rgb.ictcp.ICtCp_to_XYZ` definition
n-dimensional support.
| test_n_dimensional_ICtCp_to_XYZ | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_domain_range_scale_ICtCp_to_XYZ(self) -> None:
"""
Test :func:`colour.models.rgb.ictcp.ICtCp_to_XYZ` definition domain
and range scale support.
"""
ICtCp = np.array([0.06858097, -0.00283842, 0.06020983])
XYZ = ICtCp_to_XYZ(ICtCp)
d_r = (("reference", 1)... |
Test :func:`colour.models.rgb.ictcp.ICtCp_to_XYZ` definition domain
and range scale support.
| test_domain_range_scale_ICtCp_to_XYZ | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_nan_ICtCp_to_XYZ(self) -> None:
"""
Test :func:`colour.models.rgb.ictcp.ICtCp_to_XYZ` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
ICtCp_to_XYZ(cases) |
Test :func:`colour.models.rgb.ictcp.ICtCp_to_XYZ` definition nan
support.
| test_nan_ICtCp_to_XYZ | python | colour-science/colour | colour/models/rgb/tests/test_ictcp.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ictcp.py | BSD-3-Clause |
def test_describe_video_signal_colour_primaries(self) -> None:
"""
Test
:func:`colour.models.rgb.itut_h_273.\
describe_video_signal_colour_primaries` definition.
"""
description = describe_video_signal_colour_primaries(1)
assert isinstance(description, str) |
Test
:func:`colour.models.rgb.itut_h_273.describe_video_signal_colour_primaries` definition.
| test_describe_video_signal_colour_primaries | python | colour-science/colour | colour/models/rgb/tests/test_itut_h_273.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_itut_h_273.py | BSD-3-Clause |
def test_describe_video_signal_transfer_characteristics(self) -> None:
"""
Test :func:`colour.models.rgb.itut_h_273.\
describe_video_signal_transfer_characteristics` definition.
"""
description = describe_video_signal_transfer_characteristics(1)
assert isinstance(description, st... |
Test :func:`colour.models.rgb.itut_h_273.describe_video_signal_transfer_characteristics` definition.
| test_describe_video_signal_transfer_characteristics | python | colour-science/colour | colour/models/rgb/tests/test_itut_h_273.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_itut_h_273.py | BSD-3-Clause |
def test_describe_video_signal_matrix_coefficients(self) -> None:
"""
Test :func:`colour.models.rgb.itut_h_273.\
describe_video_signal_matrix_coefficients` definition.
"""
description = describe_video_signal_matrix_coefficients(1)
assert isinstance(description, str) |
Test :func:`colour.models.rgb.itut_h_273.describe_video_signal_matrix_coefficients` definition.
| test_describe_video_signal_matrix_coefficients | python | colour-science/colour | colour/models/rgb/tests/test_itut_h_273.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_itut_h_273.py | BSD-3-Clause |
def test_RGB_to_Prismatic(self) -> None:
"""Test :func:`colour.models.rgb.prismatic.RGB_to_Prismatic` definition."""
np.testing.assert_allclose(
RGB_to_Prismatic(np.array([0.0, 0.0, 0.0])),
np.array([0.0, 0.0, 0.0, 0.0]),
atol=TOLERANCE_ABSOLUTE_TESTS,
)
... | Test :func:`colour.models.rgb.prismatic.RGB_to_Prismatic` definition. | test_RGB_to_Prismatic | python | colour-science/colour | colour/models/rgb/tests/test_prismatic.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_prismatic.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_Prismatic(self) -> None:
"""
Test :func:`colour.models.rgb.prismatic.RGB_to_Prismatic` definition
n-dimensional support.
"""
RGB = np.array([0.25, 0.50, 0.75])
Lrgb = RGB_to_Prismatic(RGB)
RGB = np.tile(RGB, (6, 1))
Lrgb = n... |
Test :func:`colour.models.rgb.prismatic.RGB_to_Prismatic` definition
n-dimensional support.
| test_n_dimensional_RGB_to_Prismatic | python | colour-science/colour | colour/models/rgb/tests/test_prismatic.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_prismatic.py | BSD-3-Clause |
def test_domain_range_scale_RGB_to_Prismatic(self) -> None:
"""
Test :func:`colour.models.rgb.prismatic.RGB_to_Prismatic` definition
domain and range scale support.
"""
RGB = np.array([0.25, 0.50, 0.75])
Lrgb = RGB_to_Prismatic(RGB)
d_r = (("reference", 1), ("1"... |
Test :func:`colour.models.rgb.prismatic.RGB_to_Prismatic` definition
domain and range scale support.
| test_domain_range_scale_RGB_to_Prismatic | python | colour-science/colour | colour/models/rgb/tests/test_prismatic.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_prismatic.py | BSD-3-Clause |
def test_nan_RGB_to_Prismatic(self) -> None:
"""
Test :func:`colour.models.rgb.prismatic.RGB_to_Prismatic` definition
nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
RGB_to_Prismatic(cases) |
Test :func:`colour.models.rgb.prismatic.RGB_to_Prismatic` definition
nan support.
| test_nan_RGB_to_Prismatic | python | colour-science/colour | colour/models/rgb/tests/test_prismatic.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_prismatic.py | BSD-3-Clause |
def test_Prismatic_to_RGB(self) -> None:
"""Test :func:`colour.models.rgb.prismatic.Prismatic_to_RGB` definition."""
np.testing.assert_allclose(
Prismatic_to_RGB(np.array([0.0, 0.0, 0.0, 0.0])),
np.array([0.0, 0.0, 0.0]),
atol=TOLERANCE_ABSOLUTE_TESTS,
)
... | Test :func:`colour.models.rgb.prismatic.Prismatic_to_RGB` definition. | test_Prismatic_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_prismatic.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_prismatic.py | BSD-3-Clause |
def test_n_dimensional_Prismatic_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.prismatic.Prismatic_to_RGB` definition
n-dimensional support.
"""
Lrgb = np.array([0.7500000, 0.1666667, 0.3333333, 0.5000000])
RGB = Prismatic_to_RGB(Lrgb)
Lrgb = np.tile(L... |
Test :func:`colour.models.rgb.prismatic.Prismatic_to_RGB` definition
n-dimensional support.
| test_n_dimensional_Prismatic_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_prismatic.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_prismatic.py | BSD-3-Clause |
def test_domain_range_scale_Prismatic_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.prismatic.Prismatic_to_RGB` definition
domain and range scale support.
"""
Lrgb = np.array([0.7500000, 0.1666667, 0.3333333, 0.5000000])
RGB = Prismatic_to_RGB(Lrgb)
d_... |
Test :func:`colour.models.rgb.prismatic.Prismatic_to_RGB` definition
domain and range scale support.
| test_domain_range_scale_Prismatic_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_prismatic.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_prismatic.py | BSD-3-Clause |
def test_nan_Prismatic_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.prismatic.Prismatic_to_RGB` definition
nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
Prismatic_to_RGB(cases) |
Test :func:`colour.models.rgb.prismatic.Prismatic_to_RGB` definition
nan support.
| test_nan_Prismatic_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_prismatic.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_prismatic.py | BSD-3-Clause |
def test__str__(self) -> None:
"""
Test :meth:`colour.models.rgb.rgb_colourspace.RGB_Colourspace.__str__`
method.
"""
assert re.sub(" at 0x\\w+>", "", str(self._colourspace)) == (
textwrap.dedent(
"""
RGB Colourspace
---------------
Prima... |
Test :meth:`colour.models.rgb.rgb_colourspace.RGB_Colourspace.__str__`
method.
| test__str__ | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test__repr__(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.RGB_Colourspace.\
__repr__` method.
"""
assert re.sub(" at 0x\\w+>", "", repr(self._colourspace)) == (
textwrap.dedent(
"""
RGB_Colourspace('RGB Colourspace',
... |
Test :func:`colour.models.rgb.rgb_colourspace.RGB_Colourspace.__repr__` method.
| test__repr__ | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_use_derived_transformation_matrices(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.RGB_Colourspace.\
use_derived_transformation_matrices` method.
"""
np.testing.assert_array_equal(
self._colourspace.matrix_RGB_to_XYZ, np.identity(3)
)
... |
Test :func:`colour.models.rgb.rgb_colourspace.RGB_Colourspace.use_derived_transformation_matrices` method.
| test_use_derived_transformation_matrices | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_chromatically_adapt(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.RGB_Colourspace.\
chromatically_adapt` method.
"""
whitepoint_t = np.array([0.31270, 0.32900])
colourspace = self._colourspace.chromatically_adapt(
whitepoint_t, "D50", "Bra... |
Test :func:`colour.models.rgb.rgb_colourspace.RGB_Colourspace.chromatically_adapt` method.
| test_chromatically_adapt | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_XYZ_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.XYZ_to_RGB`
definition.
"""
np.testing.assert_allclose(
XYZ_to_RGB(
np.array([0.21638819, 0.12570000, 0.03847493]),
RGB_COLOURSPACE_sRGB,
... |
Test :func:`colour.models.rgb.rgb_colourspace.XYZ_to_RGB`
definition.
| test_XYZ_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_n_dimensional_XYZ_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.XYZ_to_RGB` definition
n-dimensional support.
"""
XYZ = np.array([0.21638819, 0.12570000, 0.03847493])
W_R = np.array([0.34570, 0.35850])
RGB = XYZ_to_RGB(XYZ, "sRG... |
Test :func:`colour.models.rgb.rgb_colourspace.XYZ_to_RGB` definition
n-dimensional support.
| test_n_dimensional_XYZ_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_domain_range_scale_XYZ_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.XYZ_to_RGB` definition
domain and range scale support.
"""
XYZ = np.array([0.21638819, 0.12570000, 0.03847493])
W_R = np.array([0.34570, 0.35850])
RGB = XYZ_to... |
Test :func:`colour.models.rgb.rgb_colourspace.XYZ_to_RGB` definition
domain and range scale support.
| test_domain_range_scale_XYZ_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_nan_XYZ_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.XYZ_to_RGB` definition
nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
XYZ_to_RGB(cases, "sRGB", case... |
Test :func:`colour.models.rgb.rgb_colourspace.XYZ_to_RGB` definition
nan support.
| test_nan_XYZ_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_RGB_to_XYZ(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_XYZ`
definition.
"""
np.testing.assert_allclose(
RGB_to_XYZ(
np.array([0.70556403, 0.19112904, 0.22341005]),
RGB_COLOURSPACE_sRGB,
... |
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_XYZ`
definition.
| test_RGB_to_XYZ | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_XYZ(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_XYZ` definition
n-dimensional support.
"""
RGB = np.array([0.70556599, 0.19109268, 0.22340812])
W_R = np.array([0.31270, 0.32900])
XYZ = RGB_to_XYZ(RGB, "sRG... |
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_XYZ` definition
n-dimensional support.
| test_n_dimensional_RGB_to_XYZ | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_domain_range_scale_XYZ_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_XYZ` definition
domain and range scale support.
"""
RGB = np.array([0.45620801, 0.03079991, 0.04091883])
W_R = np.array([0.31270, 0.32900])
XYZ = RGB_to... |
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_XYZ` definition
domain and range scale support.
| test_domain_range_scale_XYZ_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_nan_RGB_to_XYZ(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_XYZ` definition
nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
RGB_to_XYZ(cases, "sRGB", case... |
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_XYZ` definition
nan support.
| test_nan_RGB_to_XYZ | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_matrix_RGB_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.matrix_RGB_to_RGB`
definition.
"""
aces_2065_1_colourspace = RGB_COLOURSPACES["ACES2065-1"]
aces_cg_colourspace = RGB_COLOURSPACES["ACEScg"]
sRGB_colourspace = RGB_COLOURS... |
Test :func:`colour.models.rgb.rgb_colourspace.matrix_RGB_to_RGB`
definition.
| test_matrix_RGB_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_RGB_to_RGB(self) -> None:
"""Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_RGB` definition."""
aces_2065_1_colourspace = RGB_COLOURSPACES["ACES2065-1"]
sRGB_colourspace = RGB_COLOURSPACES["sRGB"]
np.testing.assert_allclose(
RGB_to_RGB(
np.arr... | Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_RGB` definition. | test_RGB_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_RGB` definition
n-dimensional support.
"""
aces_2065_1_colourspace = RGB_COLOURSPACES["ACES2065-1"]
sRGB_colourspace = RGB_COLOURSPACES["sRGB"]
RGB_i = np.ar... |
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_RGB` definition
n-dimensional support.
| test_n_dimensional_RGB_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_domain_range_scale_XYZ_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_RGB` definition
domain and range scale support.
"""
aces_2065_1_colourspace = RGB_COLOURSPACES["ACES2065-1"]
sRGB_colourspace = RGB_COLOURSPACES["sRGB"]
... |
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_RGB` definition
domain and range scale support.
| test_domain_range_scale_XYZ_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_nan_RGB_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_RGB` definition
nan support.
"""
aces_2065_1_colourspace = RGB_COLOURSPACES["ACES2065-1"]
sRGB_colourspace = RGB_COLOURSPACES["sRGB"]
cases = [-1.0, 0.0, 1.0, -np.inf... |
Test :func:`colour.models.rgb.rgb_colourspace.RGB_to_RGB` definition
nan support.
| test_nan_RGB_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_rgb_colourspace.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_rgb_colourspace.py | BSD-3-Clause |
def test_round_BT2100(self) -> None:
"""Test :func:`colour.models.rgb.ycbcr.round_BT2100` definition."""
np.testing.assert_array_equal(
round_BT2100([-0.6, -0.5, -0.4, 0.4, 0.5, 0.6]),
np.array([-1.0, -1.0, -0.0, 0.0, 1.0, 1.0]),
) | Test :func:`colour.models.rgb.ycbcr.round_BT2100` definition. | test_round_BT2100 | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_ranges_YCbCr(self) -> None:
"""Test :func:`colour.models.rgb.ycbcr.ranges_YCbCr` definition."""
np.testing.assert_allclose(
ranges_YCbCr(8, True, True),
np.array([16.00000000, 235.00000000, 16.00000000, 240.00000000]),
atol=TOLERANCE_ABSOLUTE_TESTS,
... | Test :func:`colour.models.rgb.ycbcr.ranges_YCbCr` definition. | test_ranges_YCbCr | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_matrix_YCbCr(self) -> None:
"""Test :func:`colour.models.rgb.ycbcr.matrix_YCbCr` definition."""
np.testing.assert_allclose(
matrix_YCbCr(),
np.array(
[
[1.00000000, 0.00000000, 1.57480000],
[1.00000000, -0.18732427... | Test :func:`colour.models.rgb.ycbcr.matrix_YCbCr` definition. | test_matrix_YCbCr | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_offset_YCbCr(self) -> None:
"""Test :func:`colour.models.rgb.ycbcr.offset_YCbCr` definition."""
np.testing.assert_allclose(
offset_YCbCr(),
np.array([0.00000000, 0.00000000, 0.00000000]),
atol=TOLERANCE_ABSOLUTE_TESTS,
)
np.testing.assert_al... | Test :func:`colour.models.rgb.ycbcr.offset_YCbCr` definition. | test_offset_YCbCr | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_RGB_to_YCbCr(self) -> None:
"""Test :func:`colour.models.rgb.ycbcr.RGB_to_YCbCr` definition."""
np.testing.assert_allclose(
RGB_to_YCbCr(np.array([0.75, 0.75, 0.0])),
np.array([0.66035745, 0.17254902, 0.53216593]),
atol=TOLERANCE_ABSOLUTE_TESTS,
)
... | Test :func:`colour.models.rgb.ycbcr.RGB_to_YCbCr` definition. | test_RGB_to_YCbCr | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_YCbCr(self) -> None:
"""
Test :func:`colour.models.rgb.ycbcr.RGB_to_YCbCr` definition
n-dimensional arrays support.
"""
RGB = np.array([0.75, 0.5, 0.25])
YCbCr = RGB_to_YCbCr(RGB)
RGB = np.tile(RGB, 4)
RGB = np.reshape(RGB, ... |
Test :func:`colour.models.rgb.ycbcr.RGB_to_YCbCr` definition
n-dimensional arrays support.
| test_n_dimensional_RGB_to_YCbCr | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_domain_range_scale_RGB_to_YCbCr(self) -> None:
"""
Test :func:`colour.models.rgb.prismatic.RGB_to_YCbCr` definition
domain and range scale support.
"""
RGB = np.array([0.75, 0.5, 0.25])
YCbCr = RGB_to_YCbCr(RGB)
d_r = (("reference", 1), ("1", 1), ("100"... |
Test :func:`colour.models.rgb.prismatic.RGB_to_YCbCr` definition
domain and range scale support.
| test_domain_range_scale_RGB_to_YCbCr | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_nan_RGB_to_YCbCr(self) -> None:
"""
Test :func:`colour.models.rgb.ycbcr.RGB_to_YCbCr` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
RGB_to_YCbCr(cases) |
Test :func:`colour.models.rgb.ycbcr.RGB_to_YCbCr` definition nan
support.
| test_nan_RGB_to_YCbCr | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_YCbCr_to_RGB(self) -> None:
"""Test :func:`colour.models.rgb.ycbcr.YCbCr_to_RGB` definition."""
np.testing.assert_allclose(
YCbCr_to_RGB(np.array([0.66035745, 0.17254902, 0.53216593])),
np.array([0.75, 0.75, 0.0]),
atol=TOLERANCE_ABSOLUTE_TESTS,
)
... | Test :func:`colour.models.rgb.ycbcr.YCbCr_to_RGB` definition. | test_YCbCr_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_n_dimensional_YCbCr_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.ycbcr.YCbCr_to_RGB` definition
n-dimensional arrays support.
"""
YCbCr = np.array([0.52230157, 0.36699593, 0.62183309])
RGB = YCbCr_to_RGB(YCbCr)
RGB = np.tile(RGB, 4)
R... |
Test :func:`colour.models.rgb.ycbcr.YCbCr_to_RGB` definition
n-dimensional arrays support.
| test_n_dimensional_YCbCr_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_domain_range_scale_YCbCr_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.prismatic.YCbCr_to_RGB` definition
domain and range scale support.
"""
YCbCr = np.array([0.52230157, 0.36699593, 0.62183309])
RGB = YCbCr_to_RGB(YCbCr)
d_r = (("reference",... |
Test :func:`colour.models.rgb.prismatic.YCbCr_to_RGB` definition
domain and range scale support.
| test_domain_range_scale_YCbCr_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_nan_YCbCr_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.ycbcr.YCbCr_to_RGB` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
YCbCr_to_RGB(cases) |
Test :func:`colour.models.rgb.ycbcr.YCbCr_to_RGB` definition nan
support.
| test_nan_YCbCr_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_RGB_to_YcCbcCrc(self) -> None:
"""Test :func:`colour.models.rgb.ycbcr.RGB_to_YcCbcCrc` definition."""
np.testing.assert_allclose(
RGB_to_YcCbcCrc(np.array([0.45620519, 0.03081071, 0.04091952])),
np.array([0.37020379, 0.41137200, 0.77704674]),
atol=TOLERANCE_... | Test :func:`colour.models.rgb.ycbcr.RGB_to_YcCbcCrc` definition. | test_RGB_to_YcCbcCrc | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_YcCbcCrc(self) -> None:
"""
Test :func:`colour.models.rgb.ycbcr.RGB_to_YcCbcCrc` definition
n-dimensional arrays support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
YcCbcCrc = RGB_to_YcCbcCrc(RGB)
RGB = np.tile(RGB, 4)... |
Test :func:`colour.models.rgb.ycbcr.RGB_to_YcCbcCrc` definition
n-dimensional arrays support.
| test_n_dimensional_RGB_to_YcCbcCrc | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_domain_range_scale_RGB_to_YcCbcCrc(self) -> None:
"""
Test :func:`colour.models.rgb.prismatic.RGB_to_YcCbcCrc` definition
domain and range scale support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
YcCbcCrc = RGB_to_YcCbcCrc(RGB)
d_r = (("r... |
Test :func:`colour.models.rgb.prismatic.RGB_to_YcCbcCrc` definition
domain and range scale support.
| test_domain_range_scale_RGB_to_YcCbcCrc | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_nan_RGB_to_YcCbcCrc(self) -> None:
"""
Test :func:`colour.models.rgb.ycbcr.RGB_to_YcCbcCrc` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
RGB_to_YcCbcCrc(cases) |
Test :func:`colour.models.rgb.ycbcr.RGB_to_YcCbcCrc` definition nan
support.
| test_nan_RGB_to_YcCbcCrc | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_n_dimensional_YcCbcCrc_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.ycbcr.YcCbcCrc_to_RGB` definition
n-dimensional arrays support.
"""
YcCbcCrc = np.array([0.37020379, 0.41137200, 0.77704674])
RGB = YcCbcCrc_to_RGB(YcCbcCrc)
RGB = np.tile(RG... |
Test :func:`colour.models.rgb.ycbcr.YcCbcCrc_to_RGB` definition
n-dimensional arrays support.
| test_n_dimensional_YcCbcCrc_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_domain_range_scale_YcCbcCrc_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.prismatic.YcCbcCrc_to_RGB` definition
domain and range scale support.
"""
YcCbcCrc = np.array([0.69943807, 0.38814348, 0.61264549])
RGB = YcCbcCrc_to_RGB(YcCbcCrc)
d_r =... |
Test :func:`colour.models.rgb.prismatic.YcCbcCrc_to_RGB` definition
domain and range scale support.
| test_domain_range_scale_YcCbcCrc_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_nan_YcCbcCrc_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.ycbcr.YcCbcCrc_to_RGB` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
YcCbcCrc_to_RGB(cases) |
Test :func:`colour.models.rgb.ycbcr.YcCbcCrc_to_RGB` definition nan
support.
| test_nan_YcCbcCrc_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ycbcr.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycbcr.py | BSD-3-Clause |
def test_RGB_to_YCoCg(self) -> None:
"""Test :func:`colour.models.rgb.ycocg.RGB_to_YCoCg` definition."""
np.testing.assert_array_equal(
RGB_to_YCoCg(np.array([0.75, 0.75, 0.0])),
np.array([0.5625, 0.375, 0.1875]),
)
np.testing.assert_array_equal(
RGB... | Test :func:`colour.models.rgb.ycocg.RGB_to_YCoCg` definition. | test_RGB_to_YCoCg | python | colour-science/colour | colour/models/rgb/tests/test_ycocg.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycocg.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_YCoCg(self) -> None:
"""
Test :func:`colour.models.rgb.ycocg.RGB_to_YCoCg` definition
n-dimensional arrays support.
"""
RGB = np.array([0.75, 0.75, 0.0])
YCoCg = RGB_to_YCoCg(RGB)
RGB = np.tile(RGB, 4)
RGB = np.reshape(RGB, ... |
Test :func:`colour.models.rgb.ycocg.RGB_to_YCoCg` definition
n-dimensional arrays support.
| test_n_dimensional_RGB_to_YCoCg | python | colour-science/colour | colour/models/rgb/tests/test_ycocg.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycocg.py | BSD-3-Clause |
def test_nan_RGB_to_YCoCg(self) -> None:
"""
Test :func:`colour.models.rgb.ycocg.RGB_to_YCoCg` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
RGB_to_YCoCg(cases) |
Test :func:`colour.models.rgb.ycocg.RGB_to_YCoCg` definition nan
support.
| test_nan_RGB_to_YCoCg | python | colour-science/colour | colour/models/rgb/tests/test_ycocg.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycocg.py | BSD-3-Clause |
def test_YCoCg_to_RGB(self) -> None:
"""Test :func:`colour.models.rgb.ycocg.YCoCg_to_RGB` definition."""
np.testing.assert_array_equal(
YCoCg_to_RGB(np.array([0.5625, 0.375, 0.1875])),
np.array([0.75, 0.75, 0.0]),
)
np.testing.assert_array_equal(
YCo... | Test :func:`colour.models.rgb.ycocg.YCoCg_to_RGB` definition. | test_YCoCg_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ycocg.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycocg.py | BSD-3-Clause |
def test_n_dimensional_YCoCg_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.ycocg.YCoCg_to_RGB` definition
n-dimensional arrays support.
"""
YCoCg = np.array([0.5625, 0.375, 0.1875])
RGB = YCoCg_to_RGB(YCoCg)
RGB = np.tile(RGB, 4)
RGB = np.resha... |
Test :func:`colour.models.rgb.ycocg.YCoCg_to_RGB` definition
n-dimensional arrays support.
| test_n_dimensional_YCoCg_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ycocg.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycocg.py | BSD-3-Clause |
def test_nan_YCoCg_to_RGB(self) -> None:
"""
Test :func:`colour.models.rgb.ycocg.YCoCg_to_RGB` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
YCoCg_to_RGB(cases) |
Test :func:`colour.models.rgb.ycocg.YCoCg_to_RGB` definition nan
support.
| test_nan_YCoCg_to_RGB | python | colour-science/colour | colour/models/rgb/tests/test_ycocg.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/tests/test_ycocg.py | BSD-3-Clause |
def log_encoding_ACESproxy(
lin_AP1: ArrayLike,
bit_depth: Literal[10, 12] = 10,
out_int: bool = False,
constants: dict = CONSTANTS_ACES_PROXY,
) -> NDArrayFloat | NDArrayInt:
"""
Define the *ACESproxy* colourspace log encoding curve / opto-electronic
transfer function.
Parameters
-... |
Define the *ACESproxy* colourspace log encoding curve / opto-electronic
transfer function.
Parameters
----------
lin_AP1
*lin_AP1* value.
bit_depth
*ACESproxy* bit-depth.
out_in
Whether to return value as int code value or float equivalent of a
code value at... | log_encoding_ACESproxy | python | colour-science/colour | colour/models/rgb/transfer_functions/aces.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/aces.py | BSD-3-Clause |
def log_decoding_ACESproxy(
ACESproxy: ArrayLike,
bit_depth: Literal[10, 12] = 10,
in_int: bool = False,
constants: dict | None = None,
) -> NDArrayFloat:
"""
Define the *ACESproxy* colourspace log decoding curve / electro-optical
transfer function.
Parameters
----------
ACESpro... |
Define the *ACESproxy* colourspace log decoding curve / electro-optical
transfer function.
Parameters
----------
ACESproxy
*ACESproxy* non-linear value.
bit_depth
*ACESproxy* bit-depth.
in_int
Whether to treat the input value as int code value or float
equiv... | log_decoding_ACESproxy | python | colour-science/colour | colour/models/rgb/transfer_functions/aces.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/aces.py | BSD-3-Clause |
def log_encoding_ACEScc(lin_AP1: ArrayLike) -> NDArrayFloat:
"""
Define the *ACEScc* colourspace log encoding / opto-electronic transfer
function.
Parameters
----------
lin_AP1
*lin_AP1* value.
Returns
-------
:class:`numpy.ndarray`
*ACEScc* non-linear value.
N... |
Define the *ACEScc* colourspace log encoding / opto-electronic transfer
function.
Parameters
----------
lin_AP1
*lin_AP1* value.
Returns
-------
:class:`numpy.ndarray`
*ACEScc* non-linear value.
Notes
-----
+-------------+-----------------------+----------... | log_encoding_ACEScc | python | colour-science/colour | colour/models/rgb/transfer_functions/aces.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/aces.py | BSD-3-Clause |
def log_decoding_ACEScc(ACEScc: ArrayLike) -> NDArrayFloat:
"""
Define the *ACEScc* colourspace log decoding / electro-optical transfer
function.
Parameters
----------
ACEScc
*ACEScc* non-linear value.
Returns
-------
:class:`numpy.ndarray`
*lin_AP1* value.
Not... |
Define the *ACEScc* colourspace log decoding / electro-optical transfer
function.
Parameters
----------
ACEScc
*ACEScc* non-linear value.
Returns
-------
:class:`numpy.ndarray`
*lin_AP1* value.
Notes
-----
+-------------+-----------------------+-----------... | log_decoding_ACEScc | python | colour-science/colour | colour/models/rgb/transfer_functions/aces.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/aces.py | BSD-3-Clause |
def log_encoding_ACEScct(
lin_AP1: ArrayLike, constants: Structure = CONSTANTS_ACES_CCT
) -> NDArrayFloat:
"""
Define the *ACEScct* colourspace log encoding / opto-electronic transfer
function.
Parameters
----------
lin_AP1
*lin_AP1* value.
constants
*ACEScct* constants.... |
Define the *ACEScct* colourspace log encoding / opto-electronic transfer
function.
Parameters
----------
lin_AP1
*lin_AP1* value.
constants
*ACEScct* constants.
Returns
-------
:class:`numpy.ndarray`
*ACEScct* non-linear value.
Notes
-----
+---... | log_encoding_ACEScct | python | colour-science/colour | colour/models/rgb/transfer_functions/aces.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/aces.py | BSD-3-Clause |
def log_decoding_ACEScct(
ACEScct: ArrayLike, constants: Structure = CONSTANTS_ACES_CCT
) -> NDArrayFloat:
"""
Define the *ACEScct* colourspace log decoding / electro-optical transfer
function.
Parameters
----------
ACEScct
*ACEScct* non-linear value.
constants
*ACEScct*... |
Define the *ACEScct* colourspace log decoding / electro-optical transfer
function.
Parameters
----------
ACEScct
*ACEScct* non-linear value.
constants
*ACEScct* constants.
Returns
-------
:class:`numpy.ndarray`
*lin_AP1* value.
References
---------... | log_decoding_ACEScct | python | colour-science/colour | colour/models/rgb/transfer_functions/aces.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/aces.py | BSD-3-Clause |
def log_encoding_AppleLogProfile(
R: ArrayLike,
constants: Structure = CONSTANTS_APPLE_LOG_PROFILE,
) -> NDArrayFloat:
"""
Define the *Apple Log Profile* log encoding curve.
Parameters
----------
R
Linear reflection data :math`R`.
constants
*Apple Log Profile* constants.... |
Define the *Apple Log Profile* log encoding curve.
Parameters
----------
R
Linear reflection data :math`R`.
constants
*Apple Log Profile* constants.
Returns
-------
:class:`numpy.ndarray`
*Apple Log Profile* captured pixel value :math:`P`
References
--... | log_encoding_AppleLogProfile | python | colour-science/colour | colour/models/rgb/transfer_functions/apple_log_profile.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/apple_log_profile.py | BSD-3-Clause |
def log_decoding_AppleLogProfile(
P: ArrayLike,
constants: Structure = CONSTANTS_APPLE_LOG_PROFILE,
) -> NDArrayFloat:
"""
Define the *Apple Log Profile* log decoding curve.
Parameters
----------
P
*Apple Log Profile* captured pixel value :math:`P`
constants
*Apple Log P... |
Define the *Apple Log Profile* log decoding curve.
Parameters
----------
P
*Apple Log Profile* captured pixel value :math:`P`
constants
*Apple Log Profile* constants.
Returns
-------
:class:`numpy.ndarray`
Linear reflection data :math`R`.
References
... | log_decoding_AppleLogProfile | python | colour-science/colour | colour/models/rgb/transfer_functions/apple_log_profile.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/apple_log_profile.py | BSD-3-Clause |
def oetf_ARIBSTDB67(
E: ArrayLike,
r: ArrayLike = 0.5,
constants: Structure = CONSTANTS_ARIBSTDB67,
) -> NDArrayFloat:
"""
Define *ARIB STD-B67 (Hybrid Log-Gamma)* opto-electrical transfer
function (OETF).
Parameters
----------
E
Voltage normalised by the reference white lev... |
Define *ARIB STD-B67 (Hybrid Log-Gamma)* opto-electrical transfer
function (OETF).
Parameters
----------
E
Voltage normalised by the reference white level and proportional to
the implicit light intensity that would be detected with a reference
camera color channel R, G, B.
... | oetf_ARIBSTDB67 | python | colour-science/colour | colour/models/rgb/transfer_functions/arib_std_b67.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/arib_std_b67.py | BSD-3-Clause |
def oetf_inverse_ARIBSTDB67(
E_p: ArrayLike,
r: ArrayLike = 0.5,
constants: Structure = CONSTANTS_ARIBSTDB67,
) -> NDArrayFloat:
"""
Define *ARIB STD-B67 (Hybrid Log-Gamma)* inverse opto-electrical transfer
function (OETF).
Parameters
----------
E_p
Non-linear signal :math:`... |
Define *ARIB STD-B67 (Hybrid Log-Gamma)* inverse opto-electrical transfer
function (OETF).
Parameters
----------
E_p
Non-linear signal :math:`E'`.
r
Video level corresponding to reference white level.
constants
*ARIB STD-B67 (Hybrid Log-Gamma)* constants.
Retur... | oetf_inverse_ARIBSTDB67 | python | colour-science/colour | colour/models/rgb/transfer_functions/arib_std_b67.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/arib_std_b67.py | BSD-3-Clause |
def log_encoding_ARRILogC3(
x: ArrayLike,
firmware: Literal["SUP 2.x", "SUP 3.x"] | str = "SUP 3.x",
method: (
Literal["Linear Scene Exposure Factor", "Normalised Sensor Signal"] | str
) = "Linear Scene Exposure Factor",
EI: Literal[160, 200, 250, 320, 400, 500, 640, 800, 1000, 1280, 1600] =... |
Define the *ARRI LogC3* log encoding curve / opto-electronic transfer
function.
Parameters
----------
x
Linear data :math:`x`.
firmware
Alexa firmware version.
method
Conversion method.
EI
Exposure Index :math:`EI`.
Returns
-------
:class:`n... | log_encoding_ARRILogC3 | python | colour-science/colour | colour/models/rgb/transfer_functions/arri.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/arri.py | BSD-3-Clause |
def log_decoding_ARRILogC3(
t: ArrayLike,
firmware: Literal["SUP 2.x", "SUP 3.x"] | str = "SUP 3.x",
method: (
Literal["Linear Scene Exposure Factor", "Normalised Sensor Signal"] | str
) = "Linear Scene Exposure Factor",
EI: Literal[160, 200, 250, 320, 400, 500, 640, 800, 1000, 1280, 1600] =... |
Define the *ARRI LogC3* log decoding curve / electro-optical transfer
function.
Parameters
----------
t
*ARRI LogC3* encoded data :math:`t`.
firmware
Alexa firmware version.
method
Conversion method.
EI
Exposure Index :math:`EI`.
Returns
-------... | log_decoding_ARRILogC3 | python | colour-science/colour | colour/models/rgb/transfer_functions/arri.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/arri.py | BSD-3-Clause |
def log_encoding_ARRILogC4(
E_scene: ArrayLike,
constants: Structure = CONSTANTS_ARRILOGC4,
) -> NDArrayFloat:
"""
Define the *ARRI LogC4* log encoding curve / opto-electronic transfer
function.
Parameters
----------
E_scene
Relative scene linear signal :math:`E_{scene}`.
co... |
Define the *ARRI LogC4* log encoding curve / opto-electronic transfer
function.
Parameters
----------
E_scene
Relative scene linear signal :math:`E_{scene}`.
constants
*ARRI LogC4* constants.
Returns
-------
:class:`numpy.ndarray`
*ARRI LogC4* encoded signa... | log_encoding_ARRILogC4 | python | colour-science/colour | colour/models/rgb/transfer_functions/arri.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/arri.py | BSD-3-Clause |
def log_decoding_ARRILogC4(
E_p: ArrayLike,
constants: Structure = CONSTANTS_ARRILOGC4,
) -> NDArrayFloat:
"""
Define the *ARRI LogC4* log decoding curve / electro-optical transfer
function.
Parameters
----------
E_p
*ARRI LogC4* encoded signal :math:`E'`.
constants
... |
Define the *ARRI LogC4* log decoding curve / electro-optical transfer
function.
Parameters
----------
E_p
*ARRI LogC4* encoded signal :math:`E'`.
constants
*ARRI LogC4* constants.
Returns
-------
:class:`numpy.ndarray`
Linear data :math:`E_{scene}`.
No... | log_decoding_ARRILogC4 | python | colour-science/colour | colour/models/rgb/transfer_functions/arri.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/arri.py | BSD-3-Clause |
def oetf_BlackmagicFilmGeneration5(
x: ArrayLike,
constants: Structure = CONSTANTS_BLACKMAGIC_FILM_GENERATION_5,
) -> NDArrayFloat:
"""
Define the *Blackmagic Film Generation 5* opto-electronic transfer
function (OETF).
Parameters
----------
x
Linear light value :math`x`.
co... |
Define the *Blackmagic Film Generation 5* opto-electronic transfer
function (OETF).
Parameters
----------
x
Linear light value :math`x`.
constants
*Blackmagic Film Generation 5* constants.
Returns
-------
:class:`numpy.ndarray`
Encoded value :math:`y`.
... | oetf_BlackmagicFilmGeneration5 | python | colour-science/colour | colour/models/rgb/transfer_functions/blackmagic_design.py | https://github.com/colour-science/colour/blob/master/colour/models/rgb/transfer_functions/blackmagic_design.py | BSD-3-Clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.