colour.read_spectral_image_Fichet2021#

colour.read_spectral_image_Fichet2021(path: str | Path, bit_depth: Literal['float16', 'float32'] = 'float32', additional_data: bool = False) Dict[str | float, Tuple[ndarray[Any, dtype[float16 | float32 | float64]], ndarray[Any, dtype[float16 | float32 | float64]]]] | Tuple[Dict[str | float, Tuple[ndarray[Any, dtype[float16 | float32 | float64]], ndarray[Any, dtype[float16 | float32 | float64]]]], Specification_Fichet2021][source]#

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

Parameters:
  • path (str | Path) – 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