code stringlengths 66 870k | docstring stringlengths 19 26.7k | func_name stringlengths 1 138 | language stringclasses 1
value | repo stringlengths 7 68 | path stringlengths 5 324 | url stringlengths 46 389 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
def brightness_correlate(
c: ArrayLike,
J: ArrayLike,
A_w: ArrayLike,
F_L: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *brightness* correlate :math:`Q`.
Parameters
----------
c
Surround exponential non-linearity :math:`c`.
J
*Lightness* correlate :math:`J`.
... |
Compute the *brightness* correlate :math:`Q`.
Parameters
----------
c
Surround exponential non-linearity :math:`c`.
J
*Lightness* correlate :math:`J`.
A_w
Achromatic response :math:`A_w` for the whitepoint.
F_L
*Luminance* level adaptation factor :math:`F_L`... | brightness_correlate | python | colour-science/colour | colour/appearance/ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/ciecam02.py | BSD-3-Clause |
def temporary_magnitude_quantity_forward(
N_c: ArrayLike,
N_cb: ArrayLike,
e_t: ArrayLike,
a: ArrayLike,
b: ArrayLike,
RGB_a: ArrayLike,
) -> NDArrayFloat:
"""
Compute the temporary magnitude quantity :math:`t`. for forward
*CIECAM02* implementation.
Parameters
----------
... |
Compute the temporary magnitude quantity :math:`t`. for forward
*CIECAM02* implementation.
Parameters
----------
N_c
Surround chromatic induction factor :math:`N_{c}`.
N_cb
Chromatic induction factor :math:`N_{cb}`.
e_t
Eccentricity factor :math:`e_t`.
a
... | temporary_magnitude_quantity_forward | python | colour-science/colour | colour/appearance/ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/ciecam02.py | BSD-3-Clause |
def temporary_magnitude_quantity_inverse(
C: ArrayLike, J: ArrayLike, n: ArrayLike
) -> NDArrayFloat:
"""
Compute the temporary magnitude quantity :math:`t`. for inverse
*CIECAM02* implementation.
Parameters
----------
C
*Chroma* correlate :math:`C`.
J
*Lightness* correl... |
Compute the temporary magnitude quantity :math:`t`. for inverse
*CIECAM02* implementation.
Parameters
----------
C
*Chroma* correlate :math:`C`.
J
*Lightness* correlate :math:`J`.
n
Function of the luminance factor of the background :math:`n`.
Returns
-----... | temporary_magnitude_quantity_inverse | python | colour-science/colour | colour/appearance/ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/ciecam02.py | BSD-3-Clause |
def chroma_correlate(
J: ArrayLike,
n: ArrayLike,
N_c: ArrayLike,
N_cb: ArrayLike,
e_t: ArrayLike,
a: ArrayLike,
b: ArrayLike,
RGB_a: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *chroma* correlate :math:`C`.
Parameters
----------
J
*Lightness* correlate :ma... |
Compute the *chroma* correlate :math:`C`.
Parameters
----------
J
*Lightness* correlate :math:`J`.
n
Function of the luminance factor of the background :math:`n`.
N_c
Surround chromatic induction factor :math:`N_{c}`.
N_cb
Chromatic induction factor :math:`N... | chroma_correlate | python | colour-science/colour | colour/appearance/ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/ciecam02.py | BSD-3-Clause |
def colourfulness_correlate(C: ArrayLike, F_L: ArrayLike) -> NDArrayFloat:
"""
Compute the *colourfulness* correlate :math:`M`.
Parameters
----------
C
*Chroma* correlate :math:`C`.
F_L
*Luminance* level adaptation factor :math:`F_L`.
Returns
-------
:class:`numpy.n... |
Compute the *colourfulness* correlate :math:`M`.
Parameters
----------
C
*Chroma* correlate :math:`C`.
F_L
*Luminance* level adaptation factor :math:`F_L`.
Returns
-------
:class:`numpy.ndarray`
*Colourfulness* correlate :math:`M`.
Examples
--------
... | colourfulness_correlate | python | colour-science/colour | colour/appearance/ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/ciecam02.py | BSD-3-Clause |
def saturation_correlate(M: ArrayLike, Q: ArrayLike) -> NDArrayFloat:
"""
Compute the *saturation* correlate :math:`s`.
Parameters
----------
M
*Colourfulness* correlate :math:`M`.
Q
*Brightness* correlate :math:`C`.
Returns
-------
:class:`numpy.ndarray`
*S... |
Compute the *saturation* correlate :math:`s`.
Parameters
----------
M
*Colourfulness* correlate :math:`M`.
Q
*Brightness* correlate :math:`C`.
Returns
-------
:class:`numpy.ndarray`
*Saturation* correlate :math:`s`.
Examples
--------
>>> M = 0.1088... | saturation_correlate | python | colour-science/colour | colour/appearance/ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/ciecam02.py | BSD-3-Clause |
def P(
N_c: ArrayLike,
N_cb: ArrayLike,
e_t: ArrayLike,
t: ArrayLike,
A: ArrayLike,
N_bb: ArrayLike,
) -> NDArrayFloat:
"""
Compute the points :math:`P_1`, :math:`P_2` and :math:`P_3`.
Parameters
----------
N_c
Surround chromatic induction factor :math:`N_{c}`.
N... |
Compute the points :math:`P_1`, :math:`P_2` and :math:`P_3`.
Parameters
----------
N_c
Surround chromatic induction factor :math:`N_{c}`.
N_cb
Chromatic induction factor :math:`N_{cb}`.
e_t
Eccentricity factor :math:`e_t`.
t
Temporary magnitude quantity :mat... | P | python | colour-science/colour | colour/appearance/ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/ciecam02.py | BSD-3-Clause |
def matrix_post_adaptation_non_linear_response_compression(
P_2: ArrayLike, a: ArrayLike, b: ArrayLike
) -> NDArrayFloat:
"""
Apply the post-adaptation non-linear-response compression matrix.
Parameters
----------
P_2
Point :math:`P_2`.
a
Opponent colour dimension :math:`a`.... |
Apply the post-adaptation non-linear-response compression matrix.
Parameters
----------
P_2
Point :math:`P_2`.
a
Opponent colour dimension :math:`a`.
b
Opponent colour dimension :math:`b`.
Returns
-------
:class:`numpy.ndarray`
Points :math:`P`.
... | matrix_post_adaptation_non_linear_response_compression | python | colour-science/colour | colour/appearance/ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/ciecam02.py | BSD-3-Clause |
def XYZ_to_CIECAM16(
XYZ: ArrayLike,
XYZ_w: ArrayLike,
L_A: ArrayLike,
Y_b: ArrayLike,
surround: (
InductionFactors_CIECAM02 | InductionFactors_CIECAM16
) = VIEWING_CONDITIONS_CIECAM16["Average"],
discount_illuminant: bool = False,
compute_H: bool = True,
) -> CAM_Specification_C... |
Compute the *CIECAM16* colour appearance model correlates from the specified
*CIE XYZ* tristimulus values.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of test sample / stimulus.
XYZ_w
*CIE XYZ* tristimulus values of reference white.
L_A
Adapting field *lu... | XYZ_to_CIECAM16 | python | colour-science/colour | colour/appearance/ciecam16.py | https://github.com/colour-science/colour/blob/master/colour/appearance/ciecam16.py | BSD-3-Clause |
def CIECAM16_to_XYZ(
specification: CAM_Specification_CIECAM16,
XYZ_w: ArrayLike,
L_A: ArrayLike,
Y_b: ArrayLike,
surround: (
InductionFactors_CIECAM02 | InductionFactors_CIECAM16
) = VIEWING_CONDITIONS_CIECAM16["Average"],
discount_illuminant: bool = False,
) -> NDArrayFloat:
""... |
Convert *CIECAM16* specification to *CIE XYZ* tristimulus values.
Parameters
----------
specification
*CIECAM16* colour appearance model specification. Correlate of
*lightness* :math:`J`, correlate of *chroma* :math:`C` or correlate of
*colourfulness* :math:`M` and *hue* angle ... | CIECAM16_to_XYZ | python | colour-science/colour | colour/appearance/ciecam16.py | https://github.com/colour-science/colour/blob/master/colour/appearance/ciecam16.py | BSD-3-Clause |
def f_q(F_L: ArrayLike, q: ArrayLike) -> NDArrayFloat:
"""
Define the :math:`f(q)` function.
Parameters
----------
F_L
*Luminance* level adaptation factor :math:`F_L`.
q
:math:`q` parameter.
Returns
-------
:class:`numpy.ndarray`
Evaluated :math:`f(q)` funct... |
Define the :math:`f(q)` function.
Parameters
----------
F_L
*Luminance* level adaptation factor :math:`F_L`.
q
:math:`q` parameter.
Returns
-------
:class:`numpy.ndarray`
Evaluated :math:`f(q)` function.
Examples
--------
>>> f_q(1.17, 0.26) # doc... | f_q | python | colour-science/colour | colour/appearance/ciecam16.py | https://github.com/colour-science/colour/blob/master/colour/appearance/ciecam16.py | BSD-3-Clause |
def d_f_q(F_L: ArrayLike, q: ArrayLike) -> NDArrayFloat:
"""
Define the :math:`f'(q)` function derivative.
Parameters
----------
F_L
*Luminance* level adaptation factor :math:`F_L`.
q
:math:`q` parameter.
Returns
-------
:class:`numpy.ndarray`
Evaluated :mat... |
Define the :math:`f'(q)` function derivative.
Parameters
----------
F_L
*Luminance* level adaptation factor :math:`F_L`.
q
:math:`q` parameter.
Returns
-------
:class:`numpy.ndarray`
Evaluated :math:`f'(q)` function derivative.
Examples
--------
>>... | d_f_q | python | colour-science/colour | colour/appearance/ciecam16.py | https://github.com/colour-science/colour/blob/master/colour/appearance/ciecam16.py | BSD-3-Clause |
def XYZ_to_Hellwig2022(
XYZ: ArrayLike,
XYZ_w: ArrayLike,
L_A: ArrayLike,
Y_b: ArrayLike,
surround: (
InductionFactors_CIECAM02 | InductionFactors_Hellwig2022
) = VIEWING_CONDITIONS_HELLWIG2022["Average"],
discount_illuminant: bool = False,
compute_H: bool = True,
) -> CAM_Specif... |
Compute the *Hellwig and Fairchild (2022)* colour appearance model
correlates from the specified *CIE XYZ* tristimulus values.
This implementation supports the *Helmholtz-Kohlrausch* effect extension
from :cite:`Hellwig2022a`.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values... | XYZ_to_Hellwig2022 | python | colour-science/colour | colour/appearance/hellwig2022.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hellwig2022.py | BSD-3-Clause |
def Hellwig2022_to_XYZ(
specification: CAM_Specification_Hellwig2022,
XYZ_w: ArrayLike,
L_A: ArrayLike,
Y_b: ArrayLike,
surround: (
InductionFactors_CIECAM02 | InductionFactors_Hellwig2022
) = VIEWING_CONDITIONS_HELLWIG2022["Average"],
discount_illuminant: bool = False,
) -> NDArrayF... |
Convert *Hellwig and Fairchild (2022)* specification to *CIE XYZ*
tristimulus values.
This implementation supports the *Helmholtz-Kohlrausch* effect extension
from :cite:`Hellwig2022a`.
Parameters
----------
specification
*Hellwig and Fairchild (2022)* colour appearance model spec... | Hellwig2022_to_XYZ | python | colour-science/colour | colour/appearance/hellwig2022.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hellwig2022.py | BSD-3-Clause |
def viewing_conditions_dependent_parameters(
Y_b: ArrayLike,
Y_w: ArrayLike,
L_A: ArrayLike,
) -> Tuple[NDArrayFloat, NDArrayFloat]:
"""
Compute the viewing condition dependent parameters.
Parameters
----------
Y_b
Adapting field *Y* tristimulus value :math:`Y_b`.
Y_w
... |
Compute the viewing condition dependent parameters.
Parameters
----------
Y_b
Adapting field *Y* tristimulus value :math:`Y_b`.
Y_w
Whitepoint *Y* tristimulus value :math:`Y_w`.
L_A
Adapting field *luminance* :math:`L_A` in :math:`cd/m^2`.
Returns
-------
:... | viewing_conditions_dependent_parameters | python | colour-science/colour | colour/appearance/hellwig2022.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hellwig2022.py | BSD-3-Clause |
def achromatic_response_forward(RGB: ArrayLike) -> NDArrayFloat:
"""
Compute the achromatic response :math:`A` from the specified compressed
*CAM16* transform sharpened *RGB* array and :math:`N_{bb}` chromatic
induction factor for forward *Hellwig and Fairchild (2022)* implementation.
Parameters
... |
Compute the achromatic response :math:`A` from the specified compressed
*CAM16* transform sharpened *RGB* array and :math:`N_{bb}` chromatic
induction factor for forward *Hellwig and Fairchild (2022)* implementation.
Parameters
----------
RGB
Compressed *CAM16* transform sharpened *RGB... | achromatic_response_forward | python | colour-science/colour | colour/appearance/hellwig2022.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hellwig2022.py | BSD-3-Clause |
def opponent_colour_dimensions_inverse(
P_p_1: ArrayLike, h: ArrayLike, M: ArrayLike
) -> NDArrayFloat:
"""
Compute opponent colour dimensions from the specified point :math:`P'_1`, hue
:math:`h` in degrees and correlate of *colourfulness* :math:`M` for
inverse *Hellwig and Fairchild (2022)* impleme... |
Compute opponent colour dimensions from the specified point :math:`P'_1`, hue
:math:`h` in degrees and correlate of *colourfulness* :math:`M` for
inverse *Hellwig and Fairchild (2022)* implementation.
Parameters
----------
P_p_1
Point :math:`P'_1`.
h
Hue :math:`h` in degree... | opponent_colour_dimensions_inverse | python | colour-science/colour | colour/appearance/hellwig2022.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hellwig2022.py | BSD-3-Clause |
def eccentricity_factor(h: ArrayLike) -> NDArrayFloat:
"""
Compute the eccentricity factor :math:`e_t` from the specified hue :math:`h` angle
in degrees for forward *CIECAM02* implementation.
Parameters
----------
h
Hue :math:`h` angle in degrees.
Returns
-------
:class:`nu... |
Compute the eccentricity factor :math:`e_t` from the specified hue :math:`h` angle
in degrees for forward *CIECAM02* implementation.
Parameters
----------
h
Hue :math:`h` angle in degrees.
Returns
-------
:class:`numpy.ndarray`
Eccentricity factor :math:`e_t`.
Exa... | eccentricity_factor | python | colour-science/colour | colour/appearance/hellwig2022.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hellwig2022.py | BSD-3-Clause |
def brightness_correlate(
c: ArrayLike,
J: ArrayLike,
A_w: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *brightness* correlate :math:`Q`.
Parameters
----------
c
Surround exponential non-linearity :math:`c`.
J
*Lightness* correlate :math:`J`.
A_w
Achroma... |
Compute the *brightness* correlate :math:`Q`.
Parameters
----------
c
Surround exponential non-linearity :math:`c`.
J
*Lightness* correlate :math:`J`.
A_w
Achromatic response :math:`A_w` for the whitepoint.
Returns
-------
:class:`numpy.ndarray`
*Br... | brightness_correlate | python | colour-science/colour | colour/appearance/hellwig2022.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hellwig2022.py | BSD-3-Clause |
def colourfulness_correlate(
N_c: ArrayLike,
e_t: ArrayLike,
a: ArrayLike,
b: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *colourfulness* correlate :math:`M`.
Parameters
----------
N_c
Surround chromatic induction factor :math:`N_{c}`.
e_t
Eccentricity factor :... |
Compute the *colourfulness* correlate :math:`M`.
Parameters
----------
N_c
Surround chromatic induction factor :math:`N_{c}`.
e_t
Eccentricity factor :math:`e_t`.
a
Opponent colour dimension :math:`a`.
b
Opponent colour dimension :math:`b`.
Returns
... | colourfulness_correlate | python | colour-science/colour | colour/appearance/hellwig2022.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hellwig2022.py | BSD-3-Clause |
def chroma_correlate(
M: ArrayLike,
A_w: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *chroma* correlate :math:`C`.
Parameters
----------
M
*Colourfulness* correlate :math:`M`.
A_w
Achromatic response :math:`A_w` for the whitepoint.
Returns
-------
:class:`... |
Compute the *chroma* correlate :math:`C`.
Parameters
----------
M
*Colourfulness* correlate :math:`M`.
A_w
Achromatic response :math:`A_w` for the whitepoint.
Returns
-------
:class:`numpy.ndarray`
*Chroma* correlate :math:`C`.
Examples
--------
>>... | chroma_correlate | python | colour-science/colour | colour/appearance/hellwig2022.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hellwig2022.py | BSD-3-Clause |
def saturation_correlate(M: ArrayLike, Q: ArrayLike) -> NDArrayFloat:
"""
Compute the *saturation* correlate :math:`s`.
Parameters
----------
M
*Colourfulness* correlate :math:`M`.
Q
*Brightness* correlate :math:`C`.
Returns
-------
:class:`numpy.ndarray`
*S... |
Compute the *saturation* correlate :math:`s`.
Parameters
----------
M
*Colourfulness* correlate :math:`M`.
Q
*Brightness* correlate :math:`C`.
Returns
-------
:class:`numpy.ndarray`
*Saturation* correlate :math:`s`.
Examples
--------
>>> M = 0.0387... | saturation_correlate | python | colour-science/colour | colour/appearance/hellwig2022.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hellwig2022.py | BSD-3-Clause |
def P_p(
N_c: ArrayLike,
e_t: ArrayLike,
A: ArrayLike,
) -> NDArrayFloat:
"""
Compute the points :math:`P'_1` and :math:`P'_2`.
Parameters
----------
N_c
Surround chromatic induction factor :math:`N_{c}`.
e_t
Eccentricity factor :math:`e_t`.
A
Achromatic ... |
Compute the points :math:`P'_1` and :math:`P'_2`.
Parameters
----------
N_c
Surround chromatic induction factor :math:`N_{c}`.
e_t
Eccentricity factor :math:`e_t`.
A
Achromatic response :math:`A` for the stimulus.
Returns
-------
:class:`numpy.ndarray`
... | P_p | python | colour-science/colour | colour/appearance/hellwig2022.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hellwig2022.py | BSD-3-Clause |
def hue_angle_dependency_Hellwig2022(
h: ArrayLike,
) -> NDArrayFloat:
"""
Compute the hue angle dependency of the *Helmholtz-Kohlrausch* effect.
Parameters
----------
h
Hue :math:`h` angle in degrees.
Returns
-------
:class:`numpy.ndarray`
Hue angle dependency.
... |
Compute the hue angle dependency of the *Helmholtz-Kohlrausch* effect.
Parameters
----------
h
Hue :math:`h` angle in degrees.
Returns
-------
:class:`numpy.ndarray`
Hue angle dependency.
References
----------
:cite:`Hellwig2022a`
Examples
--------
... | hue_angle_dependency_Hellwig2022 | python | colour-science/colour | colour/appearance/hellwig2022.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hellwig2022.py | BSD-3-Clause |
def HelmholtzKohlrausch_effect_object_Nayatani1997(
uv: ArrayLike,
uv_c: ArrayLike,
L_a: ArrayLike,
method: Literal["VAC", "VCC"] | str = "VCC",
) -> NDArrayFloat:
"""
Compute the *HKE* value for object colours using *Nayatani (1997)* method.
Parameters
----------
uv
*CIE uv... |
Compute the *HKE* value for object colours using *Nayatani (1997)* method.
Parameters
----------
uv
*CIE uv* chromaticity coordinates of samples.
uv_c
*CIE uv* chromaticity coordinates of reference white.
L_a
Adapting luminance in :math:`cd/m^2`.
method
Whic... | HelmholtzKohlrausch_effect_object_Nayatani1997 | python | colour-science/colour | colour/appearance/hke.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hke.py | BSD-3-Clause |
def HelmholtzKohlrausch_effect_luminous_Nayatani1997(
uv: ArrayLike,
uv_c: ArrayLike,
L_a: ArrayLike,
method: Literal["VAC", "VCC"] | str = "VCC",
) -> NDArrayFloat:
"""
Compute the *HKE* factor for luminous colours using *Nayatani (1997)* method.
Parameters
----------
uv
*C... |
Compute the *HKE* factor for luminous colours using *Nayatani (1997)* method.
Parameters
----------
uv
*CIE uv* chromaticity coordinates of samples.
uv_c
*CIE uv* chromaticity coordinates of reference white.
L_a
Adapting luminance in :math:`cd/m^2`.
method
W... | HelmholtzKohlrausch_effect_luminous_Nayatani1997 | python | colour-science/colour | colour/appearance/hke.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hke.py | BSD-3-Clause |
def coefficient_q_Nayatani1997(
theta: ArrayLike,
) -> NDArrayFloat:
"""
Compute the :math:`q(\\theta)` coefficient for *Nayatani (1997)* *HKE*
computations.
The hue angle :math:`\\theta` can be computed as follows:
:math:`tan^{-1}\\cfrac{v' - v'_c}{u' - u'_c}`
where :math:`u'` and :math:... |
Compute the :math:`q(\theta)` coefficient for *Nayatani (1997)* *HKE*
computations.
The hue angle :math:`\theta` can be computed as follows:
:math:`tan^{-1}\cfrac{v' - v'_c}{u' - u'_c}`
where :math:`u'` and :math:`v'` are the CIE 1976 chromaticity coordinates
of the test chromatic light and ... | coefficient_q_Nayatani1997 | python | colour-science/colour | colour/appearance/hke.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hke.py | BSD-3-Clause |
def coefficient_K_Br_Nayatani1997(L_a: ArrayLike) -> DTypeFloat | NDArrayFloat:
"""
Compute the :math:`K_{Br}` coefficient for *Nayatani (1997)* *HKE*
computations.
Parameters
----------
L_a
Adapting luminance in :math:`cd/m^2`.
Returns
-------
:class:`numpy.ndarray`
... |
Compute the :math:`K_{Br}` coefficient for *Nayatani (1997)* *HKE*
computations.
Parameters
----------
L_a
Adapting luminance in :math:`cd/m^2`.
Returns
-------
:class:`numpy.ndarray`
:math:`K_{Br}` coefficient for *Nayatani (1997)* *HKE* methods.
Notes
-----
... | coefficient_K_Br_Nayatani1997 | python | colour-science/colour | colour/appearance/hke.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hke.py | BSD-3-Clause |
def XYZ_to_Hunt(
XYZ: ArrayLike,
XYZ_w: ArrayLike,
XYZ_b: ArrayLike,
L_A: ArrayLike,
surround: InductionFactors_Hunt = VIEWING_CONDITIONS_HUNT["Normal Scenes"],
L_AS: ArrayLike | None = None,
CCT_w: ArrayLike | None = None,
XYZ_p: ArrayLike | None = None,
p: ArrayLike | None = None,
... |
Compute the *Hunt* colour appearance model correlates.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of test sample / stimulus.
XYZ_w
*CIE XYZ* tristimulus values of reference white.
XYZ_b
*CIE XYZ* tristimulus values of background.
L_A
Adapting fie... | XYZ_to_Hunt | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def luminance_level_adaptation_factor(
L_A: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *luminance* level adaptation factor :math:`F_L`.
Parameters
----------
L_A
Adapting field *luminance* :math:`L_A` in :math:`cd/m^2`.
Returns
-------
:class:`numpy.ndarray`
*Lum... |
Compute the *luminance* level adaptation factor :math:`F_L`.
Parameters
----------
L_A
Adapting field *luminance* :math:`L_A` in :math:`cd/m^2`.
Returns
-------
:class:`numpy.ndarray`
*Luminance* level adaptation factor :math:`F_L`.
Examples
--------
>>> lumin... | luminance_level_adaptation_factor | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def illuminant_scotopic_luminance(L_A: ArrayLike, CCT: ArrayLike) -> NDArrayFloat:
"""
Compute the approximate scotopic luminance :math:`L_{AS}` of the
illuminant.
Parameters
----------
L_A
Adapting field *luminance* :math:`L_A` in :math:`cd/m^2`.
CCT
Correlated color temper... |
Compute the approximate scotopic luminance :math:`L_{AS}` of the
illuminant.
Parameters
----------
L_A
Adapting field *luminance* :math:`L_A` in :math:`cd/m^2`.
CCT
Correlated color temperature :math:`T_{cp}` of the illuminant.
Returns
-------
:class:`numpy.ndarray... | illuminant_scotopic_luminance | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def f_n(x: ArrayLike) -> NDArrayFloat:
"""
Define the nonlinear response function of the *Hunt* colour appearance
model used to model the nonlinear behaviour of various visual responses.
Parameters
----------
x
Visual response variable :math:`x`.
Returns
-------
:class:`num... |
Define the nonlinear response function of the *Hunt* colour appearance
model used to model the nonlinear behaviour of various visual responses.
Parameters
----------
x
Visual response variable :math:`x`.
Returns
-------
:class:`numpy.ndarray`
Modeled visual response va... | f_n | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def chromatic_adaptation(
XYZ: ArrayLike,
XYZ_w: ArrayLike,
XYZ_b: ArrayLike,
L_A: ArrayLike,
F_L: ArrayLike,
XYZ_p: ArrayLike | None = None,
p: ArrayLike | None = None,
helson_judd_effect: bool = False,
discount_illuminant: bool = True,
) -> NDArrayFloat:
"""
Apply chromatic... |
Apply chromatic adaptation to the specified *CIE XYZ* tristimulus values.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of test sample.
XYZ_b
*CIE XYZ* tristimulus values of background.
XYZ_w
*CIE XYZ* tristimulus values of reference white.
L_A
Adap... | chromatic_adaptation | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def adjusted_reference_white_signals(
rgb_p: ArrayLike,
rgb_b: ArrayLike,
rgb_w: ArrayLike,
p: ArrayLike,
) -> NDArrayFloat:
"""
Adjust the white point for simultaneous chromatic contrast.
Parameters
----------
rgb_p
Cone signals *Hunt-Pointer-Estevez* :math:`\\rho\\gamma\\b... |
Adjust the white point for simultaneous chromatic contrast.
Parameters
----------
rgb_p
Cone signals *Hunt-Pointer-Estevez* :math:`\rho\gamma\beta`
colourspace array of the proximal field.
rgb_b
Cone signals *Hunt-Pointer-Estevez* :math:`\rho\gamma\beta`
colourspace... | adjusted_reference_white_signals | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def achromatic_post_adaptation_signal(rgb: ArrayLike) -> NDArrayFloat:
"""
Compute the achromatic post adaptation signal :math:`A` from the specified
*Hunt-Pointer-Estevez* :math:`\\rho\\gamma\\beta` colourspace array.
Parameters
----------
rgb
*Hunt-Pointer-Estevez* :math:`\\rho\\gamma... |
Compute the achromatic post adaptation signal :math:`A` from the specified
*Hunt-Pointer-Estevez* :math:`\rho\gamma\beta` colourspace array.
Parameters
----------
rgb
*Hunt-Pointer-Estevez* :math:`\rho\gamma\beta` colourspace array.
Returns
-------
:class:`numpy.ndarray`
... | achromatic_post_adaptation_signal | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def colour_difference_signals(rgb: ArrayLike) -> NDArrayFloat:
"""
Compute the colour difference signals :math:`C_1`, :math:`C_2` and
:math:`C_3` from the specified *Hunt-Pointer-Estevez*
:math:`\\rho\\gamma\\beta` colourspace array.
Parameters
----------
rgb
*Hunt-Pointer-Estevez* ... |
Compute the colour difference signals :math:`C_1`, :math:`C_2` and
:math:`C_3` from the specified *Hunt-Pointer-Estevez*
:math:`\rho\gamma\beta` colourspace array.
Parameters
----------
rgb
*Hunt-Pointer-Estevez* :math:`\rho\gamma\beta` colourspace array.
Returns
-------
:... | colour_difference_signals | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def hue_angle(C: ArrayLike) -> NDArrayFloat:
"""
Compute the *hue* angle :math:`h` in degrees from the specified colour
difference signals :math:`C`.
Parameters
----------
C
Colour difference signals :math:`C`.
Returns
-------
:class:`numpy.ndarray`
*Hue* angle :mat... |
Compute the *hue* angle :math:`h` in degrees from the specified colour
difference signals :math:`C`.
Parameters
----------
C
Colour difference signals :math:`C`.
Returns
-------
:class:`numpy.ndarray`
*Hue* angle :math:`h` in degrees.
Examples
--------
>>>... | hue_angle | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def eccentricity_factor(hue: ArrayLike) -> NDArrayFloat:
"""
Compute eccentricity factor :math:`e_s` from the specified hue angle
:math:`h` in degrees.
Parameters
----------
hue
Hue angle :math:`h` in degrees.
Returns
-------
:class:`numpy.ndarray`
Eccentricity fact... |
Compute eccentricity factor :math:`e_s` from the specified hue angle
:math:`h` in degrees.
Parameters
----------
hue
Hue angle :math:`h` in degrees.
Returns
-------
:class:`numpy.ndarray`
Eccentricity factor :math:`e_s`.
Examples
--------
>>> eccentricity_... | eccentricity_factor | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def low_luminance_tritanopia_factor(
L_A: ArrayLike,
) -> NDArrayFloat:
"""
Compute the low luminance tritanopia factor :math:`F_t` from the specified
adapting field *luminance* :math:`L_A` in :math:`cd/m^2`.
Parameters
----------
L_A
Adapting field *luminance* :math:`L_A` in :math:... |
Compute the low luminance tritanopia factor :math:`F_t` from the specified
adapting field *luminance* :math:`L_A` in :math:`cd/m^2`.
Parameters
----------
L_A
Adapting field *luminance* :math:`L_A` in :math:`cd/m^2`.
Returns
-------
:class:`numpy.ndarray`
Low luminance... | low_luminance_tritanopia_factor | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def yellowness_blueness_response(
C: ArrayLike,
e_s: ArrayLike,
N_c: ArrayLike,
N_cb: ArrayLike,
F_t: ArrayLike,
) -> NDArrayFloat:
"""
Compute the yellowness / blueness response :math:`M_{yb}`.
Parameters
----------
C
Colour difference signals :math:`C`.
e_s
... |
Compute the yellowness / blueness response :math:`M_{yb}`.
Parameters
----------
C
Colour difference signals :math:`C`.
e_s
Eccentricity factor :math:`e_s`.
N_c
Chromatic surround induction factor :math:`N_c`.
N_cb
Chromatic background induction factor :math... | yellowness_blueness_response | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def redness_greenness_response(
C: ArrayLike,
e_s: ArrayLike,
N_c: ArrayLike,
N_cb: ArrayLike,
) -> NDArrayFloat:
"""
Compute the redness / greenness response :math:`M_{rg}`.
Parameters
----------
C
Colour difference signals :math:`C`.
e_s
Eccentricity factor :ma... |
Compute the redness / greenness response :math:`M_{rg}`.
Parameters
----------
C
Colour difference signals :math:`C`.
e_s
Eccentricity factor :math:`e_s`.
N_c
Chromatic surround induction factor :math:`N_c`.
N_cb
Chromatic background induction factor :math:`... | redness_greenness_response | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def overall_chromatic_response(M_yb: ArrayLike, M_rg: ArrayLike) -> NDArrayFloat:
"""
Compute the overall chromatic response :math:`M`.
Parameters
----------
M_yb
Yellowness / blueness response :math:`M_{yb}`.
M_rg
Redness / greenness response :math:`M_{rg}`.
Returns
--... |
Compute the overall chromatic response :math:`M`.
Parameters
----------
M_yb
Yellowness / blueness response :math:`M_{yb}`.
M_rg
Redness / greenness response :math:`M_{rg}`.
Returns
-------
:class:`numpy.ndarray`
Overall chromatic response :math:`M`.
Examp... | overall_chromatic_response | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def saturation_correlate(M: ArrayLike, rgb_a: ArrayLike) -> NDArrayFloat:
"""
Compute the *saturation* correlate :math:`s`.
Parameters
----------
M
Overall chromatic response :math:`M`.
rgb_a
Adapted *Hunt-Pointer-Estevez* :math:`\\rho\\gamma\\beta`
colourspace array.
... |
Compute the *saturation* correlate :math:`s`.
Parameters
----------
M
Overall chromatic response :math:`M`.
rgb_a
Adapted *Hunt-Pointer-Estevez* :math:`\rho\gamma\beta`
colourspace array.
Returns
-------
:class:`numpy.ndarray`
*Saturation* correlate :ma... | saturation_correlate | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def achromatic_signal(
L_AS: ArrayLike,
S: ArrayLike,
S_w: ArrayLike,
N_bb: ArrayLike,
A_a: ArrayLike,
) -> NDArrayFloat:
"""
Compute the achromatic signal :math:`A`.
Parameters
----------
L_AS
Scotopic luminance :math:`L_{AS}` of the illuminant.
S
Scotopic r... |
Compute the achromatic signal :math:`A`.
Parameters
----------
L_AS
Scotopic luminance :math:`L_{AS}` of the illuminant.
S
Scotopic response :math:`S` to the stimulus.
S_w
Scotopic response :math:`S_w` for the reference white.
N_bb
Brightness background indu... | achromatic_signal | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def brightness_correlate(
A: ArrayLike,
A_w: ArrayLike,
M: ArrayLike,
N_b: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *brightness* correlate :math:`Q`.
Parameters
----------
A
Achromatic signal :math:`A`.
A_w
Achromatic post adaptation signal of the reference... |
Compute the *brightness* correlate :math:`Q`.
Parameters
----------
A
Achromatic signal :math:`A`.
A_w
Achromatic post adaptation signal of the reference white :math:`A_w`.
M
Overall chromatic response :math:`M`.
N_b
Brightness surround induction factor :m... | brightness_correlate | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def lightness_correlate(
Y_b: ArrayLike,
Y_w: ArrayLike,
Q: ArrayLike,
Q_w: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *lightness* correlate :math:`J`.
Parameters
----------
Y_b
Tristimulus values :math:`Y_b` the background.
Y_w
Tristimulus values :math:`Y_b... |
Compute the *lightness* correlate :math:`J`.
Parameters
----------
Y_b
Tristimulus values :math:`Y_b` the background.
Y_w
Tristimulus values :math:`Y_b` the reference white.
Q
*Brightness* correlate :math:`Q` of the stimulus.
Q_w
*Brightness* correlate :ma... | lightness_correlate | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def chroma_correlate(
s: ArrayLike,
Y_b: ArrayLike,
Y_w: ArrayLike,
Q: ArrayLike,
Q_w: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *chroma* correlate :math:`C_94`.
Parameters
----------
s
*Saturation* correlate :math:`s`.
Y_b
Tristimulus values :math:`Y_b`... |
Compute the *chroma* correlate :math:`C_94`.
Parameters
----------
s
*Saturation* correlate :math:`s`.
Y_b
Tristimulus values :math:`Y_b` the background.
Y_w
Tristimulus values :math:`Y_b` the reference white.
Q
*Brightness* correlate :math:`Q` of the stim... | chroma_correlate | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def colourfulness_correlate(F_L: ArrayLike, C_94: ArrayLike) -> NDArrayFloat:
"""
Compute the *colourfulness* correlate :math:`M_94`.
Parameters
----------
F_L
Luminance adaptation factor :math:`F_L`.
C_94
*Chroma* correlate :math:`C_94`.
Returns
-------
:class:`num... |
Compute the *colourfulness* correlate :math:`M_94`.
Parameters
----------
F_L
Luminance adaptation factor :math:`F_L`.
C_94
*Chroma* correlate :math:`C_94`.
Returns
-------
:class:`numpy.ndarray`
*Colourfulness* correlate :math:`M_94`.
Examples
-------... | colourfulness_correlate | python | colour-science/colour | colour/appearance/hunt.py | https://github.com/colour-science/colour/blob/master/colour/appearance/hunt.py | BSD-3-Clause |
def XYZ_to_Kim2009(
XYZ: ArrayLike,
XYZ_w: ArrayLike,
L_A: ArrayLike,
media: MediaParameters_Kim2009 = MEDIA_PARAMETERS_KIM2009["CRT Displays"],
surround: InductionFactors_Kim2009 = VIEWING_CONDITIONS_KIM2009["Average"],
n_c: float = 0.57,
discount_illuminant: bool = False,
compute_H: bo... |
Compute the *Kim, Weyrich and Kautz (2009)* colour appearance model
correlates from the specified *CIE XYZ* tristimulus values.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of test sample / stimulus.
XYZ_w
*CIE XYZ* tristimulus values of reference white.
L_A
... | XYZ_to_Kim2009 | python | colour-science/colour | colour/appearance/kim2009.py | https://github.com/colour-science/colour/blob/master/colour/appearance/kim2009.py | BSD-3-Clause |
def Kim2009_to_XYZ(
specification: CAM_Specification_Kim2009,
XYZ_w: ArrayLike,
L_A: ArrayLike,
media: MediaParameters_Kim2009 = MEDIA_PARAMETERS_KIM2009["CRT Displays"],
surround: InductionFactors_Kim2009 = VIEWING_CONDITIONS_KIM2009["Average"],
n_c: float = 0.57,
discount_illuminant: bool ... |
Convert *Kim, Weyrich and Kautz (2009)* specification to *CIE XYZ*
tristimulus values.
Parameters
----------
specification
*Kim, Weyrich and Kautz (2009)* colour appearance model specification.
Correlate of *Lightness* :math:`J`, correlate of *chroma* :math:`C` or
correl... | Kim2009_to_XYZ | python | colour-science/colour | colour/appearance/kim2009.py | https://github.com/colour-science/colour/blob/master/colour/appearance/kim2009.py | BSD-3-Clause |
def XYZ_to_LLAB(
XYZ: ArrayLike,
XYZ_0: ArrayLike,
Y_b: ArrayLike,
L: ArrayLike,
surround: InductionFactors_LLAB = VIEWING_CONDITIONS_LLAB[
"Reference Samples & Images, Average Surround, Subtending < 4"
],
) -> CAM_Specification_LLAB:
"""
Compute the *:math:`LLAB(l:c)`* colour ap... |
Compute the *:math:`LLAB(l:c)`* colour appearance model correlates.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of test sample / stimulus.
XYZ_0
*CIE XYZ* tristimulus values of reference white.
Y_b
Luminance factor of the background in :math:`cd/m^2`.
L
... | XYZ_to_LLAB | python | colour-science/colour | colour/appearance/llab.py | https://github.com/colour-science/colour/blob/master/colour/appearance/llab.py | BSD-3-Clause |
def XYZ_to_RGB_LLAB(XYZ: ArrayLike) -> NDArrayFloat:
"""
Convert *CIE XYZ* tristimulus values to normalised cone responses.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values.
Returns
-------
:class:`numpy.ndarray`
Normalised cone responses.
Examples
------... |
Convert *CIE XYZ* tristimulus values to normalised cone responses.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values.
Returns
-------
:class:`numpy.ndarray`
Normalised cone responses.
Examples
--------
>>> XYZ = np.array([19.01, 20.00, 21.78])
>>> XYZ... | XYZ_to_RGB_LLAB | python | colour-science/colour | colour/appearance/llab.py | https://github.com/colour-science/colour/blob/master/colour/appearance/llab.py | BSD-3-Clause |
def chromatic_adaptation(
RGB: ArrayLike,
RGB_0: ArrayLike,
RGB_0r: ArrayLike,
Y: ArrayLike,
D: ArrayLike = 1,
) -> NDArrayFloat:
"""
Apply chromatic adaptation to the specified *RGB* normalised cone responses
array.
Parameters
----------
RGB
*RGB* normalised cone re... |
Apply chromatic adaptation to the specified *RGB* normalised cone responses
array.
Parameters
----------
RGB
*RGB* normalised cone responses array of test sample / stimulus.
RGB_0
*RGB* normalised cone responses array of reference white.
RGB_0r
*RGB* normalised cone... | chromatic_adaptation | python | colour-science/colour | colour/appearance/llab.py | https://github.com/colour-science/colour/blob/master/colour/appearance/llab.py | BSD-3-Clause |
def f(x: ArrayLike, F_S: ArrayLike) -> NDArrayFloat:
"""
Define the nonlinear response function of the *:math:`LLAB(l:c)`* colour
appearance model used to model the nonlinear behaviour of various visual
responses.
Parameters
----------
x
Visual response variable :math:`x`.
F_S
... |
Define the nonlinear response function of the *:math:`LLAB(l:c)`* colour
appearance model used to model the nonlinear behaviour of various visual
responses.
Parameters
----------
x
Visual response variable :math:`x`.
F_S
Surround induction factor :math:`F_S`.
Returns
... | f | python | colour-science/colour | colour/appearance/llab.py | https://github.com/colour-science/colour/blob/master/colour/appearance/llab.py | BSD-3-Clause |
def opponent_colour_dimensions(
XYZ: ArrayLike,
Y_b: ArrayLike,
F_S: ArrayLike,
F_L: ArrayLike,
) -> NDArrayFloat:
"""
Compute opponent colour dimensions from the specified adapted *CIE XYZ* tristimulus
values.
The opponent colour dimensions are based on a modified *CIE L\\*a\\*b\\**
... |
Compute opponent colour dimensions from the specified adapted *CIE XYZ* tristimulus
values.
The opponent colour dimensions are based on a modified *CIE L\*a\*b\**
colourspace formulae.
Parameters
----------
XYZ
Adapted *CIE XYZ* tristimulus values.
Y_b
Luminance factor... | opponent_colour_dimensions | python | colour-science/colour | colour/appearance/llab.py | https://github.com/colour-science/colour/blob/master/colour/appearance/llab.py | BSD-3-Clause |
def hue_angle(a: ArrayLike, b: ArrayLike) -> NDArrayFloat:
"""
Compute the *hue* angle :math:`h_L` in degrees.
Parameters
----------
a
Opponent colour dimension :math:`a`.
b
Opponent colour dimension :math:`b`.
Returns
-------
:class:`numpy.ndarray`
*Hue* an... |
Compute the *hue* angle :math:`h_L` in degrees.
Parameters
----------
a
Opponent colour dimension :math:`a`.
b
Opponent colour dimension :math:`b`.
Returns
-------
:class:`numpy.ndarray`
*Hue* angle :math:`h_L` in degrees.
Examples
--------
>>> hue... | hue_angle | python | colour-science/colour | colour/appearance/llab.py | https://github.com/colour-science/colour/blob/master/colour/appearance/llab.py | BSD-3-Clause |
def chroma_correlate(a: ArrayLike, b: ArrayLike) -> NDArrayFloat:
"""
Compute the correlate of *chroma* :math:`Ch_L`.
Parameters
----------
a
Opponent colour dimension :math:`a`.
b
Opponent colour dimension :math:`b`.
Returns
-------
:class:`numpy.ndarray`
C... |
Compute the correlate of *chroma* :math:`Ch_L`.
Parameters
----------
a
Opponent colour dimension :math:`a`.
b
Opponent colour dimension :math:`b`.
Returns
-------
:class:`numpy.ndarray`
Correlate of *chroma* :math:`Ch_L`.
Examples
--------
>>> a =... | chroma_correlate | python | colour-science/colour | colour/appearance/llab.py | https://github.com/colour-science/colour/blob/master/colour/appearance/llab.py | BSD-3-Clause |
def colourfulness_correlate(
L: ArrayLike,
L_L: ArrayLike,
Ch_L: ArrayLike,
F_C: ArrayLike,
) -> NDArrayFloat:
"""
Compute the correlate of *colourfulness* :math:`C_L`.
Parameters
----------
L
Absolute luminance :math:`L` of reference white in :math:`cd/m^2`.
L_L
... |
Compute the correlate of *colourfulness* :math:`C_L`.
Parameters
----------
L
Absolute luminance :math:`L` of reference white in :math:`cd/m^2`.
L_L
Correlate of *Lightness* :math:`L_L`.
Ch_L
Correlate of *chroma* :math:`Ch_L`.
F_C
Chroma induction factor :m... | colourfulness_correlate | python | colour-science/colour | colour/appearance/llab.py | https://github.com/colour-science/colour/blob/master/colour/appearance/llab.py | BSD-3-Clause |
def saturation_correlate(Ch_L: ArrayLike, L_L: ArrayLike) -> NDArrayFloat:
"""
Compute the correlate of *saturation* :math:`S_L`.
Parameters
----------
Ch_L
Correlate of *chroma* :math:`Ch_L`.
L_L
Correlate of *Lightness* :math:`L_L`.
Returns
-------
:class:`numpy.n... |
Compute the correlate of *saturation* :math:`S_L`.
Parameters
----------
Ch_L
Correlate of *chroma* :math:`Ch_L`.
L_L
Correlate of *Lightness* :math:`L_L`.
Returns
-------
:class:`numpy.ndarray`
Correlate of *saturation* :math:`S_L`.
Examples
--------
... | saturation_correlate | python | colour-science/colour | colour/appearance/llab.py | https://github.com/colour-science/colour/blob/master/colour/appearance/llab.py | BSD-3-Clause |
def XYZ_to_Nayatani95(
XYZ: ArrayLike,
XYZ_n: ArrayLike,
Y_o: ArrayLike,
E_o: ArrayLike,
E_or: ArrayLike,
n: ArrayLike = 1,
) -> CAM_Specification_Nayatani95:
"""
Compute the *Nayatani (1995)* colour appearance model correlates.
Parameters
----------
XYZ
*CIE XYZ* tr... |
Compute the *Nayatani (1995)* colour appearance model correlates.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of test sample / stimulus.
XYZ_n
*CIE XYZ* tristimulus values of reference white.
Y_o
Luminance factor :math:`Y_o` of achromatic background as percen... | XYZ_to_Nayatani95 | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def illuminance_to_luminance(E: ArrayLike, Y_f: ArrayLike) -> NDArrayFloat:
"""
Convert the specified *illuminance* :math:`E` value in lux to *luminance* in
:math:`cd/m^2`.
Parameters
----------
E
*Illuminance* :math:`E` in lux.
Y_f
*Luminance* factor :math:`Y_f` in :math:`c... |
Convert the specified *illuminance* :math:`E` value in lux to *luminance* in
:math:`cd/m^2`.
Parameters
----------
E
*Illuminance* :math:`E` in lux.
Y_f
*Luminance* factor :math:`Y_f` in :math:`cd/m^2`.
Returns
-------
:class:`numpy.ndarray`
*Luminance* :ma... | illuminance_to_luminance | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def scaling_coefficient(x: ArrayLike, y: ArrayLike) -> NDArrayFloat:
"""
Compute the scaling coefficient :math:`e(R)` or :math:`e(G)`.
Parameters
----------
x
Cone response.
y
Intermediate value.
Returns
-------
:class:`numpy.ndarray`
Scaling coefficient :ma... |
Compute the scaling coefficient :math:`e(R)` or :math:`e(G)`.
Parameters
----------
x
Cone response.
y
Intermediate value.
Returns
-------
:class:`numpy.ndarray`
Scaling coefficient :math:`e(R)` or :math:`e(G)`.
Examples
--------
>>> x = 20.0005206... | scaling_coefficient | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def achromatic_response(
RGB: ArrayLike,
bRGB_o: ArrayLike,
xez: ArrayLike,
bL_or: ArrayLike,
eR: ArrayLike,
eG: ArrayLike,
n: ArrayLike = 1,
) -> NDArrayFloat:
"""
Compute the achromatic response :math:`Q` from the specified stimulus cone
responses.
Parameters
---------... |
Compute the achromatic response :math:`Q` from the specified stimulus cone
responses.
Parameters
----------
RGB
Stimulus cone responses.
bRGB_o
Chromatic adaptation exponential factors :math:`\beta_1(R_o)`,
:math:`\beta_1(G_o)` and :math:`\beta_2(B_o)`.
xez
... | achromatic_response | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def tritanopic_response(
RGB: ArrayLike, bRGB_o: ArrayLike, xez: ArrayLike, n: ArrayLike
) -> NDArrayFloat:
"""
Compute the tritanopic response :math:`t` from the specified stimulus cone
responses.
Parameters
----------
RGB
Stimulus cone responses.
bRGB_o
Chromatic ada... |
Compute the tritanopic response :math:`t` from the specified stimulus cone
responses.
Parameters
----------
RGB
Stimulus cone responses.
bRGB_o
Chromatic adaptation exponential factors :math:`\beta_1(R_o)`,
:math:`\beta_1(G_o)` and :math:`\beta_2(B_o)`.
xez
... | tritanopic_response | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def protanopic_response(
RGB: ArrayLike, bRGB_o: ArrayLike, xez: ArrayLike, n: ArrayLike
) -> NDArrayFloat:
"""
Compute the protanopic response :math:`p` from the specified stimulus cone
responses.
Parameters
----------
RGB
Stimulus cone responses.
bRGB_o
Chromatic ada... |
Compute the protanopic response :math:`p` from the specified stimulus cone
responses.
Parameters
----------
RGB
Stimulus cone responses.
bRGB_o
Chromatic adaptation exponential factors :math:`\beta_1(R_o)`,
:math:`\beta_1(G_o)` and :math:`\beta_2(B_o)`.
xez
... | protanopic_response | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def brightness_correlate(
bRGB_o: ArrayLike, bL_or: ArrayLike, Q: ArrayLike
) -> NDArrayFloat:
"""
Compute the *brightness* correlate :math:`B_r`.
Parameters
----------
bRGB_o
Chromatic adaptation exponential factors :math:`\\beta_1(R_o)`,
:math:`\\beta_1(G_o)` and :math:`\\be... |
Compute the *brightness* correlate :math:`B_r`.
Parameters
----------
bRGB_o
Chromatic adaptation exponential factors :math:`\beta_1(R_o)`,
:math:`\beta_1(G_o)` and :math:`\beta_2(B_o)`.
bL_or
Normalising chromatic adaptation exponential factor
:math:`\beta_1(B_... | brightness_correlate | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def ideal_white_brightness_correlate(
bRGB_o: ArrayLike,
xez: ArrayLike,
bL_or: ArrayLike,
n: ArrayLike,
) -> NDArrayFloat:
"""
Compute the ideal white *brightness* correlate :math:`B_{rw}`.
Parameters
----------
bRGB_o
Chromatic adaptation exponential factors :math:`\\beta... |
Compute the ideal white *brightness* correlate :math:`B_{rw}`.
Parameters
----------
bRGB_o
Chromatic adaptation exponential factors :math:`\beta_1(R_o)`,
:math:`\beta_1(G_o)` and :math:`\beta_2(B_o)`.
xez
Intermediate values :math:`\xi`, :math:`\eta`, :math:`\zeta`.
... | ideal_white_brightness_correlate | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def achromatic_lightness_correlate(
Q: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *achromatic lightness* correlate :math:`L_p^\\star`.
Parameters
----------
Q
Achromatic response :math:`Q`.
Returns
-------
:class:`numpy.ndarray`
*Achromatic lightness* correlate :... |
Compute the *achromatic lightness* correlate :math:`L_p^\star`.
Parameters
----------
Q
Achromatic response :math:`Q`.
Returns
-------
:class:`numpy.ndarray`
*Achromatic lightness* correlate :math:`L_p^\star`.
Examples
--------
>>> Q = -0.000117024294955
>... | achromatic_lightness_correlate | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def normalised_achromatic_lightness_correlate(
B_r: ArrayLike, B_rw: ArrayLike
) -> NDArrayFloat:
"""
Compute the *normalised achromatic lightness* correlate :math:`L_n^\\star`.
Parameters
----------
B_r
*Brightness* correlate :math:`B_r`.
B_rw
Ideal white *brightness* corre... |
Compute the *normalised achromatic lightness* correlate :math:`L_n^\star`.
Parameters
----------
B_r
*Brightness* correlate :math:`B_r`.
B_rw
Ideal white *brightness* correlate :math:`B_{rw}`.
Returns
-------
:class:`numpy.ndarray`
*Normalised achromatic lightn... | normalised_achromatic_lightness_correlate | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def hue_angle(p: ArrayLike, t: ArrayLike) -> NDArrayFloat:
"""
Compute the *hue* angle :math:`h` in degrees.
Parameters
----------
p
Protanopic response :math:`p`.
t
Tritanopic response :math:`t`.
Returns
-------
:class:`numpy.ndarray`
*Hue* angle :math:`h` ... |
Compute the *hue* angle :math:`h` in degrees.
Parameters
----------
p
Protanopic response :math:`p`.
t
Tritanopic response :math:`t`.
Returns
-------
:class:`numpy.ndarray`
*Hue* angle :math:`h` in degrees.
Examples
--------
>>> p = -8.002142682085... | hue_angle | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def chromatic_strength_function(
theta: ArrayLike,
) -> NDArrayFloat:
"""
Define the chromatic strength function :math:`E_s(\\theta)` used to
correct saturation scale as function of hue angle :math:`\\theta` in
degrees.
Parameters
----------
theta
Hue angle :math:`\\theta` in de... |
Define the chromatic strength function :math:`E_s(\theta)` used to
correct saturation scale as function of hue angle :math:`\theta` in
degrees.
Parameters
----------
theta
Hue angle :math:`\theta` in degrees.
Returns
-------
:class:`numpy.ndarray`
Corrected saturat... | chromatic_strength_function | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def saturation_components(
h: ArrayLike,
bL_or: ArrayLike,
t: ArrayLike,
p: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *saturation* components :math:`S_{RG}` and :math:`S_{YB}`.
Parameters
----------
h
Correlate of *hue* :math:`h` in degrees.
bL_or
Normalisin... |
Compute the *saturation* components :math:`S_{RG}` and :math:`S_{YB}`.
Parameters
----------
h
Correlate of *hue* :math:`h` in degrees.
bL_or
Normalising chromatic adaptation exponential factor
:math:`\beta_1(B_or)`.
t
Tritanopic response :math:`t`.
p
... | saturation_components | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def saturation_correlate(S_RG: ArrayLike, S_YB: ArrayLike) -> NDArrayFloat:
"""
Compute the correlate of *saturation* :math:`S`.
Parameters
----------
S_RG
*Saturation* component :math:`S_{RG}`.
S_YB
*Saturation* component :math:`S_{YB}`.
Returns
-------
:class:`num... |
Compute the correlate of *saturation* :math:`S`.
Parameters
----------
S_RG
*Saturation* component :math:`S_{RG}`.
S_YB
*Saturation* component :math:`S_{YB}`.
Returns
-------
:class:`numpy.ndarray`
Correlate of *saturation* :math:`S`.
Examples
--------... | saturation_correlate | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def chroma_components(
L_star_P: ArrayLike,
S_RG: ArrayLike,
S_YB: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *chroma* components :math:`C_{RG}` and :math:`C_{YB}`.
Parameters
----------
L_star_P
*Achromatic lightness* correlate :math:`L_p^\\star`.
S_RG
*Saturatio... |
Compute the *chroma* components :math:`C_{RG}` and :math:`C_{YB}`.
Parameters
----------
L_star_P
*Achromatic lightness* correlate :math:`L_p^\star`.
S_RG
*Saturation* component :math:`S_{RG}`.
S_YB
*Saturation* component :math:`S_{YB}`.
Returns
-------
:cl... | chroma_components | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def chroma_correlate(L_star_P: ArrayLike, S: ArrayLike) -> NDArrayFloat:
"""
Compute the correlate of *chroma* :math:`C`.
Parameters
----------
L_star_P
*Achromatic lightness* correlate :math:`L_p^\\star`.
S
Correlate of *saturation* :math:`S`.
Returns
-------
:clas... |
Compute the correlate of *chroma* :math:`C`.
Parameters
----------
L_star_P
*Achromatic lightness* correlate :math:`L_p^\star`.
S
Correlate of *saturation* :math:`S`.
Returns
-------
:class:`numpy.ndarray`
Correlate of *chroma* :math:`C`.
Examples
----... | chroma_correlate | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def colourfulness_components(
C_RG: ArrayLike,
C_YB: ArrayLike,
B_rw: ArrayLike,
) -> NDArrayFloat:
"""
Compute the *colourfulness* components :math:`M_{RG}` and :math:`M_{YB}`.
Parameters
----------
C_RG
*Chroma* component :math:`C_{RG}`.
C_YB
*Chroma* component :ma... |
Compute the *colourfulness* components :math:`M_{RG}` and :math:`M_{YB}`.
Parameters
----------
C_RG
*Chroma* component :math:`C_{RG}`.
C_YB
*Chroma* component :math:`C_{YB}`.
B_rw
Ideal white *brightness* correlate :math:`B_{rw}`.
Returns
-------
:class:`n... | colourfulness_components | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def colourfulness_correlate(C: ArrayLike, B_rw: ArrayLike) -> NDArrayFloat:
"""
Compute the correlate of *colourfulness* :math:`M`.
Parameters
----------
C
Correlate of *chroma* :math:`C`.
B_rw
Ideal white *brightness* correlate :math:`B_{rw}`.
Returns
-------
:clas... |
Compute the correlate of *colourfulness* :math:`M`.
Parameters
----------
C
Correlate of *chroma* :math:`C`.
B_rw
Ideal white *brightness* correlate :math:`B_{rw}`.
Returns
-------
:class:`numpy.ndarray`
Correlate of *colourfulness* :math:`M`.
Examples
... | colourfulness_correlate | python | colour-science/colour | colour/appearance/nayatani95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/nayatani95.py | BSD-3-Clause |
def XYZ_to_RLAB(
XYZ: ArrayLike,
XYZ_n: ArrayLike,
Y_n: ArrayLike,
sigma: ArrayLike = VIEWING_CONDITIONS_RLAB["Average"],
D: ArrayLike = D_FACTOR_RLAB["Hard Copy Images"],
) -> CAM_Specification_RLAB:
"""
Compute the *RLAB* model color appearance correlates.
Parameters
----------
... |
Compute the *RLAB* model color appearance correlates.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of test sample / stimulus.
XYZ_n
*CIE XYZ* tristimulus values of reference white.
Y_n
Absolute adapting luminance in :math:`cd/m^2`.
sigma
Relative l... | XYZ_to_RLAB | python | colour-science/colour | colour/appearance/rlab.py | https://github.com/colour-science/colour/blob/master/colour/appearance/rlab.py | BSD-3-Clause |
def XYZ_to_ZCAM(
XYZ: ArrayLike,
XYZ_w: ArrayLike,
L_A: ArrayLike,
Y_b: ArrayLike,
surround: InductionFactors_ZCAM = VIEWING_CONDITIONS_ZCAM["Average"],
discount_illuminant: bool = False,
compute_H: bool = True,
) -> CAM_Specification_ZCAM:
"""
Compute the *ZCAM* colour appearance mo... |
Compute the *ZCAM* colour appearance model correlates from the specified *CIE XYZ*
tristimulus values.
Parameters
----------
XYZ
Absolute *CIE XYZ* tristimulus values of test sample / stimulus.
XYZ_w
Absolute *CIE XYZ* tristimulus values of the white under reference
ill... | XYZ_to_ZCAM | python | colour-science/colour | colour/appearance/zcam.py | https://github.com/colour-science/colour/blob/master/colour/appearance/zcam.py | BSD-3-Clause |
def ZCAM_to_XYZ(
specification: CAM_Specification_ZCAM,
XYZ_w: ArrayLike,
L_A: ArrayLike,
Y_b: ArrayLike,
surround: InductionFactors_ZCAM = VIEWING_CONDITIONS_ZCAM["Average"],
discount_illuminant: bool = False,
) -> NDArrayFloat:
"""
Convert *ZCAM* specification to *CIE XYZ* tristimulus ... |
Convert *ZCAM* specification to *CIE XYZ* tristimulus values.
Parameters
----------
specification
*ZCAM* colour appearance model specification.
Correlate of *lightness* :math:`J`, correlate of *chroma* :math:`C` or
correlate of *colourfulness* :math:`M` and *hue* angle :math... | ZCAM_to_XYZ | python | colour-science/colour | colour/appearance/zcam.py | https://github.com/colour-science/colour/blob/master/colour/appearance/zcam.py | BSD-3-Clause |
def hue_quadrature(h: ArrayLike) -> NDArrayFloat:
"""
Compute the hue quadrature from the specified hue :math:`h` angle in degrees.
Parameters
----------
h
Hue :math:`h` angle in degrees.
Returns
-------
:class:`numpy.ndarray`
Hue quadrature.
Examples
--------
... |
Compute the hue quadrature from the specified hue :math:`h` angle in degrees.
Parameters
----------
h
Hue :math:`h` angle in degrees.
Returns
-------
:class:`numpy.ndarray`
Hue quadrature.
Examples
--------
>>> hue_quadrature(196.3185839) # doctest: +ELLIPSIS... | hue_quadrature | python | colour-science/colour | colour/appearance/zcam.py | https://github.com/colour-science/colour/blob/master/colour/appearance/zcam.py | BSD-3-Clause |
def test_XYZ_to_ATD95(self) -> None:
"""
Test :func:`colour.appearance.atd95.XYZ_to_ATD95` definition.
Notes
-----
- The test values have been generated from data of the following file
by *Fairchild (2013)*:
http://rit-mcsl.org/fairchild//files/AppModEx... |
Test :func:`colour.appearance.atd95.XYZ_to_ATD95` definition.
Notes
-----
- The test values have been generated from data of the following file
by *Fairchild (2013)*:
http://rit-mcsl.org/fairchild//files/AppModEx.xls
| test_XYZ_to_ATD95 | python | colour-science/colour | colour/appearance/tests/test_atd95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_atd95.py | BSD-3-Clause |
def test_n_dimensional_XYZ_to_ATD95(self) -> None:
"""
Test :func:`colour.appearance.atd95.XYZ_to_ATD95` definition
n-dimensional support.
"""
XYZ = np.array([19.01, 20.00, 21.78])
XYZ_0 = np.array([95.05, 100.00, 108.88])
Y_02 = 318.31
K_1 = 0
K_... |
Test :func:`colour.appearance.atd95.XYZ_to_ATD95` definition
n-dimensional support.
| test_n_dimensional_XYZ_to_ATD95 | python | colour-science/colour | colour/appearance/tests/test_atd95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_atd95.py | BSD-3-Clause |
def test_domain_range_scale_XYZ_to_ATD95(self) -> None:
"""
Test :func:`colour.appearance.atd95.XYZ_to_ATD95` definition domain
and range scale support.
"""
XYZ = np.array([19.01, 20.00, 21.78])
XYZ_0 = np.array([95.05, 100.00, 108.88])
Y_0 = 318.31
k_1 =... |
Test :func:`colour.appearance.atd95.XYZ_to_ATD95` definition domain
and range scale support.
| test_domain_range_scale_XYZ_to_ATD95 | python | colour-science/colour | colour/appearance/tests/test_atd95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_atd95.py | BSD-3-Clause |
def test_nan_XYZ_to_ATD95(self) -> None:
"""
Test :func:`colour.appearance.atd95.XYZ_to_ATD95` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
XYZ_to_ATD95(cases, cases, cases[...... |
Test :func:`colour.appearance.atd95.XYZ_to_ATD95` definition nan
support.
| test_nan_XYZ_to_ATD95 | python | colour-science/colour | colour/appearance/tests/test_atd95.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_atd95.py | BSD-3-Clause |
def test_n_dimensional_XYZ_to_CAM16(self) -> None:
"""
Test :func:`colour.appearance.cam16.XYZ_to_CAM16` definition
n-dimensional support.
"""
XYZ = np.array([19.01, 20.00, 21.78])
XYZ_w = np.array([95.05, 100.00, 108.88])
L_A = 318.31
Y_b = 20
su... |
Test :func:`colour.appearance.cam16.XYZ_to_CAM16` definition
n-dimensional support.
| test_n_dimensional_XYZ_to_CAM16 | python | colour-science/colour | colour/appearance/tests/test_cam16.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_cam16.py | BSD-3-Clause |
def test_domain_range_scale_XYZ_to_CAM16(self) -> None:
"""
Test :func:`colour.appearance.cam16.XYZ_to_CAM16` definition domain
and range scale support.
"""
XYZ = np.array([19.01, 20.00, 21.78])
XYZ_w = np.array([95.05, 100.00, 108.88])
L_A = 318.31
Y_b =... |
Test :func:`colour.appearance.cam16.XYZ_to_CAM16` definition domain
and range scale support.
| test_domain_range_scale_XYZ_to_CAM16 | python | colour-science/colour | colour/appearance/tests/test_cam16.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_cam16.py | BSD-3-Clause |
def test_nan_XYZ_to_CAM16(self) -> None:
"""
Test :func:`colour.appearance.cam16.XYZ_to_CAM16` definition
nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
surround = InductionFactors_CAM16(ca... |
Test :func:`colour.appearance.cam16.XYZ_to_CAM16` definition
nan support.
| test_nan_XYZ_to_CAM16 | python | colour-science/colour | colour/appearance/tests/test_cam16.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_cam16.py | BSD-3-Clause |
def test_n_dimensional_CAM16_to_XYZ(self) -> None:
"""
Test :func:`colour.appearance.cam16.CAM16_to_XYZ` definition
n-dimensional support.
"""
XYZ = np.array([19.01, 20.00, 21.78])
XYZ_w = np.array([95.05, 100.00, 108.88])
L_A = 318.31
Y_b = 20
su... |
Test :func:`colour.appearance.cam16.CAM16_to_XYZ` definition
n-dimensional support.
| test_n_dimensional_CAM16_to_XYZ | python | colour-science/colour | colour/appearance/tests/test_cam16.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_cam16.py | BSD-3-Clause |
def test_domain_range_scale_CAM16_to_XYZ(self) -> None:
"""
Test :func:`colour.appearance.cam16.CAM16_to_XYZ` definition domain
and range scale support.
"""
XYZ = np.array([19.01, 20.00, 21.78])
XYZ_w = np.array([95.05, 100.00, 108.88])
L_A = 318.31
Y_b =... |
Test :func:`colour.appearance.cam16.CAM16_to_XYZ` definition domain
and range scale support.
| test_domain_range_scale_CAM16_to_XYZ | python | colour-science/colour | colour/appearance/tests/test_cam16.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_cam16.py | BSD-3-Clause |
def test_raise_exception_CAM16_to_XYZ(self) -> None:
"""
Test :func:`colour.appearance.cam16.CAM16_to_XYZ` definition raised
exception.
"""
pytest.raises(
ValueError,
CAM16_to_XYZ,
CAM_Specification_CAM16(41.731207905126638, None, 217.06795976... |
Test :func:`colour.appearance.cam16.CAM16_to_XYZ` definition raised
exception.
| test_raise_exception_CAM16_to_XYZ | python | colour-science/colour | colour/appearance/tests/test_cam16.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_cam16.py | BSD-3-Clause |
def test_nan_CAM16_to_XYZ(self) -> None:
"""
Test :func:`colour.appearance.cam16.CAM16_to_XYZ` definition nan
support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
surround = InductionFactors_CAM16(ca... |
Test :func:`colour.appearance.cam16.CAM16_to_XYZ` definition nan
support.
| test_nan_CAM16_to_XYZ | python | colour-science/colour | colour/appearance/tests/test_cam16.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_cam16.py | BSD-3-Clause |
def test_XYZ_to_CIECAM02(self) -> None:
"""
Test :func:`colour.appearance.ciecam02.XYZ_to_CIECAM02` definition.
Notes
-----
- The test values have been generated from data of the following file
by *Fairchild (2013)*:
http://rit-mcsl.org/fairchild//files... |
Test :func:`colour.appearance.ciecam02.XYZ_to_CIECAM02` definition.
Notes
-----
- The test values have been generated from data of the following file
by *Fairchild (2013)*:
http://rit-mcsl.org/fairchild//files/AppModEx.xls
| test_XYZ_to_CIECAM02 | python | colour-science/colour | colour/appearance/tests/test_ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_ciecam02.py | BSD-3-Clause |
def test_n_dimensional_XYZ_to_CIECAM02(self) -> None:
"""
Test :func:`colour.appearance.ciecam02.XYZ_to_CIECAM02` definition
n-dimensional support.
"""
XYZ = np.array([19.01, 20.00, 21.78])
XYZ_w = np.array([95.05, 100.00, 108.88])
L_A = 318.31
Y_b = 20
... |
Test :func:`colour.appearance.ciecam02.XYZ_to_CIECAM02` definition
n-dimensional support.
| test_n_dimensional_XYZ_to_CIECAM02 | python | colour-science/colour | colour/appearance/tests/test_ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_ciecam02.py | BSD-3-Clause |
def test_domain_range_scale_XYZ_to_CIECAM02(self) -> None:
"""
Test :func:`colour.appearance.ciecam02.XYZ_to_CIECAM02` definition
domain and range scale support.
"""
XYZ = np.array([19.01, 20.00, 21.78])
XYZ_w = np.array([95.05, 100.00, 108.88])
L_A = 318.31
... |
Test :func:`colour.appearance.ciecam02.XYZ_to_CIECAM02` definition
domain and range scale support.
| test_domain_range_scale_XYZ_to_CIECAM02 | python | colour-science/colour | colour/appearance/tests/test_ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_ciecam02.py | BSD-3-Clause |
def test_nan_XYZ_to_CIECAM02(self) -> None:
"""
Test :func:`colour.appearance.ciecam02.XYZ_to_CIECAM02` definition
nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
surround = InductionFactors... |
Test :func:`colour.appearance.ciecam02.XYZ_to_CIECAM02` definition
nan support.
| test_nan_XYZ_to_CIECAM02 | python | colour-science/colour | colour/appearance/tests/test_ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_ciecam02.py | BSD-3-Clause |
def test_n_dimensional_CIECAM02_to_XYZ(self) -> None:
"""
Test :func:`colour.appearance.ciecam02.CIECAM02_to_XYZ` definition
n-dimensional support.
"""
XYZ = np.array([19.01, 20.00, 21.78])
XYZ_w = np.array([95.05, 100.00, 108.88])
L_A = 318.31
Y_b = 20
... |
Test :func:`colour.appearance.ciecam02.CIECAM02_to_XYZ` definition
n-dimensional support.
| test_n_dimensional_CIECAM02_to_XYZ | python | colour-science/colour | colour/appearance/tests/test_ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_ciecam02.py | BSD-3-Clause |
def test_domain_range_scale_CIECAM02_to_XYZ(self) -> None:
"""
Test :func:`colour.appearance.ciecam02.CIECAM02_to_XYZ` definition
domain and range scale support.
"""
XYZ_i = np.array([19.01, 20.00, 21.78])
XYZ_w = np.array([95.05, 100.00, 108.88])
L_A = 318.31
... |
Test :func:`colour.appearance.ciecam02.CIECAM02_to_XYZ` definition
domain and range scale support.
| test_domain_range_scale_CIECAM02_to_XYZ | python | colour-science/colour | colour/appearance/tests/test_ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_ciecam02.py | BSD-3-Clause |
def test_raise_exception_CIECAM02_to_XYZ(self) -> None:
"""
Test :func:`colour.appearance.ciecam02.CIECAM02_to_XYZ` definition
raised exception.
"""
pytest.raises(
ValueError,
CIECAM02_to_XYZ,
CAM_Specification_CIECAM02(41.731091132513917, Non... |
Test :func:`colour.appearance.ciecam02.CIECAM02_to_XYZ` definition
raised exception.
| test_raise_exception_CIECAM02_to_XYZ | python | colour-science/colour | colour/appearance/tests/test_ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_ciecam02.py | BSD-3-Clause |
def test_nan_CIECAM02_to_XYZ(self) -> None:
"""
Test :func:`colour.appearance.ciecam02.CIECAM02_to_XYZ` definition
nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=3))))
surround = InductionFactors... |
Test :func:`colour.appearance.ciecam02.CIECAM02_to_XYZ` definition
nan support.
| test_nan_CIECAM02_to_XYZ | python | colour-science/colour | colour/appearance/tests/test_ciecam02.py | https://github.com/colour-science/colour/blob/master/colour/appearance/tests/test_ciecam02.py | BSD-3-Clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.