# -*- coding: utf-8 -*-
"""
Sony Colourspaces
=================

Defines the *Sony* colourspaces:

-   :attr:`colour.models.RGB_COLOURSPACE_S_GAMUT`.
-   :attr:`colour.models.RGB_COLOURSPACE_S_GAMUT3`.
-   :attr:`colour.models.RGB_COLOURSPACE_S_GAMUT3_CINE`.
-   :attr:`colour.models.RGB_COLOURSPACE_VENICE_S_GAMUT3`.
-   :attr:`colour.models.RGB_COLOURSPACE_VENICE_S_GAMUT3_CINE`.

Notes
-----
-   The *Venice S-Gamut3* and *Venice S-Gamut3.Cine* primaries and whitepoint
    were derived with the following `Google Colab Notebook \
<https://colab.research.google.com/drive/1ZGTij7jT8eZRMPUkyWlv_x5ix5Q5twMB>`__.

References
----------
-   :cite:`Gaggioni` : Gaggioni, H., Dhanendra, P., Yamashita, J., Kawada, N.,
    Endo, K., & Clark, C. (n.d.). S-Log: A new LUT for digital production
    mastering and interchange applications (Vol. 709, pp. 1-13).
    http://pro.sony.com/bbsccms/assets/files/mkt/cinema/solutions/slog_manual.pdf
-   :cite:`SonyCorporation` : Sony Corporation. (n.d.). S-Log Whitepaper (pp.
    1-17). http://www.theodoropoulos.info/attachments/076_on%20S-Log.pdf
-   :cite:`SonyCorporationd` : Sony Corporation. (n.d.). Technical Summary
    for S-Gamut3.Cine/S-Log3 and S-Gamut3/S-Log3 (pp. 1-7).
    http://community.sony.com/sony/attachments/sony/\
large-sensor-camera-F5-F55/12359/2/\
TechnicalSummary_for_S-Gamut3Cine_S-Gamut3_S-Log3_V1_00.pdf
-   :cite:`SonyCorporatione` : Sony Corporation. (n.d.).
    S-Gamut3_S-Gamut3Cine_Matrix.xlsx.
    https://community.sony.com/sony/attachments/sony/\
large-sensor-camera-F5-F55/12359/3/S-Gamut3_S-Gamut3Cine_Matrix.xlsx
-   :cite:`SonyElectronicsCorporation2020` : Sony Electronics Corporation.
    (2020). IDT.Sony.Venice_SLog3_SGamut3.ctl. https://github.com/ampas/\
aces-dev/blob/710ecbe52c87ce9f4a1e02c8ddf7ea0d6b611cc8/transforms/ctl/idt/\
vendorSupplied/sony/IDT.Sony.Venice_SLog3_SGamut3.ctl
-   :cite:`SonyElectronicsCorporation2020a` : Sony Electronics Corporation.
    (2020). IDT.Sony.Venice_SLog3_SGamut3Cine.ctl. https://github.com/ampas/\
aces-dev/blob/710ecbe52c87ce9f4a1e02c8ddf7ea0d6b611cc8/transforms/ctl/idt/\
vendorSupplied/sony/IDT.Sony.Venice_SLog3_SGamut3Cine.ctl
"""

from __future__ import division, unicode_literals

import numpy as np

from colour.colorimetry import CCS_ILLUMINANTS
from colour.models.rgb import (RGB_Colourspace, log_encoding_SLog2,
                               log_decoding_SLog2, log_encoding_SLog3,
                               log_decoding_SLog3, normalised_primary_matrix)

__author__ = 'Colour Developers'
__copyright__ = 'Copyright (C) 2013-2020 - Colour Developers'
__license__ = 'New BSD License - https://opensource.org/licenses/BSD-3-Clause'
__maintainer__ = 'Colour Developers'
__email__ = 'colour-developers@colour-science.org'
__status__ = 'Production'

__all__ = [
    'PRIMARIES_S_GAMUT', 'WHITEPOINT_NAME_S_GAMUT', 'CCS_WHITEPOINT_S_GAMUT',
    'MATRIX_S_GAMUT_TO_XYZ', 'MATRIX_XYZ_TO_S_GAMUT',
    'RGB_COLOURSPACE_S_GAMUT', 'PRIMARIES_S_GAMUT3',
    'WHITEPOINT_NAME_S_GAMUT3', 'CCS_WHITEPOINT_S_GAMUT3',
    'MATRIX_S_GAMUT3_TO_XYZ', 'MATRIX_XYZ_TO_S_GAMUT3',
    'RGB_COLOURSPACE_S_GAMUT3', 'PRIMARIES_S_GAMUT3_CINE',
    'WHITEPOINT_NAME_S_GAMUT3_CINE', 'CCS_WHITEPOINT_S_GAMUT3_CINE',
    'MATRIX_S_GAMUT3_CINE_TO_XYZ', 'MATRIX_XYZ_TO_S_GAMUT3_CINE',
    'RGB_COLOURSPACE_S_GAMUT3_CINE', 'PRIMARIES_VENICE_S_GAMUT3',
    'WHITEPOINT_NAME_VENICE_S_GAMUT3', 'CCS_WHITEPOINT_VENICE_S_GAMUT3',
    'MATRIX_VENICE_S_GAMUT3_TO_XYZ', 'MATRIX_XYZ_TO_VENICE_S_GAMUT3',
    'RGB_COLOURSPACE_VENICE_S_GAMUT3', 'PRIMARIES_VENICE_S_GAMUT3_CINE',
    'WHITEPOINT_NAME_VENICE_S_GAMUT3_CINE',
    'CCS_WHITEPOINT_VENICE_S_GAMUT3_CINE',
    'MATRIX_VENICE_S_GAMUT3_CINE_TO_XYZ', 'MATRIX_XYZ_TO_VENICE_S_GAMUT3_CINE',
    'RGB_COLOURSPACE_VENICE_S_GAMUT3_CINE'
]

PRIMARIES_S_GAMUT = np.array([
    [0.7300, 0.2800],
    [0.1400, 0.8550],
    [0.1000, -0.0500],
])
"""
*S-Gamut* colourspace primaries.

PRIMARIES_S_GAMUT : ndarray, (3, 2)
"""

WHITEPOINT_NAME_S_GAMUT = 'D65'
"""
*S-Gamut* colourspace whitepoint name.

WHITEPOINT_NAME_S_GAMUT : unicode
"""

CCS_WHITEPOINT_S_GAMUT = (CCS_ILLUMINANTS[
    'CIE 1931 2 Degree Standard Observer'][WHITEPOINT_NAME_S_GAMUT])
"""
*S-Gamut* colourspace whitepoint chromaticity coordinates.

CCS_WHITEPOINT_S_GAMUT : ndarray
"""

MATRIX_S_GAMUT_TO_XYZ = np.array([
    [0.7064827132, 0.1288010498, 0.1151721641],
    [0.2709796708, 0.7866064112, -0.0575860820],
    [-0.0096778454, 0.0046000375, 1.0941355587],
])
"""
*S-Gamut* colourspace to *CIE XYZ* tristimulus values matrix.

MATRIX_S_GAMUT_TO_XYZ : array_like, (3, 3)
"""

MATRIX_XYZ_TO_S_GAMUT = np.array([
    [1.5073998991, -0.2458221374, -0.1716116808],
    [-0.5181517271, 1.3553912409, 0.1258786682],
    [0.0155116982, -0.0078727714, 0.9119163656],
])
"""
*CIE XYZ* tristimulus values to *S-Gamut* colourspace matrix.

MATRIX_XYZ_TO_S_GAMUT : array_like, (3, 3)
"""

RGB_COLOURSPACE_S_GAMUT = RGB_Colourspace(
    'S-Gamut',
    PRIMARIES_S_GAMUT,
    CCS_WHITEPOINT_S_GAMUT,
    WHITEPOINT_NAME_S_GAMUT,
    MATRIX_S_GAMUT_TO_XYZ,
    MATRIX_XYZ_TO_S_GAMUT,
    log_encoding_SLog2,
    log_decoding_SLog2,
)
RGB_COLOURSPACE_S_GAMUT.__doc__ = """
*S-Gamut* colourspace.

References
----------
:cite:`Gaggioni`, :cite:`SonyCorporation`

RGB_COLOURSPACE_S_GAMUT : RGB_Colourspace
"""

PRIMARIES_S_GAMUT3 = PRIMARIES_S_GAMUT
"""
*S-Gamut3* colourspace primaries.

PRIMARIES_S_GAMUT3 : ndarray, (3, 2)
"""

WHITEPOINT_NAME_S_GAMUT3 = WHITEPOINT_NAME_S_GAMUT
"""
*S-Gamut3* colourspace whitepoint name.

WHITEPOINT_NAME_S_GAMUT3 : unicode
"""

CCS_WHITEPOINT_S_GAMUT3 = CCS_WHITEPOINT_S_GAMUT
"""
*S-Gamut3* colourspace whitepoint chromaticity coordinates.

CCS_WHITEPOINT_S_GAMUT3 : ndarray
"""

MATRIX_S_GAMUT3_TO_XYZ = MATRIX_S_GAMUT_TO_XYZ
"""
*S-Gamut3* colourspace to *CIE XYZ* tristimulus values matrix.

MATRIX_S_GAMUT3_TO_XYZ : array_like, (3, 3)
"""

MATRIX_XYZ_TO_S_GAMUT3 = MATRIX_XYZ_TO_S_GAMUT
"""
*CIE XYZ* tristimulus values to *S-Gamut3* colourspace matrix.

MATRIX_XYZ_TO_S_GAMUT3 : array_like, (3, 3)
"""

RGB_COLOURSPACE_S_GAMUT3 = RGB_Colourspace(
    'S-Gamut3',
    PRIMARIES_S_GAMUT3,
    CCS_WHITEPOINT_S_GAMUT3,
    WHITEPOINT_NAME_S_GAMUT3,
    MATRIX_S_GAMUT3_TO_XYZ,
    MATRIX_XYZ_TO_S_GAMUT3,
    log_encoding_SLog3,
    log_decoding_SLog3,
)
RGB_COLOURSPACE_S_GAMUT3.__doc__ = """
*S-Gamut3* colourspace.

References
----------
:cite:`SonyCorporationd`

RGB_COLOURSPACE_S_GAMUT3 : RGB_Colourspace
"""

PRIMARIES_S_GAMUT3_CINE = np.array([
    [0.76600, 0.27500],
    [0.22500, 0.80000],
    [0.08900, -0.08700],
])
"""
*S-Gamut3.Cine* colourspace primaries.

PRIMARIES_S_GAMUT3_CINE : ndarray, (3, 2)
"""

WHITEPOINT_NAME_S_GAMUT3_CINE = WHITEPOINT_NAME_S_GAMUT
"""
*S-Gamut3.Cine* colourspace whitepoint name.

WHITEPOINT_NAME_S_GAMUT3_CINE : unicode
"""

CCS_WHITEPOINT_S_GAMUT3_CINE = CCS_WHITEPOINT_S_GAMUT
"""
*S-Gamut3.Cine* colourspace whitepoint chromaticity coordinates.

CCS_WHITEPOINT_S_GAMUT3_CINE : ndarray
"""

MATRIX_S_GAMUT3_CINE_TO_XYZ = np.array([
    [0.5990839208, 0.2489255161, 0.1024464902],
    [0.2150758201, 0.8850685017, -0.1001443219],
    [-0.0320658495, -0.0276583907, 1.1487819910],
])
"""
*S-Gamut3.Cine* colourspace to *CIE XYZ* tristimulus values matrix.

MATRIX_S_GAMUT3_CINE_TO_XYZ : array_like, (3, 3)
"""

MATRIX_XYZ_TO_S_GAMUT3_CINE = np.array([
    [1.8467789693, -0.5259861230, -0.2105452114],
    [-0.4441532629, 1.2594429028, 0.1493999729],
    [0.0408554212, 0.0156408893, 0.8682072487],
])
"""
*CIE XYZ* tristimulus values to *S-Gamut3.Cine* colourspace matrix.

MATRIX_XYZ_TO_S_GAMUT3_CINE : array_like, (3, 3)
"""

RGB_COLOURSPACE_S_GAMUT3_CINE = RGB_Colourspace(
    'S-Gamut3.Cine',
    PRIMARIES_S_GAMUT3_CINE,
    CCS_WHITEPOINT_S_GAMUT3_CINE,
    WHITEPOINT_NAME_S_GAMUT3_CINE,
    MATRIX_S_GAMUT3_CINE_TO_XYZ,
    MATRIX_XYZ_TO_S_GAMUT3_CINE,
    log_encoding_SLog3,
    log_decoding_SLog3,
)
RGB_COLOURSPACE_S_GAMUT3_CINE.__doc__ = """
*S-Gamut3.Cine* colourspace.

References
----------
:cite:`SonyCorporatione`

RGB_COLOURSPACE_S_GAMUT3_CINE : RGB_Colourspace
"""

PRIMARIES_VENICE_S_GAMUT3 = np.array([
    [0.740464264304292, 0.279364374750660],
    [0.089241145423286, 0.893809528608105],
    [0.110488236673827, -0.052579333080476],
])
"""
*Venice S-Gamut3* colourspace primaries.

PRIMARIES_VENICE_S_GAMUT3 : ndarray, (3, 2)
"""

WHITEPOINT_NAME_VENICE_S_GAMUT3 = WHITEPOINT_NAME_S_GAMUT
"""
*Venice S-Gamut3* colourspace whitepoint name.

WHITEPOINT_NAME_VENICE_S_GAMUT3 : unicode
"""

CCS_WHITEPOINT_VENICE_S_GAMUT3 = CCS_WHITEPOINT_S_GAMUT
"""
*Venice S-Gamut3* colourspace whitepoint chromaticity coordinates.

CCS_WHITEPOINT_VENICE_S_GAMUT3 : ndarray
"""

MATRIX_VENICE_S_GAMUT3_TO_XYZ = normalised_primary_matrix(
    PRIMARIES_VENICE_S_GAMUT3, CCS_WHITEPOINT_VENICE_S_GAMUT3)
"""
*Venice S-Gamut3* colourspace to *CIE XYZ* tristimulus values matrix.

MATRIX_VENICE_S_GAMUT3_TO_XYZ : array_like, (3, 3)
"""

MATRIX_XYZ_TO_VENICE_S_GAMUT3 = np.linalg.inv(MATRIX_VENICE_S_GAMUT3_TO_XYZ)
"""
*CIE XYZ* tristimulus values to *Venice S-Gamut3* colourspace matrix.

MATRIX_XYZ_TO_VENICE_S_GAMUT3 : array_like, (3, 3)
"""

RGB_COLOURSPACE_VENICE_S_GAMUT3 = RGB_Colourspace(
    'Venice S-Gamut3',
    PRIMARIES_VENICE_S_GAMUT3,
    CCS_WHITEPOINT_VENICE_S_GAMUT3,
    WHITEPOINT_NAME_VENICE_S_GAMUT3,
    MATRIX_VENICE_S_GAMUT3_TO_XYZ,
    MATRIX_XYZ_TO_VENICE_S_GAMUT3,
    log_encoding_SLog3,
    log_decoding_SLog3,
)
RGB_COLOURSPACE_VENICE_S_GAMUT3.__doc__ = """
*Venice S-Gamut3* colourspace.

References
----------
:cite:`SonyElectronicsCorporation2020`

RGB_COLOURSPACE_VENICE_S_GAMUT3 : RGB_Colourspace
"""

PRIMARIES_VENICE_S_GAMUT3_CINE = np.array([
    [0.775901871567345, 0.274502392854799],
    [0.188682902773355, 0.828684937020288],
    [0.101337382499301, -0.089187517306263],
])
"""
*Venice S-Gamut3.Cine* colourspace primaries.

PRIMARIES_VENICE_S_GAMUT3_CINE : ndarray, (3, 2)
"""

WHITEPOINT_NAME_VENICE_S_GAMUT3_CINE = WHITEPOINT_NAME_S_GAMUT
"""
*Venice S-Gamut3.Cine* colourspace whitepoint name.

WHITEPOINT_NAME_VENICE_S_GAMUT3_CINE : unicode
"""

CCS_WHITEPOINT_VENICE_S_GAMUT3_CINE = CCS_WHITEPOINT_S_GAMUT
"""
*Venice S-Gamut3.Cine* colourspace whitepoint chromaticity coordinates.

CCS_WHITEPOINT_VENICE_S_GAMUT3_CINE : ndarray
"""

MATRIX_VENICE_S_GAMUT3_CINE_TO_XYZ = normalised_primary_matrix(
    PRIMARIES_VENICE_S_GAMUT3_CINE, CCS_WHITEPOINT_VENICE_S_GAMUT3_CINE)
"""
*Venice S-Gamut3.Cine* colourspace to *CIE XYZ* tristimulus values matrix.

MATRIX_VENICE_S_GAMUT3_CINE_TO_XYZ : array_like, (3, 3)
"""

MATRIX_XYZ_TO_VENICE_S_GAMUT3_CINE = np.linalg.inv(
    MATRIX_VENICE_S_GAMUT3_CINE_TO_XYZ)
"""
*CIE XYZ* tristimulus values to *Venice S-Gamut3.Cine* colourspace matrix.

MATRIX_XYZ_TO_VENICE_S_GAMUT3_CINE : array_like, (3, 3)
"""

RGB_COLOURSPACE_VENICE_S_GAMUT3_CINE = RGB_Colourspace(
    'Venice S-Gamut3.Cine',
    PRIMARIES_VENICE_S_GAMUT3_CINE,
    CCS_WHITEPOINT_VENICE_S_GAMUT3_CINE,
    WHITEPOINT_NAME_VENICE_S_GAMUT3_CINE,
    MATRIX_VENICE_S_GAMUT3_CINE_TO_XYZ,
    MATRIX_XYZ_TO_VENICE_S_GAMUT3_CINE,
    log_encoding_SLog3,
    log_decoding_SLog3,
)
RGB_COLOURSPACE_VENICE_S_GAMUT3_CINE.__doc__ = """
*Venice S-Gamut3.Cine* colourspace.

References
----------
:cite:`SonyElectronicsCorporation2020a`

RGB_COLOURSPACE_VENICE_S_GAMUT3_CINE : RGB_Colourspace
"""

[((82, 20, 86, 2), 'numpy.array', 'np.array', ({(82, 29, 86, 1): '[[0.73, 0.28], [0.14, 0.855], [0.1, -0.05]]'}, {}), '([[0.73, 0.28], [0.14, 0.855], [0.1, -0.05]])', True, 'import numpy as np\n'), ((108, 24, 112, 2), 'numpy.array', 'np.array', ({(108, 33, 112, 1): '[[0.7064827132, 0.1288010498, 0.1151721641], [0.2709796708, 0.7866064112, -\n    0.057586082], [-0.0096778454, 0.0046000375, 1.0941355587]]'}, {}), '([[0.7064827132, 0.1288010498, 0.1151721641], [0.2709796708, \n    0.7866064112, -0.057586082], [-0.0096778454, 0.0046000375, 1.0941355587]])', True, 'import numpy as np\n'), ((119, 24, 123, 2), 'numpy.array', 'np.array', ({(119, 33, 123, 1): '[[1.5073998991, -0.2458221374, -0.1716116808], [-0.5181517271, 1.3553912409,\n    0.1258786682], [0.0155116982, -0.0078727714, 0.9119163656]]'}, {}), '([[1.5073998991, -0.2458221374, -0.1716116808], [-0.5181517271, \n    1.3553912409, 0.1258786682], [0.0155116982, -0.0078727714, 0.9119163656]])', True, 'import numpy as np\n'), ((130, 26, 139, 1), 'colour.models.rgb.RGB_Colourspace', 'RGB_Colourspace', ({(131, 4, 131, 13): '"""S-Gamut"""', (132, 4, 132, 21): 'PRIMARIES_S_GAMUT', (133, 4, 133, 26): 'CCS_WHITEPOINT_S_GAMUT', (134, 4, 134, 27): 'WHITEPOINT_NAME_S_GAMUT', (135, 4, 135, 25): 'MATRIX_S_GAMUT_TO_XYZ', (136, 4, 136, 25): 'MATRIX_XYZ_TO_S_GAMUT', (137, 4, 137, 22): 'log_encoding_SLog2', (138, 4, 138, 22): 'log_decoding_SLog2'}, {}), "('S-Gamut', PRIMARIES_S_GAMUT, CCS_WHITEPOINT_S_GAMUT,\n    WHITEPOINT_NAME_S_GAMUT, MATRIX_S_GAMUT_TO_XYZ, MATRIX_XYZ_TO_S_GAMUT,\n    log_encoding_SLog2, log_decoding_SLog2)", False, 'from colour.models.rgb import RGB_Colourspace, log_encoding_SLog2, log_decoding_SLog2, log_encoding_SLog3, log_decoding_SLog3, normalised_primary_matrix\n'), ((185, 27, 194, 1), 'colour.models.rgb.RGB_Colourspace', 'RGB_Colourspace', ({(186, 4, 186, 14): '"""S-Gamut3"""', (187, 4, 187, 22): 'PRIMARIES_S_GAMUT3', (188, 4, 188, 27): 'CCS_WHITEPOINT_S_GAMUT3', (189, 4, 189, 28): 'WHITEPOINT_NAME_S_GAMUT3', (190, 4, 190, 26): 'MATRIX_S_GAMUT3_TO_XYZ', (191, 4, 191, 26): 'MATRIX_XYZ_TO_S_GAMUT3', (192, 4, 192, 22): 'log_encoding_SLog3', (193, 4, 193, 22): 'log_decoding_SLog3'}, {}), "('S-Gamut3', PRIMARIES_S_GAMUT3, CCS_WHITEPOINT_S_GAMUT3,\n    WHITEPOINT_NAME_S_GAMUT3, MATRIX_S_GAMUT3_TO_XYZ,\n    MATRIX_XYZ_TO_S_GAMUT3, log_encoding_SLog3, log_decoding_SLog3)", False, 'from colour.models.rgb import RGB_Colourspace, log_encoding_SLog2, log_decoding_SLog2, log_encoding_SLog3, log_decoding_SLog3, normalised_primary_matrix\n'), ((205, 26, 209, 2), 'numpy.array', 'np.array', ({(205, 35, 209, 1): '[[0.766, 0.275], [0.225, 0.8], [0.089, -0.087]]'}, {}), '([[0.766, 0.275], [0.225, 0.8], [0.089, -0.087]])', True, 'import numpy as np\n'), ((230, 30, 234, 2), 'numpy.array', 'np.array', ({(230, 39, 234, 1): '[[0.5990839208, 0.2489255161, 0.1024464902], [0.2150758201, 0.8850685017, -\n    0.1001443219], [-0.0320658495, -0.0276583907, 1.148781991]]'}, {}), '([[0.5990839208, 0.2489255161, 0.1024464902], [0.2150758201, \n    0.8850685017, -0.1001443219], [-0.0320658495, -0.0276583907, 1.148781991]])', True, 'import numpy as np\n'), ((241, 30, 245, 2), 'numpy.array', 'np.array', ({(241, 39, 245, 1): '[[1.8467789693, -0.525986123, -0.2105452114], [-0.4441532629, 1.2594429028,\n    0.1493999729], [0.0408554212, 0.0156408893, 0.8682072487]]'}, {}), '([[1.8467789693, -0.525986123, -0.2105452114], [-0.4441532629, \n    1.2594429028, 0.1493999729], [0.0408554212, 0.0156408893, 0.8682072487]])', True, 'import numpy as np\n'), ((252, 32, 261, 1), 'colour.models.rgb.RGB_Colourspace', 'RGB_Colourspace', ({(253, 4, 253, 19): '"""S-Gamut3.Cine"""', (254, 4, 254, 27): 'PRIMARIES_S_GAMUT3_CINE', (255, 4, 255, 32): 'CCS_WHITEPOINT_S_GAMUT3_CINE', (256, 4, 256, 33): 'WHITEPOINT_NAME_S_GAMUT3_CINE', (257, 4, 257, 31): 'MATRIX_S_GAMUT3_CINE_TO_XYZ', (258, 4, 258, 31): 'MATRIX_XYZ_TO_S_GAMUT3_CINE', (259, 4, 259, 22): 'log_encoding_SLog3', (260, 4, 260, 22): 'log_decoding_SLog3'}, {}), "('S-Gamut3.Cine', PRIMARIES_S_GAMUT3_CINE,\n    CCS_WHITEPOINT_S_GAMUT3_CINE, WHITEPOINT_NAME_S_GAMUT3_CINE,\n    MATRIX_S_GAMUT3_CINE_TO_XYZ, MATRIX_XYZ_TO_S_GAMUT3_CINE,\n    log_encoding_SLog3, log_decoding_SLog3)", False, 'from colour.models.rgb import RGB_Colourspace, log_encoding_SLog2, log_decoding_SLog2, log_encoding_SLog3, log_decoding_SLog3, normalised_primary_matrix\n'), ((272, 28, 276, 2), 'numpy.array', 'np.array', ({(272, 37, 276, 1): '[[0.740464264304292, 0.27936437475066], [0.089241145423286, \n    0.893809528608105], [0.110488236673827, -0.052579333080476]]'}, {}), '([[0.740464264304292, 0.27936437475066], [0.089241145423286, \n    0.893809528608105], [0.110488236673827, -0.052579333080476]])', True, 'import numpy as np\n'), ((297, 32, 298, 62), 'colour.models.rgb.normalised_primary_matrix', 'normalised_primary_matrix', ({(298, 4, 298, 29): 'PRIMARIES_VENICE_S_GAMUT3', (298, 31, 298, 61): 'CCS_WHITEPOINT_VENICE_S_GAMUT3'}, {}), '(PRIMARIES_VENICE_S_GAMUT3,\n    CCS_WHITEPOINT_VENICE_S_GAMUT3)', False, 'from colour.models.rgb import RGB_Colourspace, log_encoding_SLog2, log_decoding_SLog2, log_encoding_SLog3, log_decoding_SLog3, normalised_primary_matrix\n'), ((305, 32, 305, 76), 'numpy.linalg.inv', 'np.linalg.inv', ({(305, 46, 305, 75): 'MATRIX_VENICE_S_GAMUT3_TO_XYZ'}, {}), '(MATRIX_VENICE_S_GAMUT3_TO_XYZ)', True, 'import numpy as np\n'), ((312, 34, 321, 1), 'colour.models.rgb.RGB_Colourspace', 'RGB_Colourspace', ({(313, 4, 313, 21): '"""Venice S-Gamut3"""', (314, 4, 314, 29): 'PRIMARIES_VENICE_S_GAMUT3', (315, 4, 315, 34): 'CCS_WHITEPOINT_VENICE_S_GAMUT3', (316, 4, 316, 35): 'WHITEPOINT_NAME_VENICE_S_GAMUT3', (317, 4, 317, 33): 'MATRIX_VENICE_S_GAMUT3_TO_XYZ', (318, 4, 318, 33): 'MATRIX_XYZ_TO_VENICE_S_GAMUT3', (319, 4, 319, 22): 'log_encoding_SLog3', (320, 4, 320, 22): 'log_decoding_SLog3'}, {}), "('Venice S-Gamut3', PRIMARIES_VENICE_S_GAMUT3,\n    CCS_WHITEPOINT_VENICE_S_GAMUT3, WHITEPOINT_NAME_VENICE_S_GAMUT3,\n    MATRIX_VENICE_S_GAMUT3_TO_XYZ, MATRIX_XYZ_TO_VENICE_S_GAMUT3,\n    log_encoding_SLog3, log_decoding_SLog3)", False, 'from colour.models.rgb import RGB_Colourspace, log_encoding_SLog2, log_decoding_SLog2, log_encoding_SLog3, log_decoding_SLog3, normalised_primary_matrix\n'), ((332, 33, 336, 2), 'numpy.array', 'np.array', ({(332, 42, 336, 1): '[[0.775901871567345, 0.274502392854799], [0.188682902773355, \n    0.828684937020288], [0.101337382499301, -0.089187517306263]]'}, {}), '([[0.775901871567345, 0.274502392854799], [0.188682902773355, \n    0.828684937020288], [0.101337382499301, -0.089187517306263]])', True, 'import numpy as np\n'), ((357, 37, 358, 72), 'colour.models.rgb.normalised_primary_matrix', 'normalised_primary_matrix', ({(358, 4, 358, 34): 'PRIMARIES_VENICE_S_GAMUT3_CINE', (358, 36, 358, 71): 'CCS_WHITEPOINT_VENICE_S_GAMUT3_CINE'}, {}), '(PRIMARIES_VENICE_S_GAMUT3_CINE,\n    CCS_WHITEPOINT_VENICE_S_GAMUT3_CINE)', False, 'from colour.models.rgb import RGB_Colourspace, log_encoding_SLog2, log_decoding_SLog2, log_encoding_SLog3, log_decoding_SLog3, normalised_primary_matrix\n'), ((365, 37, 366, 39), 'numpy.linalg.inv', 'np.linalg.inv', ({(366, 4, 366, 38): 'MATRIX_VENICE_S_GAMUT3_CINE_TO_XYZ'}, {}), '(MATRIX_VENICE_S_GAMUT3_CINE_TO_XYZ)', True, 'import numpy as np\n'), ((373, 39, 382, 1), 'colour.models.rgb.RGB_Colourspace', 'RGB_Colourspace', ({(374, 4, 374, 26): '"""Venice S-Gamut3.Cine"""', (375, 4, 375, 34): 'PRIMARIES_VENICE_S_GAMUT3_CINE', (376, 4, 376, 39): 'CCS_WHITEPOINT_VENICE_S_GAMUT3_CINE', (377, 4, 377, 40): 'WHITEPOINT_NAME_VENICE_S_GAMUT3_CINE', (378, 4, 378, 38): 'MATRIX_VENICE_S_GAMUT3_CINE_TO_XYZ', (379, 4, 379, 38): 'MATRIX_XYZ_TO_VENICE_S_GAMUT3_CINE', (380, 4, 380, 22): 'log_encoding_SLog3', (381, 4, 381, 22): 'log_decoding_SLog3'}, {}), "('Venice S-Gamut3.Cine', PRIMARIES_VENICE_S_GAMUT3_CINE,\n    CCS_WHITEPOINT_VENICE_S_GAMUT3_CINE,\n    WHITEPOINT_NAME_VENICE_S_GAMUT3_CINE,\n    MATRIX_VENICE_S_GAMUT3_CINE_TO_XYZ, MATRIX_XYZ_TO_VENICE_S_GAMUT3_CINE,\n    log_encoding_SLog3, log_decoding_SLog3)", False, 'from colour.models.rgb import RGB_Colourspace, log_encoding_SLog2, log_decoding_SLog2, log_encoding_SLog3, log_decoding_SLog3, normalised_primary_matrix\n')]