colour.read_spectral_image_Fichet2021#

colour.read_spectral_image_Fichet2021(path: str | PathLike, bit_depth: Literal['float16', 'float32'] = 'float32', additional_data: Literal[True] = True) Tuple[ComponentsFichet2021, Specification_Fichet2021][source]#
colour.read_spectral_image_Fichet2021(path: str | PathLike, bit_depth: Literal['float16', 'float32'] = 'float32', *, additional_data: Literal[False]) ComponentsFichet2021
colour.read_spectral_image_Fichet2021(path: str | PathLike, bit_depth: Literal['float16', 'float32'], additional_data: bool = False) ComponentsFichet2021

Read the Fichet et al. (2021) spectral image at the specified path using OpenImageIO.

Parameters:
  • path (str | PathLike) – Image path.

  • bit_depth (Literal['float16', 'float32']) – Returned image bit-depth.

  • additional_data (bool) – Whether to return additional data.

Returns:

Dictionary of component names and their corresponding tuple of wavelengths and values or tuple of the aforementioned dictionary and colour.Specification_Fichet2021 class instance.

Return type:

dict or tuple

Notes

References

[FPW21]

Examples

>>> import os
>>> import colour
>>> path = os.path.join(
...     colour.__path__[0],
...     "io",
...     "tests",
...     "resources",
...     "D65.exr",
... )
>>> msds, specification = read_spectral_image_Fichet2021(
...     path, additional_data=True
... )
>>> components.keys()
dict_keys(['S0'])
>>> components["S0"][0].shape
(97,)
>>> components["S0"][1].shape
(1, 1, 97)
>>> specification.is_emissive
True