Returns if given CIE xyY colourspace array is within MacAdam limits of given illuminant.
Parameters: |
|
---|---|
Returns: | Is within MacAdam limits. |
Return type: | bool |
Notes
Examples
>>> is_within_macadam_limits(np.array([0.3205, 0.4131, 0.51]), 'A')
array(True, dtype=bool)
>>> a = np.array([[0.3205, 0.4131, 0.51],
... [0.0005, 0.0031, 0.001]])
>>> is_within_macadam_limits(a, 'A')
array([ True, False], dtype=bool)
Returns if given points are within given mesh volume using Delaunay triangulation.
Parameters: |
|
---|---|
Returns: | Is within mesh volume. |
Return type: | bool |
Notes
Examples
>>> mesh = np.array([[-1.0, -1.0, 1.0],
... [1.0, -1.0, 1.0],
... [1.0, -1.0, -1.0],
... [-1.0, -1.0, -1.0],
... [0.0, 1.0, 0.0]])
>>> is_within_mesh_volume(np.array([0.0005, 0.0031, 0.0010]), mesh)
array(True, dtype=bool)
>>> a = np.array([[0.0005, 0.0031, 0.0010],
... [0.3205, 0.4131, 0.5100]])
>>> is_within_mesh_volume(a, mesh)
array([ True, False], dtype=bool)
Returns if given CIE XYZ tristimulus values are within Pointer’s Gamut volume.
Parameters: |
|
---|---|
Returns: | Is within Pointer’s Gamut. |
Return type: | bool |
Notes
Examples
>>> import numpy as np
>>> is_within_pointer_gamut(np.array([0.3205, 0.4131, 0.5100]))
array(True, dtype=bool)
>>> a = np.array([[0.3205, 0.4131, 0.5100],
... [0.0005, 0.0031, 0.0010]])
>>> is_within_pointer_gamut(a)
array([ True, False], dtype=bool)
Returns if given CIE XYZ tristimulus values are within visible spectrum volume / given colour matching functions volume.
Parameters: |
|
---|---|
Returns: | Is within visible spectrum. |
Return type: | bool |
Notes
Examples
>>> import numpy as np
>>> is_within_visible_spectrum(np.array([0.3205, 0.4131, 0.51]))
array(True, dtype=bool)
>>> a = np.array([[0.3205, 0.4131, 0.51],
... [-0.0005, 0.0031, 0.001]])
>>> is_within_visible_spectrum(a)
array([ True, False], dtype=bool)
Computes given RGB colourspace volume limits in Lab colourspace.
Parameters: |
|
---|---|
Returns: | RGB colourspace volume limits. |
Return type: | ndarray |
Examples
>>> from colour import sRGB_COLOURSPACE as sRGB
>>> RGB_colourspace_limits(sRGB)
array([[ 0... , 100... ],
[ -79.2263741..., 94.6657491...],
[-114.7846271..., 96.7135199...]])
Performs given RGB colourspace volume computation using Monte Carlo method and multiprocessing.
Parameters: |
|
---|---|
Returns: | RGB colourspace volume. |
Return type: | float |
Notes
The doctest is assuming that np.random.RandomState() definition will return the same sequence no matter which OS or Python version is used. There is however no formal promise about the prng sequence reproducibility of either Python or *Numpy implementations: Laurent. (2012). Reproducibility of python pseudo-random numbers across systems and versions? Retrieved January 20, 2015, from http://stackoverflow.com/questions/8786084/reproducibility-of-python-pseudo-random-numbers-across-systems-and-versions
Examples
>>> from colour import sRGB_COLOURSPACE as sRGB
>>> prng = np.random.RandomState(2)
>>> processes = 1
>>> RGB_colourspace_volume_MonteCarlo(
... sRGB, 10e3, random_state=prng, processes=processes)
859...
Returns given RGB colourspace percentage coverage of an arbitrary volume.
Parameters: |
|
---|---|
Returns: | Percentage coverage of volume. |
Return type: | float |
Notes
Examples
>>> from colour import sRGB_COLOURSPACE as sRGB
>>> prng = np.random.RandomState(2)
>>> RGB_colourspace_volume_coverage_MonteCarlo(
... sRGB,
... is_within_pointer_gamut,
... 10e3,
... random_state=prng)
83...
Returns given RGB colourspace percentage coverage of Pointer’s Gamut volume using Monte Carlo method.
Parameters: |
|
---|---|
Returns: | Percentage coverage of Pointer’s Gamut volume. |
Return type: | float |
Notes
Examples
>>> from colour import sRGB_COLOURSPACE as sRGB
>>> prng = np.random.RandomState(2)
>>> RGB_colourspace_pointer_gamut_coverage_MonteCarlo(
... sRGB,
... 10e3,
... random_state=prng)
83...
Returns given RGB colourspace percentage coverage of visible spectrum volume using Monte Carlo method.
Parameters: |
|
---|---|
Returns: | Percentage coverage of visible spectrum volume. |
Return type: | float |
Notes
Examples
>>> from colour import sRGB_COLOURSPACE as sRGB
>>> prng = np.random.RandomState(2)
>>> RGB_colourspace_visible_spectrum_coverage_MonteCarlo(
... sRGB,
... 10e3,
... random_state=prng)
36...