Skip to content

Commit

Permalink
Rename "colour.ALEXA_WIDE_GAMUT_RGB_COLOURSPACE" class to "colour.ALE…
Browse files Browse the repository at this point in the history
…XA_WIDE_GAMUT_COLOURSPACE".

References #341.
  • Loading branch information
KelSolaar committed Nov 19, 2017
1 parent a54f8f1 commit 67a9fd1
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 107 deletions.
6 changes: 3 additions & 3 deletions colour/models/rgb/dataset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .aces_it import ACES_RICD
from .adobe_rgb_1998 import ADOBE_RGB_1998_COLOURSPACE
from .adobe_wide_gamut_rgb import ADOBE_WIDE_GAMUT_RGB_COLOURSPACE
from .alexa_wide_gamut_rgb import ALEXA_WIDE_GAMUT_RGB_COLOURSPACE
from .alexa_wide_gamut import ALEXA_WIDE_GAMUT_COLOURSPACE
from .apple_rgb import APPLE_RGB_COLOURSPACE
from .best_rgb import BEST_RGB_COLOURSPACE
from .beta_rgb import BETA_RGB_COLOURSPACE
Expand Down Expand Up @@ -50,7 +50,7 @@
ACES_CG_COLOURSPACE.name: ACES_CG_COLOURSPACE,
ADOBE_RGB_1998_COLOURSPACE.name: ADOBE_RGB_1998_COLOURSPACE,
ADOBE_WIDE_GAMUT_RGB_COLOURSPACE.name: ADOBE_WIDE_GAMUT_RGB_COLOURSPACE,
ALEXA_WIDE_GAMUT_RGB_COLOURSPACE.name: ALEXA_WIDE_GAMUT_RGB_COLOURSPACE,
ALEXA_WIDE_GAMUT_COLOURSPACE.name: ALEXA_WIDE_GAMUT_COLOURSPACE,
APPLE_RGB_COLOURSPACE.name: APPLE_RGB_COLOURSPACE,
BEST_RGB_COLOURSPACE.name: BEST_RGB_COLOURSPACE,
BETA_RGB_COLOURSPACE.name: BETA_RGB_COLOURSPACE,
Expand Down Expand Up @@ -116,7 +116,7 @@
'ACES_2065_1_COLOURSPACE', 'ACES_CC_COLOURSPACE', 'ACES_CCT_COLOURSPACE',
'ACES_PROXY_COLOURSPACE', 'ACES_CG_COLOURSPACE',
'ADOBE_RGB_1998_COLOURSPACE', 'ADOBE_WIDE_GAMUT_RGB_COLOURSPACE',
'ALEXA_WIDE_GAMUT_RGB_COLOURSPACE', 'APPLE_RGB_COLOURSPACE',
'ALEXA_WIDE_GAMUT_COLOURSPACE', 'APPLE_RGB_COLOURSPACE',
'BEST_RGB_COLOURSPACE', 'BETA_RGB_COLOURSPACE', 'BT470_525_COLOURSPACE',
'BT470_625_COLOURSPACE', 'BT709_COLOURSPACE', 'BT2020_COLOURSPACE',
'CIE_RGB_COLOURSPACE', 'CINEMA_GAMUT_COLOURSPACE',
Expand Down
103 changes: 103 additions & 0 deletions colour/models/rgb/dataset/alexa_wide_gamut.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ALEXA Wide Gamut Colourspace
============================
Defines the *ALEXA Wide Gamut* colourspace:
- :attr:`ALEXA_WIDE_GAMUT_COLOURSPACE`.
See Also
--------
`RGB Colourspaces Jupyter Notebook
<http://nbviewer.jupyter.org/github/colour-science/colour-notebooks/\
blob/master/notebooks/models/rgb.ipynb>`_
References
----------
.. [1] ARRI. (2012). ALEXA - Log C Curve - Usage in VFX. Retrieved from
http://www.arri.com/?eID=registration&file_uid=8026
"""

from __future__ import division, unicode_literals

import numpy as np

from colour.colorimetry import ILLUMINANTS
from colour.models.rgb import (RGB_Colourspace, log_encoding_ALEXALogC,
log_decoding_ALEXALogC)

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

__all__ = [
'ALEXA_WIDE_GAMUT_PRIMARIES', 'ALEXA_WIDE_GAMUT_ILLUMINANT',
'ALEXA_WIDE_GAMUT_WHITEPOINT', 'ALEXA_WIDE_GAMUT_TO_XYZ_MATRIX',
'XYZ_TO_ALEXA_WIDE_GAMUT_MATRIX', 'ALEXA_WIDE_GAMUT_COLOURSPACE'
]

ALEXA_WIDE_GAMUT_PRIMARIES = np.array(
[[0.6840, 0.3130],
[0.2210, 0.8480],
[0.0861, -0.1020]]) # yapf: disable
"""
*ALEXA Wide Gamut* colourspace primaries.
ALEXA_WIDE_GAMUT_PRIMARIES : ndarray, (3, 2)
"""

ALEXA_WIDE_GAMUT_ILLUMINANT = 'D65'
"""
*ALEXA Wide Gamut* colourspace whitepoint name as illuminant.
ALEXA_WIDE_GAMUT_WHITEPOINT : unicode
"""

ALEXA_WIDE_GAMUT_WHITEPOINT = (
ILLUMINANTS['CIE 1931 2 Degree Standard Observer']
[ALEXA_WIDE_GAMUT_ILLUMINANT]) # yapf: disable
"""
*ALEXA Wide Gamut* colourspace whitepoint.
ALEXA_WIDE_GAMUT_WHITEPOINT : ndarray
"""

ALEXA_WIDE_GAMUT_TO_XYZ_MATRIX = np.array(
[[0.638008, 0.214704, 0.097744],
[0.291954, 0.823841, -0.115795],
[0.002798, -0.067034, 1.153294]]) # yapf: disable
"""
*ALEXA Wide Gamut* colourspace to *CIE XYZ* tristimulus values matrix.
ALEXA_WIDE_GAMUT_TO_XYZ_MATRIX : array_like, (3, 3)
"""

XYZ_TO_ALEXA_WIDE_GAMUT_MATRIX = np.array(
[[1.789066, -0.482534, -0.200076],
[-0.639849, 1.396400, 0.194432],
[-0.041532, 0.082335, 0.878868]]) # yapf: disable
"""
*CIE XYZ* tristimulus values to *ALEXA Wide Gamut* colourspace matrix.
XYZ_TO_ALEXA_WIDE_GAMUT_MATRIX : array_like, (3, 3)
"""

ALEXA_WIDE_GAMUT_COLOURSPACE = RGB_Colourspace(
'ALEXA Wide Gamut',
ALEXA_WIDE_GAMUT_PRIMARIES,
ALEXA_WIDE_GAMUT_WHITEPOINT,
ALEXA_WIDE_GAMUT_ILLUMINANT,
ALEXA_WIDE_GAMUT_TO_XYZ_MATRIX,
XYZ_TO_ALEXA_WIDE_GAMUT_MATRIX,
log_encoding_ALEXALogC,
log_decoding_ALEXALogC) # yapf: disable
"""
*ALEXA Wide Gamut* colourspace.
ALEXA_WIDE_GAMUT_COLOURSPACE : RGB_Colourspace
"""
103 changes: 0 additions & 103 deletions colour/models/rgb/dataset/alexa_wide_gamut_rgb.py

This file was deleted.

2 changes: 1 addition & 1 deletion colour/models/rgb/tests/test_rgb_colourspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def test_transformation_matrices(self):
tolerance = 1e-4
elif colourspace.name in ('Adobe RGB (1998)', ):
tolerance = 1e-5
elif colourspace.name in ('ALEXA Wide Gamut RGB', 'V-Gamut',
elif colourspace.name in ('ALEXA Wide Gamut', 'V-Gamut',
'REDWideGamutRGB'):
tolerance = 1e-6
else:
Expand Down

0 comments on commit 67a9fd1

Please sign in to comment.