From f4f0ba9d74b7424817541185efc2abb45207f69f Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Tue, 16 Dec 2025 18:42:17 -0800 Subject: [PATCH] documentation --- pycmx/cdl.py | 9 ++++++++- pycmx/edit.py | 10 ++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pycmx/cdl.py b/pycmx/cdl.py index 1d87df8..0bba5d0 100644 --- a/pycmx/cdl.py +++ b/pycmx/cdl.py @@ -18,7 +18,14 @@ class Rgb(Generic[T]): class AscSopComponents(Generic[T]): """ Fields in an ASC SOP (Slope-Offset-Power) color transfer function - statement + statement. + + The ASC SOP is a transfer function of the form: + + :math:`y_color = (ax_color + b)^p` + + for each color component the source, where the `slope` is `a`, `offset` + is `b` and `power` is `p`. """ slope: Rgb[T] offset: Rgb[T] diff --git a/pycmx/edit.py b/pycmx/edit.py index 256225d..cce3685 100644 --- a/pycmx/edit.py +++ b/pycmx/edit.py @@ -125,14 +125,16 @@ class Edit: @property def black(self) -> bool: """ - Black video or silence should be used as the source for this event. + The source field for thie edit was "BL". Black video or silence should + be used as the source for this event. """ return self.source == "BL" @property def aux_source(self) -> bool: """ - An auxiliary source is the source of this event. + The source field for this edit was "AX". An auxiliary source is the + source for this event. """ return self.source == "AX" @@ -162,13 +164,13 @@ class Edit: @property def asc_sop(self) -> Optional[AscSopComponents[float]]: """ - Get ASC CDL Slope-Offset-Power transfer function for the edit, + Get ASC CDL Slope-Offset-Power color transfer function for the edit, if present. The ASC SOP is a transfer function of the form: :math:`y = (ax + b)^p` for each color component the source, where the `slope` is `a`, `offset` - is `b` and `power` is `c`. + is `b` and `power` is `p`. """ if self._asc_sop_statement is None: return None