Updated to reflect ACES 1.0.1 transforms
[OpenColorIO-Configs.git] / aces_1.0.0 / python / aces_ocio / colorspaces / panasonic.py
index 359ec2e..9e5e094 100644 (file)
@@ -2,7 +2,8 @@
 # -*- coding: utf-8 -*-
 
 """
-Implements support for *Panasonic* colorspaces conversions and transfer functions.
+Implements support for *Panasonic* colorspaces conversions and transfer
+functions.
 """
 
 import array
@@ -26,24 +27,31 @@ __all__ = ['create_v_log',
 
 def create_v_log(gamut,
                  transfer_function,
-                 name,
                  lut_directory,
                  lut_resolution_1d,
                  aliases):
     """
-    Object description.
-
-    Panasonic V-Log to ACES.
+    Creates colorspace covering the conversion from VLog to ACES, with various transfer 
+    functions and encoding gamuts covered
 
     Parameters
     ----------
-    parameter : type
-        Parameter description.
+    gamut : str
+        The name of the encoding gamut to use.
+    transfer_function : str
+        The name of the transfer function to use
+    lut_directory : str or unicode 
+        The directory to use when generating LUTs
+    lut_resolution_1d : int
+        The resolution of generated 1D LUTs
+    aliases : list of str
+        Aliases for this colorspace
 
     Returns
     -------
-    type
-         Return value description.
+    ColorSpace
+         A ColorSpace container class referencing the LUTs, matrices and identifying
+         information for the requested colorspace.
     """
 
     name = '%s - %s' % (transfer_function, gamut)
@@ -65,12 +73,12 @@ def create_v_log(gamut,
         cs.allocation_vars = [-8, 5, 0.00390625]
 
     def v_log_to_linear(x):
-        cutInv = 0.181
+        cut_inv = 0.181
         b = 0.00873
         c = 0.241514
         d = 0.598206
 
-        if (x <= cutInv):
+        if x <= cut_inv:
             return (x - 0.125) / 5.6
         else:
             return pow(10, (x - d) / c) - b
@@ -116,13 +124,15 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
 
     Parameters
     ----------
-    parameter : type
-        Parameter description.
+    lut_directory : str or unicode 
+        The directory to use when generating LUTs
+    lut_resolution_1d : int
+        The resolution of generated 1D LUTs
 
     Returns
     -------
-    type
-         Return value description.
+    list
+         A list of colorspaces for Panasonic cameras and encodings 
     """
 
     colorspaces = []
@@ -131,30 +141,27 @@ def create_colorspaces(lut_directory, lut_resolution_1d):
     v_log_1 = create_v_log(
         'V-Gamut',
         'V-Log',
-        'V-Log',
         lut_directory,
         lut_resolution_1d,
-        ["vlog_vgamut"])
+        ['vlog_vgamut'])
     colorspaces.append(v_log_1)
 
     # Linearization Only
     v_log_2 = create_v_log(
         '',
         'V-Log',
-        'V-Log',
         lut_directory,
         lut_resolution_1d,
-        ["crv_vlog"])
+        ['crv_vlog'])
     colorspaces.append(v_log_2)
 
     # Primaries Only
     v_log_3 = create_v_log(
         'V-Gamut',
         '',
-        'V-Log',
         lut_directory,
         lut_resolution_1d,
-        ["lin_vgamut"])
+        ['lin_vgamut'])
     colorspaces.append(v_log_3)
 
     return colorspaces