colour.io.xrite Module¶
X-Rite Data Input¶
Defines input object for X-Rite spectral data files:
-
colour.io.xrite.
read_spds_from_xrite_file
(path)[source]¶ Reads the spectral data from given X-Rite file and returns it as an OrderedDict of
colour.colorimetry.spectrum.SpectralPowerDistribution
classes.Parameters: path (unicode) – Absolute X-Rite file path. Returns: colour.colorimetry.spectrum.SpectralPowerDistribution
classes of given X-Rite file.Return type: OrderedDict Notes
- This parser is minimalistic and absolutely not bullet proof.
Examples
>>> import os >>> from pprint import pprint >>> xrite_file = os.path.join( ... os.path.dirname(__file__), ... 'tests', ... 'resources', ... 'xrite_digital_colour_checker.txt') >>> spds_data = read_spds_from_xrite_file(xrite_file) >>> pprint(list(spds_data.keys())) ['X1', 'X2', 'X3', 'X4', 'X5', 'X6', 'X7', 'X8', 'X9', 'X10']