Skip to content

Commit

Permalink
Implement metadata support in "colour.models.rgb.transfer_functions.a…
Browse files Browse the repository at this point in the history
…ces” module.
  • Loading branch information
KelSolaar committed Jul 9, 2017
1 parent 869d02f commit 877761c
Showing 1 changed file with 66 additions and 13 deletions.
79 changes: 66 additions & 13 deletions colour/models/rgb/transfer_functions/aces.py
Expand Up @@ -125,15 +125,24 @@ def log_encoding_ACESproxy(lin_AP1, bit_depth='10 Bit'):
Parameters
----------
lin_AP1 : numeric or array_like
*lin_AP1* value.
metadata : {'type': 'lin AP1', 'symbol': 'lin_\{AP1\}',
'extent': (-65504, 65504)}
:math:`lin_{AP1}` value.
bit_depth : unicode, optional
**{'10 Bit', '12 Bit'}**,
*ACESproxy* bit depth.
Returns
-------
numeric or ndarray
*ACESproxy* non-linear value.
metadata : {'type': 'ACESproxy', 'symbol': 'ACES_\{proxy\}',
'extent': (64, 940)}
:math:`ACES_{proxy}` non-linear value.
Notes
-----
metadata : {'classifier': 'Log Encoding Curve', 'method_name': 'ACESproxy',
'method_strict_name': 'ACES_\{proxy\}'}
Examples
--------
Expand Down Expand Up @@ -172,15 +181,24 @@ def log_decoding_ACESproxy(ACESproxy, bit_depth='10 Bit'):
Parameters
----------
ACESproxy : numeric or array_like
*ACESproxy* non-linear value.
metadata : {'type': 'ACESproxy', 'symbol': 'ACES_\{proxy\}',
'extent': (64, 940)}
:math:`ACES_{proxy}` non-linear value.
bit_depth : unicode, optional
**{'10 Bit', '12 Bit'}**,
*ACESproxy* bit depth.
Returns
-------
numeric or ndarray
*lin_AP1* value.
metadata : {'type': 'lin AP1', 'symbol': 'lin_\{AP1\}',
'extent': (-65504, 65504)}
:math:`lin_{AP1}` value.
Notes
-----
metadata : {'classifier': 'Log Decoding Curve', 'method_name': 'ACESproxy',
'method_strict_name': 'ACES_\{proxy\}'}
Examples
--------
Expand All @@ -205,12 +223,21 @@ def log_encoding_ACEScc(lin_AP1):
Parameters
----------
lin_AP1 : numeric or array_like
*lin_AP1* value.
metadata : {'type': 'lin AP1', 'symbol': 'lin_\{AP1\}',
'extent': (-65504, 65504)}
:math:`lin_{AP1}` value.
Returns
-------
numeric or ndarray
*ACEScc* non-linear value.
metadata : {'type': 'ACEScc', 'symbol': 'ACES_\{cc\}',
'extent': (-0.358447488584475, 1.467996312044715)}
:math:`ACES_{cc}` non-linear value.
Notes
-----
metadata : {'classifier': 'Log Encoding Curve', 'method_name': 'ACEScc',
'method_strict_name': 'ACES_\{cc\}'}
Examples
--------
Expand All @@ -224,7 +251,6 @@ def log_encoding_ACEScc(lin_AP1):
(np.log2(2 ** -16 + lin_AP1 * 0.5) + 9.72) / 17.52)
output = np.where(lin_AP1 >= 2 ** -15, (np.log2(lin_AP1) + 9.72) / 17.52,
output)

return as_numeric(output)


Expand All @@ -236,12 +262,21 @@ def log_decoding_ACEScc(ACEScc):
Parameters
----------
ACEScc : numeric or array_like
*ACEScc* non-linear value.
metadata : {'type': 'ACEScc', 'symbol': 'ACES_\{cc\}',
'extent': (-0.358447488584475, 1.467996312044715)}
:math:`ACES_{cc}` non-linear value.
Returns
-------
numeric or ndarray
*lin_AP1* value.
metadata : {'type': 'lin AP1', 'symbol': 'lin_\{AP1\}',
'extent': (-65504, 65504)}
:math:`lin_{AP1}` value.
Notes
-----
metadata : {'classifier': 'Log Decoding Curve', 'method_name': 'ACEScc',
'method_strict_name': 'ACES_\{cc\}'}
Examples
--------
Expand All @@ -267,12 +302,21 @@ def log_encoding_ACEScct(lin_AP1):
Parameters
----------
lin_AP1 : numeric or array_like
*lin_AP1* value.
metadata : {'type': 'lin AP1', 'symbol': 'lin_\{AP1\}',
'extent': (-65504, 65504)}
:math:`lin_AP1` value.
Returns
-------
numeric or ndarray
*ACEScct* non-linear value.
metadata : {'type': 'ACEScct', 'symbol': 'ACES_\{cct\}',
'extent': (-690427.660123802255839, 1.467996312044715)}
:math:`ACES_{cct}` non-linear value.
Notes
-----
metadata : {'classifier': 'Log Encoding Curve', 'method_name': 'ACEScct',
'method_strict_name': 'ACES_\{cct\}'}
Examples
--------
Expand All @@ -299,12 +343,21 @@ def log_decoding_ACEScct(ACEScct):
Parameters
----------
ACEScct : numeric or array_like
*ACEScct* non-linear value.
metadata : {'type': 'ACEScct', 'symbol': 'ACES_\{cct\}',
'extent': (-690427.660123802255839, 1.467996312044715)}
:math:`ACES_{cct}` non-linear value.
Returns
-------
numeric or ndarray
*lin_AP1* value.
metadata : {'type': 'lin AP1', 'symbol': 'lin_\{AP1\}',
'extent': (-65504, 65504)}
:math:`lin_AP1` value.
Notes
-----
metadata : {'classifier': 'Log Decoding Curve', 'method_name': 'ACEScct',
'method_strict_name': 'ACES_\{cct\}'}
Examples
--------
Expand Down

0 comments on commit 877761c

Please sign in to comment.