colour.io.write_LUT_SonySPI1D#

colour.io.write_LUT_SonySPI1D(LUT: colour.io.luts.lut.LUT1D | colour.io.luts.lut.LUT3x1D | colour.io.luts.sequence.LUTSequence, path: str, decimals: int = 7) bool[source]#

Write given LUT to given Sony .spi1d LUT file.

Parameters
Returns

Definition success.

Return type

bool

Warning

  • If a LUTSequence class instance is passed as LUT, the first LUT in the LUT sequence will be used.

Examples

Writing a 1D Sony .spi1d LUT:

>>> from colour.algebra import spow
>>> domain = np.array([-0.1, 1.5])
>>> LUT = LUT1D(
...     spow(LUT1D.linear_table(16), 1 / 2.2),
...     "My LUT",
...     domain,
...     comments=["A first comment.", "A second comment."],
... )
>>> write_LUT_SonySPI1D(LUT, "My_LUT.cube")  

Writing a 3x1D Sony .spi1d LUT:

>>> domain = np.array([[-0.1, -0.1, -0.1], [1.5, 1.5, 1.5]])
>>> LUT = LUT3x1D(
...     spow(LUT3x1D.linear_table(16), 1 / 2.2),
...     "My LUT",
...     domain,
...     comments=["A first comment.", "A second comment."],
... )
>>> write_LUT_SonySPI1D(LUT, "My_LUT.cube")