From f4c13862fbfefb94509a34dd67ae2bebe23c2ab7 Mon Sep 17 00:00:00 2001 From: Thomas Mansencal Date: Mon, 7 Nov 2016 23:33:51 +1300 Subject: [PATCH] =?UTF-8?q?Implement=20metadata=20support=20in=20"colour.m?= =?UTF-8?q?odels.rgb.transfer=5Ffunctions.aces=E2=80=9D=20module.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- colour/models/rgb/transfer_functions/aces.py | 75 +++++++++++++++++--- 1 file changed, 64 insertions(+), 11 deletions(-) diff --git a/colour/models/rgb/transfer_functions/aces.py b/colour/models/rgb/transfer_functions/aces.py index 4f5b8878af..2e00645d3c 100644 --- a/colour/models/rgb/transfer_functions/aces.py +++ b/colour/models/rgb/transfer_functions/aces.py @@ -131,6 +131,8 @@ def log_encoding_ACESproxy(lin_AP1, bit_depth=10): Parameters ---------- lin_AP1 : numeric or array_like + metadata : {'type': 'lin AP1', 'symbol': 'lin_\{AP1\}', + 'extent': (-65504, 65504)} *lin_AP1* value. bit_depth : int, optional **{10, 12}**, @@ -139,7 +141,14 @@ def log_encoding_ACESproxy(lin_AP1, bit_depth=10): 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\}'} References ---------- @@ -185,6 +194,8 @@ def log_decoding_ACESproxy(ACESproxy, bit_depth=10): Parameters ---------- ACESproxy : numeric or array_like + metadata : {'type': 'ACESproxy', 'symbol': 'ACES_\{proxy\}', + 'extent': (64, 940)} *ACESproxy* non-linear value. bit_depth : int, optional **{10, 12}**, @@ -193,7 +204,14 @@ def log_decoding_ACESproxy(ACESproxy, bit_depth=10): 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\}'} References ---------- @@ -225,12 +243,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\}'} References ---------- @@ -251,7 +278,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) @@ -263,12 +289,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\}'} References ---------- @@ -301,12 +336,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\}'} References ---------- @@ -340,12 +384,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\}'} References ----------