Improve case consistency.
[OpenColorIO-Configs.git] / aces_1.0.0 / python / aces_ocio / create_canon_colorspaces.py
index 1a3dffb..ec419fd 100644 (file)
@@ -26,7 +26,8 @@ def create_c_log(gamut,
                  transfer_function,
                  name,
                  lut_directory,
-                 lut_resolution_1d):
+                 lut_resolution_1d,
+                 aliases):
     """
     Object description.
 
@@ -51,21 +52,22 @@ def create_c_log(gamut,
 
     cs = ColorSpace(name)
     cs.description = name
+    cs.aliases = aliases
     cs.equality_group = ''
     cs.family = 'Canon'
     cs.is_data = False
 
-    def legal_to_full(codeValue):
-        return (codeValue - 64.0) / (940.0 - 64.0)
+    def legal_to_full(code_value):
+        return (code_value - 64.0) / (940.0 - 64.0)
 
-    def c_log_to_linear(codeValue):
+    def c_log_to_linear(code_value):
         # log = fullToLegal(c1 * log10(c2*linear + 1) + c3)
         # linear = (pow(10, (legalToFul(log) - c3)/c1) - 1)/c2
         c1 = 0.529136
         c2 = 10.1596
         c3 = 0.0730597
 
-        linear = (pow(10.0, (legal_to_full(codeValue) - c3) / c1) - 1.0) / c2
+        linear = (pow(10.0, (legal_to_full(code_value) - c3) / c1) - 1.0) / c2
         linear *= 0.9
 
         return linear
@@ -168,7 +170,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         'Canon-Log',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["canonlog_rec709day"])
     colorspaces.append(c_log_1)
 
     c_log_2 = create_c_log(
@@ -176,7 +179,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         'Canon-Log',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["canonlog_rec709tung"])
     colorspaces.append(c_log_2)
 
     c_log_3 = create_c_log(
@@ -184,7 +188,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         'Canon-Log',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["canonlog_dcip3day"])
     colorspaces.append(c_log_3)
 
     c_log_4 = create_c_log(
@@ -192,7 +197,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         'Canon-Log',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["canonlog_dcip3tung"])
     colorspaces.append(c_log_4)
 
     c_log_5 = create_c_log(
@@ -200,7 +206,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         'Canon-Log',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["canonlog_cgamutday"])
     colorspaces.append(c_log_5)
 
     c_log_6 = create_c_log(
@@ -208,7 +215,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         'Canon-Log',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["canonlog_cgamuttung"])
     colorspaces.append(c_log_6)
 
     # Linearization Only
@@ -217,7 +225,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         'Canon-Log',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["crv_canonlog"])
     colorspaces.append(c_log_7)
 
     # Primaries Only
@@ -226,7 +235,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         '',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["lin_rec709day"])
     colorspaces.append(c_log_8)
 
     c_log_9 = create_c_log(
@@ -234,7 +244,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         '',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["lin_rec709tung"])
     colorspaces.append(c_log_9)
 
     c_log_10 = create_c_log(
@@ -242,7 +253,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         '',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["lin_dcip3day"])
     colorspaces.append(c_log_10)
 
     c_log_11 = create_c_log(
@@ -250,7 +262,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         '',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["lin_dcip3tung"])
     colorspaces.append(c_log_11)
 
     c_log_12 = create_c_log(
@@ -258,7 +271,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         '',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["lin_cgamutday"])
     colorspaces.append(c_log_12)
 
     c_log_13 = create_c_log(
@@ -266,7 +280,8 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
         '',
         'Canon-Log',
         lut_directory,
-        lut_resolution_1d)
+        lut_resolution_1d,
+        ["lin_cgamuttung"])
     colorspaces.append(c_log_13)
 
     return colorspaces