colour_clf_io.LogParams#
- class colour_clf_io.LogParams(base: float | None, log_side_slope: float | None, log_side_offset: float | None, lin_side_slope: float | None, lin_side_offset: float | None, lin_side_break: float | None, linear_slope: float | None, channel: Channel | None)[source]#
Bases:
XMLParsable,XMLWritableRepresent a LogParams element for a
colour_clf_io.LogProcess Node.Attributes
Methods
References
- Parameters:
- log_side_slope: float | None#
Slope” (or gain) applied to the log side of the logarithmic segment. Default is 1.
- __eq__(other)#
Return self==value.
- __hash__ = None#
- __init__(base: float | None, log_side_slope: float | None, log_side_offset: float | None, lin_side_slope: float | None, lin_side_offset: float | None, lin_side_break: float | None, linear_slope: float | None, channel: Channel | None) None#
- __repr__()#
Return repr(self).
- log_side_offset: float | None#
Offset applied to the log side of the logarithmic segment. Default is 0.
- lin_side_offset: float | None#
Offset applied to the linear side of the logarithmic segment. Default is 0.
- lin_side_break: float | None#
The break-point, defined in linear space, at which the piece-wise function transitions between the logarithmic and linear segments. This is required if style=”cameraLinToLog” or “cameraLogToLin”.
- linear_slope: float | None#
The slope of the linear segment of the piecewise function. This attribute does not need to be provided unless the formula being implemented requires it. The default is to calculate using linSideBreak such that the linear portion is continuous in value with the logarithmic portion of the curve, by using the value of the logarithmic portion of the curve at the break-point.
- channel: Channel | None#
The colour channel to which the exponential function is applied. Possible values are “R”, “G”, “B”. If this attribute is utilized to target different adjustments per channel, then up to three LogParams elements may be used, provided that “channel” is set differently in each. However, the same value of base must be used for all channels. If this attribute is not otherwise specified, the logarithmic function is applied identically to all three colour channels.
- static from_xml(xml: _Element | None, config: ParserConfig) LogParams | None[source]#
Parse and return a
colour_clf_io.LogParamsclass instance from the given XML element. Returns None` if the given XML element isNone.Expects the XML element to be a valid element according to the CLF specification.
- Parameters:
xml (_Element | None) – XML element to parse.
config (ParserConfig) – XML parser config.
- Returns:
class – Parsed XML node.
- Return type:
colour_clf_io.LogParams or
None- Raises:
colour_clf_io.errors.ParsingError – If the node does not conform to the specification, a
ParsingErrorexception will be raised. The error message will indicate the details of the issue that was encountered.