colour.recovery.XYZ_to_sd_Meng2015¶
-
colour.recovery.
XYZ_to_sd_Meng2015
(XYZ, cmfs=XYZ_ColourMatchingFunctions(name='CIE 1931 2 Degree Standard Observer', ...), interval=5, optimisation_parameters=None)[source]¶ Recovers the spectral distribution of given CIE XYZ tristimulus values using Meng et al. (2015) method.
Parameters: - XYZ (array_like, (3,)) – CIE XYZ tristimulus values to recover the spectral distribution from.
- cmfs (XYZ_ColourMatchingFunctions) – Standard observer colour matching functions.
- interval (numeric, optional) – Wavelength \(\lambda_{i}\) range interval in nm. The smaller
interval
is, the longer the computations will be. - optimisation_parameters (dict_like, optional) – Parameters for
scipy.optimize.minimize()
definition.
Returns: Recovered spectral distribution.
Return type: Notes
Domain Scale - Reference Scale - 1 XYZ
[0, 1] [0, 1] - The definition used to convert spectrum to CIE XYZ tristimulus
values is
colour.colorimetry.spectral_to_XYZ_integration()
definition because it processes any measurement interval opposed tocolour.colorimetry.sd_to_XYZ_ASTME30815()
definition that handles only measurement interval of 1, 5, 10 or 20nm.
References
Examples
>>> from colour.utilities import numpy_print_options >>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) >>> sd = XYZ_to_sd_Meng2015(XYZ, interval=10) >>> with numpy_print_options(suppress=True): ... # Doctests skip for Python 2.x compatibility. ... sd # doctest: +SKIP SpectralDistribution([[ 360. , 0.0780368...], [ 370. , 0.0780387...], [ 380. , 0.0780469...], [ 390. , 0.0780894...], [ 400. , 0.0780285...], [ 410. , 0.0777034...], [ 420. , 0.0769175...], [ 430. , 0.0746243...], [ 440. , 0.0691410...], [ 450. , 0.0599949...], [ 460. , 0.04779 ...], [ 470. , 0.0337270...], [ 480. , 0.0196952...], [ 490. , 0.0078056...], [ 500. , 0.0004368...], [ 510. , 0.0000065...], [ 520. , 0. ...], [ 530. , 0. ...], [ 540. , 0.0124283...], [ 550. , 0.0389186...], [ 560. , 0.0774087...], [ 570. , 0.1246716...], [ 580. , 0.1765055...], [ 590. , 0.2281652...], [ 600. , 0.2751726...], [ 610. , 0.3141208...], [ 620. , 0.3434564...], [ 630. , 0.3636521...], [ 640. , 0.3765182...], [ 650. , 0.3841561...], [ 660. , 0.3884648...], [ 670. , 0.3906975...], [ 680. , 0.3918679...], [ 690. , 0.3924590...], [ 700. , 0.3927439...], [ 710. , 0.3928570...], [ 720. , 0.3928867...], [ 730. , 0.3929099...], [ 740. , 0.3928997...], [ 750. , 0.3928827...], [ 760. , 0.3928579...], [ 770. , 0.3927857...], [ 780. , 0.3927272...], [ 790. , 0.3926867...], [ 800. , 0.3926441...], [ 810. , 0.3926385...], [ 820. , 0.3926247...], [ 830. , 0.3926105...]], interpolator=SpragueInterpolator, interpolator_args={}, extrapolator=Extrapolator, extrapolator_args={...}) >>> sd_to_XYZ_integration(sd) / 100 # doctest: +ELLIPSIS array([ 0.2065817..., 0.1219754..., 0.0514131...])