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 sds_and_msds_to_sds(
sds: (
Sequence[SpectralDistribution | MultiSpectralDistributions]
| SpectralDistribution
| MultiSpectralDistributions
| ValuesView
),
) -> List[SpectralDistribution]:
"""
Convert specified spectral and multi-spectral distributions to a list of
... |
Convert specified spectral and multi-spectral distributions to a list of
spectral distributions.
Parameters
----------
sds
Spectral and multi-spectral distributions to convert to a list of
spectral distributions.
Returns
-------
:class:`list`
List of spectral d... | sds_and_msds_to_sds | python | colour-science/colour | colour/colorimetry/spectrum.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/spectrum.py | BSD-3-Clause |
def sds_and_msds_to_msds(
sds: (
Sequence[SpectralDistribution | MultiSpectralDistributions]
| SpectralDistribution
| MultiSpectralDistributions
| ValuesView
),
) -> MultiSpectralDistributions:
"""
Convert specified spectral and multi-spectral distributions to
multi-s... |
Convert specified spectral and multi-spectral distributions to
multi-spectral distributions.
The spectral and multi-spectral distributions will be aligned to the
intersection of their spectral shapes.
Parameters
----------
sds
Spectral and multi-spectral distributions to convert t... | sds_and_msds_to_msds | python | colour-science/colour | colour/colorimetry/spectrum.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/spectrum.py | BSD-3-Clause |
def RGB_2_degree_cmfs_to_XYZ_2_degree_cmfs(
wavelength: ArrayLike,
) -> NDArrayFloat:
"""
Convert *Wright & Guild 1931 2 Degree RGB CMFs* colour matching functions
into the *CIE 1931 2 Degree Standard Observer* colour matching functions.
Parameters
----------
wavelength
Wavelength :... |
Convert *Wright & Guild 1931 2 Degree RGB CMFs* colour matching functions
into the *CIE 1931 2 Degree Standard Observer* colour matching functions.
Parameters
----------
wavelength
Wavelength :math:`\lambda` in nm.
Returns
-------
:class:`numpy.ndarray`
*CIE 1931 2 Deg... | RGB_2_degree_cmfs_to_XYZ_2_degree_cmfs | python | colour-science/colour | colour/colorimetry/transformations.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/transformations.py | BSD-3-Clause |
def RGB_10_degree_cmfs_to_XYZ_10_degree_cmfs(
wavelength: ArrayLike,
) -> NDArrayFloat:
"""
Convert *Stiles & Burch 1959 10 Degree RGB CMFs* colour matching
functions into the *CIE 1964 10 Degree Standard Observer* colour matching
functions.
Parameters
----------
wavelength
Wave... |
Convert *Stiles & Burch 1959 10 Degree RGB CMFs* colour matching
functions into the *CIE 1964 10 Degree Standard Observer* colour matching
functions.
Parameters
----------
wavelength
Wavelength :math:`\lambda` in nm.
Returns
-------
:class:`numpy.ndarray`
*CIE 1964... | RGB_10_degree_cmfs_to_XYZ_10_degree_cmfs | python | colour-science/colour | colour/colorimetry/transformations.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/transformations.py | BSD-3-Clause |
def RGB_10_degree_cmfs_to_LMS_10_degree_cmfs(
wavelength: ArrayLike,
) -> NDArrayFloat:
"""
Convert *Stiles & Burch 1959 10 Degree RGB CMFs* colour matching
functions into the *Stockman & Sharpe 10 Degree Cone Fundamentals*
spectral sensitivity functions.
Parameters
----------
wavelengt... |
Convert *Stiles & Burch 1959 10 Degree RGB CMFs* colour matching
functions into the *Stockman & Sharpe 10 Degree Cone Fundamentals*
spectral sensitivity functions.
Parameters
----------
wavelength
Wavelength :math:`\lambda` in nm.
Returns
-------
:class:`numpy.ndarray`
... | RGB_10_degree_cmfs_to_LMS_10_degree_cmfs | python | colour-science/colour | colour/colorimetry/transformations.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/transformations.py | BSD-3-Clause |
def LMS_2_degree_cmfs_to_XYZ_2_degree_cmfs(
wavelength: ArrayLike,
) -> NDArrayFloat:
"""
Convert *Stockman & Sharpe 2 Degree Cone Fundamentals* colour matching
functions into the *CIE 2015 2 Degree Standard Observer* colour matching
functions.
Parameters
----------
wavelength
W... |
Convert *Stockman & Sharpe 2 Degree Cone Fundamentals* colour matching
functions into the *CIE 2015 2 Degree Standard Observer* colour matching
functions.
Parameters
----------
wavelength
Wavelength :math:`\lambda` in nm.
Returns
-------
:class:`numpy.ndarray`
*CIE... | LMS_2_degree_cmfs_to_XYZ_2_degree_cmfs | python | colour-science/colour | colour/colorimetry/transformations.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/transformations.py | BSD-3-Clause |
def LMS_10_degree_cmfs_to_XYZ_10_degree_cmfs(
wavelength: ArrayLike,
) -> NDArrayFloat:
"""
Convert *Stockman & Sharpe 10 Degree Cone Fundamentals* colour matching
functions into the *CIE 2015 10 Degree Standard Observer* colour matching
functions.
Parameters
----------
wavelength
... |
Convert *Stockman & Sharpe 10 Degree Cone Fundamentals* colour matching
functions into the *CIE 2015 10 Degree Standard Observer* colour matching
functions.
Parameters
----------
wavelength
Wavelength :math:`\lambda` in nm.
Returns
-------
:class:`numpy.ndarray`
*C... | LMS_10_degree_cmfs_to_XYZ_10_degree_cmfs | python | colour-science/colour | colour/colorimetry/transformations.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/transformations.py | BSD-3-Clause |
def handle_spectral_arguments(
cmfs: MultiSpectralDistributions | None = None,
illuminant: SpectralDistribution | None = None,
cmfs_default: str = "CIE 1931 2 Degree Standard Observer",
illuminant_default: str = "D65",
shape_default: SpectralShape = SPECTRAL_SHAPE_DEFAULT,
issue_runtime_warnings... |
Handle the spectral arguments of various *Colour* definitions performing
spectral computations.
- If ``cmfs`` is not specified, one is chosen according to ``cmfs_default``.
The returned colour matching functions adopt the spectral shape specified
by ``shape_default``.
- If ``illumi... | handle_spectral_arguments | python | colour-science/colour | colour/colorimetry/tristimulus_values.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tristimulus_values.py | BSD-3-Clause |
def lagrange_coefficients_ASTME2022(
interval: int = 10,
interval_type: Literal["Boundary", "Inner"] | str = "Inner",
) -> NDArrayFloat:
"""
Compute the *Lagrange Coefficients* for specified interval size using practise
*ASTM E2022-11* method.
Parameters
----------
interval
Inte... |
Compute the *Lagrange Coefficients* for specified interval size using practise
*ASTM E2022-11* method.
Parameters
----------
interval
Interval size in nm.
interval_type
If the interval is an *inner* interval *Lagrange Coefficients* are
computed for degree 4. Degree 3 is... | lagrange_coefficients_ASTME2022 | python | colour-science/colour | colour/colorimetry/tristimulus_values.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tristimulus_values.py | BSD-3-Clause |
def adjust_tristimulus_weighting_factors_ASTME308(
W: ArrayLike, shape_r: SpectralShape, shape_t: SpectralShape
) -> NDArrayFloat:
"""
Adjust specified table of tristimulus weighting factors to account for a
shorter wavelengths range of the test spectral shape compared to the
reference spectral shap... |
Adjust specified table of tristimulus weighting factors to account for a
shorter wavelengths range of the test spectral shape compared to the
reference spectral shape using practise *ASTM E308-15* method:
Weights at the wavelengths for which data are not available are added to
the weights at the sh... | adjust_tristimulus_weighting_factors_ASTME308 | python | colour-science/colour | colour/colorimetry/tristimulus_values.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tristimulus_values.py | BSD-3-Clause |
def wavelength_to_XYZ(
wavelength: ArrayLike,
cmfs: MultiSpectralDistributions | None = None,
) -> NDArrayFloat:
"""
Convert specified wavelength :math:`\\lambda` to *CIE XYZ* tristimulus values
using specified colour matching functions.
If the wavelength :math:`\\lambda` is not available in th... |
Convert specified wavelength :math:`\lambda` to *CIE XYZ* tristimulus values
using specified colour matching functions.
If the wavelength :math:`\lambda` is not available in the colour matching
function, its value will be calculated according to *CIE 15:2004*
recommendation: the method developed b... | wavelength_to_XYZ | python | colour-science/colour | colour/colorimetry/tristimulus_values.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tristimulus_values.py | BSD-3-Clause |
def whiteness_Berger1959(XYZ: ArrayLike, XYZ_0: ArrayLike) -> NDArrayFloat:
"""
Return the *whiteness* index :math:`WI` of specified sample *CIE XYZ*
tristimulus values using *Berger (1959)* method.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of the sample.
XYZ_0
... |
Return the *whiteness* index :math:`WI` of specified sample *CIE XYZ*
tristimulus values using *Berger (1959)* method.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of the sample.
XYZ_0
*CIE XYZ* tristimulus values of the reference white.
Returns
-------
:... | whiteness_Berger1959 | python | colour-science/colour | colour/colorimetry/whiteness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/whiteness.py | BSD-3-Clause |
def whiteness_Taube1960(XYZ: ArrayLike, XYZ_0: ArrayLike) -> NDArrayFloat:
"""
Return the *whiteness* index :math:`WI` of specified sample *CIE XYZ*
tristimulus values using *Taube (1960)* method.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of the sample.
XYZ_0
*C... |
Return the *whiteness* index :math:`WI` of specified sample *CIE XYZ*
tristimulus values using *Taube (1960)* method.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of the sample.
XYZ_0
*CIE XYZ* tristimulus values of the reference white.
Returns
-------
:c... | whiteness_Taube1960 | python | colour-science/colour | colour/colorimetry/whiteness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/whiteness.py | BSD-3-Clause |
def whiteness_Stensby1968(Lab: ArrayLike) -> NDArrayFloat:
"""
Return the *whiteness* index :math:`WI` of specified sample *CIE L\\*a\\*b\\**
colourspace array using *Stensby (1968)* method.
Parameters
----------
Lab
*CIE L\\*a\\*b\\** colourspace array of the sample.
Returns
-... |
Return the *whiteness* index :math:`WI` of specified sample *CIE L\*a\*b\**
colourspace array using *Stensby (1968)* method.
Parameters
----------
Lab
*CIE L\*a\*b\** colourspace array of the sample.
Returns
-------
:class:`np.float` or :class:`numpy.ndarray`
*Whitenes... | whiteness_Stensby1968 | python | colour-science/colour | colour/colorimetry/whiteness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/whiteness.py | BSD-3-Clause |
def whiteness_ASTME313(XYZ: ArrayLike) -> NDArrayFloat:
"""
Return the *whiteness* index :math:`WI` of specified sample *CIE XYZ*
tristimulus values using *ASTM E313* method.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of the sample.
Returns
-------
:class:`np.fl... |
Return the *whiteness* index :math:`WI` of specified sample *CIE XYZ*
tristimulus values using *ASTM E313* method.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of the sample.
Returns
-------
:class:`np.float` or :class:`numpy.ndarray`
*Whiteness* :math:`WI`.
... | whiteness_ASTME313 | python | colour-science/colour | colour/colorimetry/whiteness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/whiteness.py | BSD-3-Clause |
def whiteness_Ganz1979(xy: ArrayLike, Y: ArrayLike) -> NDArrayFloat:
"""
Return the *whiteness* index :math:`W` and *tint* :math:`T` of specified
sample *CIE xy* chromaticity coordinates using *Ganz and Griesser (1979)*
method.
Parameters
----------
xy
Chromaticity coordinates *CIE ... |
Return the *whiteness* index :math:`W` and *tint* :math:`T` of specified
sample *CIE xy* chromaticity coordinates using *Ganz and Griesser (1979)*
method.
Parameters
----------
xy
Chromaticity coordinates *CIE xy* of the sample.
Y
Tristimulus :math:`Y` value of the sample.
... | whiteness_Ganz1979 | python | colour-science/colour | colour/colorimetry/whiteness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/whiteness.py | BSD-3-Clause |
def whiteness(
XYZ: ArrayLike,
XYZ_0: ArrayLike,
method: (
Literal[
"ASTM E313",
"CIE 2004",
"Berger 1959",
"Ganz 1979",
"Stensby 1968",
"Taube 1960",
]
| str
) = "CIE 2004",
**kwargs: Any,
) -> NDArrayFl... |
Return the *whiteness* :math:`W` using specified method.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of the sample.
XYZ_0
*CIE XYZ* tristimulus values of the reference white.
method
Computation method.
Other Parameters
----------------
observer
... | whiteness | python | colour-science/colour | colour/colorimetry/whiteness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/whiteness.py | BSD-3-Clause |
def yellowness_ASTMD1925(XYZ: ArrayLike) -> NDArrayFloat:
"""
Return the *yellowness* index :math:`YI` of specified sample *CIE XYZ*
tristimulus values using *ASTM D1925* method.
ASTM D1925 has been specifically developed for the definition of the
yellowness of homogeneous, non-fluorescent, almost ... |
Return the *yellowness* index :math:`YI` of specified sample *CIE XYZ*
tristimulus values using *ASTM D1925* method.
ASTM D1925 has been specifically developed for the definition of the
yellowness of homogeneous, non-fluorescent, almost neutral-transparent,
white-scattering or opaque plastics as t... | yellowness_ASTMD1925 | python | colour-science/colour | colour/colorimetry/yellowness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/yellowness.py | BSD-3-Clause |
def yellowness_ASTME313(
XYZ: ArrayLike,
C_XZ: ArrayLike = YELLOWNESS_COEFFICIENTS_ASTME313[
"CIE 1931 2 Degree Standard Observer"
]["D65"],
) -> NDArrayFloat:
"""
Return the *yellowness* index :math:`YI` of specified sample *CIE XYZ*
tristimulus values using *ASTM E313* method.
AST... |
Return the *yellowness* index :math:`YI` of specified sample *CIE XYZ*
tristimulus values using *ASTM E313* method.
ASTM E313 has successfully been used for a variety of white or near white
materials. This includes coatings, plastics, textiles.
Parameters
----------
XYZ
*CIE XYZ* ... | yellowness_ASTME313 | python | colour-science/colour | colour/colorimetry/yellowness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/yellowness.py | BSD-3-Clause |
def yellowness(
XYZ: ArrayLike,
method: (
Literal["ASTM D1925", "ASTM E313", "ASTM E313 Alternative"] | str
) = "ASTM E313",
**kwargs: Any,
) -> NDArrayFloat:
"""
Return the *yellowness* :math:`W` using specified method.
Parameters
----------
XYZ
*CIE XYZ* tristimulu... |
Return the *yellowness* :math:`W` using specified method.
Parameters
----------
XYZ
*CIE XYZ* tristimulus values of the sample.
method
Computation method.
Other Parameters
----------------
C_XZ
{:func:`colour.colorimetry.yellowness_ASTME313`},
Coefficie... | yellowness | python | colour-science/colour | colour/colorimetry/yellowness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/yellowness.py | BSD-3-Clause |
def test_planck_law(self) -> None:
"""Test :func:`colour.colorimetry.blackbody.planck_law` definition."""
wavelengths = 2 ** np.arange(0, 16, 1) * 1e-9
for temperature, radiance in sorted(DATA_PLANCK_LAW.items()):
np.testing.assert_allclose(
planck_law(wavelengths, t... | Test :func:`colour.colorimetry.blackbody.planck_law` definition. | test_planck_law | python | colour-science/colour | colour/colorimetry/tests/test_blackbody.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_blackbody.py | BSD-3-Clause |
def test_n_dimensional_planck_law(self) -> None:
"""
Test :func:`colour.colorimetry.blackbody.planck_law` definition
n-dimensional arrays support.
"""
wl = 500 * 1e-9
p = planck_law(wl, 5500)
wl = np.tile(wl, 6)
p = np.tile(p, 6)
np.testing.asser... |
Test :func:`colour.colorimetry.blackbody.planck_law` definition
n-dimensional arrays support.
| test_n_dimensional_planck_law | python | colour-science/colour | colour/colorimetry/tests/test_blackbody.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_blackbody.py | BSD-3-Clause |
def test_raise_exception_planck_law(self) -> None:
"""
Test :func:`colour.colorimetry.blackbody.planck_law` definition
raised exception.
"""
for wavelength in [-1.0, 0.0, -np.inf, np.nan]:
pytest.raises(AssertionError, planck_law, wavelength, 5500) |
Test :func:`colour.colorimetry.blackbody.planck_law` definition
raised exception.
| test_raise_exception_planck_law | python | colour-science/colour | colour/colorimetry/tests/test_blackbody.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_blackbody.py | BSD-3-Clause |
def test_nan_planck_law(self) -> None:
"""
Test :func:`colour.colorimetry.blackbody.planck_law` definition nan
support.
"""
# NOTE: Only testing infinity support as
cases = [1.0, np.inf]
cases = np.array(list(set(product(cases, repeat=3))))
planck_law(cas... |
Test :func:`colour.colorimetry.blackbody.planck_law` definition nan
support.
| test_nan_planck_law | python | colour-science/colour | colour/colorimetry/tests/test_blackbody.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_blackbody.py | BSD-3-Clause |
def test_sd_blackbody(self) -> None:
"""Test :func:`colour.colorimetry.blackbody.sd_blackbody` definition."""
np.testing.assert_allclose(
sd_blackbody(5000, SpectralShape(360, 830, 1)).values,
DATA_BLACKBODY,
atol=TOLERANCE_ABSOLUTE_TESTS,
) | Test :func:`colour.colorimetry.blackbody.sd_blackbody` definition. | test_sd_blackbody | python | colour-science/colour | colour/colorimetry/tests/test_blackbody.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_blackbody.py | BSD-3-Clause |
def test_rayleigh_jeans_law(self) -> None:
"""
Test :func:`colour.colorimetry.blackbody.rayleigh_jeans_law`
definition.
"""
wavelengths = 2 ** np.arange(0, 16, 1) * 1e-9
for temperature, radiance in sorted(DATA_RAYLEIGH_JEANS_LAW.items()):
np.testing.assert_a... |
Test :func:`colour.colorimetry.blackbody.rayleigh_jeans_law`
definition.
| test_rayleigh_jeans_law | python | colour-science/colour | colour/colorimetry/tests/test_blackbody.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_blackbody.py | BSD-3-Clause |
def test_n_dimensional_rayleigh_jeans_law(self) -> None:
"""
Test :func:`colour.colorimetry.blackbody.rayleigh_jeans_law` definition
n-dimensional arrays support.
"""
wl = 500 * 1e-9
p = rayleigh_jeans_law(wl, 5500)
wl = np.tile(wl, 6)
p = np.tile(p, 6)
... |
Test :func:`colour.colorimetry.blackbody.rayleigh_jeans_law` definition
n-dimensional arrays support.
| test_n_dimensional_rayleigh_jeans_law | python | colour-science/colour | colour/colorimetry/tests/test_blackbody.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_blackbody.py | BSD-3-Clause |
def test_nan_rayleigh_jeans_law(self) -> None:
"""
Test :func:`colour.colorimetry.blackbody.rayleigh_jeans_law` 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))))
rayleigh_jeans_law(... |
Test :func:`colour.colorimetry.blackbody.rayleigh_jeans_law` definition
nan support.
| test_nan_rayleigh_jeans_law | python | colour-science/colour | colour/colorimetry/tests/test_blackbody.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_blackbody.py | BSD-3-Clause |
def test_sd_rayleigh_jeans(self) -> None:
"""
Test :func:`colour.colorimetry.blackbody.sd_rayleigh_jeans`
definition.
"""
np.testing.assert_allclose(
sd_rayleigh_jeans(5000, SpectralShape(360, 830, 1)).values,
DATA_RAYLEIGH_JEANS,
atol=TOLERAN... |
Test :func:`colour.colorimetry.blackbody.sd_rayleigh_jeans`
definition.
| test_sd_rayleigh_jeans | python | colour-science/colour | colour/colorimetry/tests/test_blackbody.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_blackbody.py | BSD-3-Clause |
def test_bandpass_correction_Stearns1988(self) -> None:
"""
Test :func:`colour.colorimetry.correction.\
bandpass_correction_Stearns1988` definition.
"""
sd = SpectralDistribution(
dict(
zip(
range(len(DATA_NON_BANDPASS_CORRECTED)),
... |
Test :func:`colour.colorimetry.correction.bandpass_correction_Stearns1988` definition.
| test_bandpass_correction_Stearns1988 | python | colour-science/colour | colour/colorimetry/tests/test_correction.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_correction.py | BSD-3-Clause |
def test_closest_spectral_locus_wavelength(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.\
closest_spectral_locus_wavelength` definition.
"""
xy = np.array([0.54369557, 0.32107944])
xy_n = self._xy_D65
i_wl, xy_wl = closest_spectral_locus_wavelength(xy, xy_n... |
Test :func:`colour.colorimetry.dominant.closest_spectral_locus_wavelength` definition.
| test_closest_spectral_locus_wavelength | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_n_dimensional_closest_spectral_locus_wavelength(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.\
closest_spectral_locus_wavelength` definition n-dimensional arrays support.
"""
xy = np.array([0.54369557, 0.32107944])
xy_n = self._xy_D65
i_wl, xy_wl =... |
Test :func:`colour.colorimetry.dominant.closest_spectral_locus_wavelength` definition n-dimensional arrays support.
| test_n_dimensional_closest_spectral_locus_wavelength | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_nan_closest_spectral_locus_wavelength(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.\
closest_spectral_locus_wavelength` definition nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=2))))
... |
Test :func:`colour.colorimetry.dominant.closest_spectral_locus_wavelength` definition nan support.
| test_nan_closest_spectral_locus_wavelength | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_dominant_wavelength(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.dominant_wavelength`
definition.
"""
xy = np.array([0.54369557, 0.32107944])
xy_n = self._xy_D65
wl, xy_wl, xy_cwl = dominant_wavelength(xy, xy_n)
assert wl == np.arr... |
Test :func:`colour.colorimetry.dominant.dominant_wavelength`
definition.
| test_dominant_wavelength | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_n_dimensional_dominant_wavelength(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.dominant_wavelength`
definition n-dimensional arrays support.
"""
xy = np.array([0.54369557, 0.32107944])
xy_n = self._xy_D65
wl, xy_wl, xy_cwl = dominant_wavele... |
Test :func:`colour.colorimetry.dominant.dominant_wavelength`
definition n-dimensional arrays support.
| test_n_dimensional_dominant_wavelength | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_nan_dominant_wavelength(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.dominant_wavelength`
definition nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=2))))
for case in cases:... |
Test :func:`colour.colorimetry.dominant.dominant_wavelength`
definition nan support.
| test_nan_dominant_wavelength | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_complementary_wavelength(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.complementary_wavelength`
definition.
"""
xy = np.array([0.54369557, 0.32107944])
xy_n = self._xy_D65
wl, xy_wl, xy_cwl = complementary_wavelength(xy, xy_n)
asse... |
Test :func:`colour.colorimetry.dominant.complementary_wavelength`
definition.
| test_complementary_wavelength | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_n_dimensional_complementary_wavelength(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.complementary_wavelength`
definition n-dimensional arrays support.
"""
xy = np.array([0.54369557, 0.32107944])
xy_n = self._xy_D65
wl, xy_wl, xy_cwl = compl... |
Test :func:`colour.colorimetry.dominant.complementary_wavelength`
definition n-dimensional arrays support.
| test_n_dimensional_complementary_wavelength | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_nan_complementary_wavelength(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.complementary_wavelength`
definition nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=2))))
for case... |
Test :func:`colour.colorimetry.dominant.complementary_wavelength`
definition nan support.
| test_nan_complementary_wavelength | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_excitation_purity(self) -> None:
"""Test :func:`colour.colorimetry.dominant.excitation_purity` definition."""
xy = np.array([0.54369557, 0.32107944])
xy_n = self._xy_D65
np.testing.assert_allclose(
excitation_purity(xy, xy_n),
0.622885671878446,
... | Test :func:`colour.colorimetry.dominant.excitation_purity` definition. | test_excitation_purity | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_n_dimensional_excitation_purity(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.excitation_purity` definition
n-dimensional arrays support.
"""
xy = np.array([0.54369557, 0.32107944])
xy_n = self._xy_D65
P_e = excitation_purity(xy, xy_n)
... |
Test :func:`colour.colorimetry.dominant.excitation_purity` definition
n-dimensional arrays support.
| test_n_dimensional_excitation_purity | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_nan_excitation_purity(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.excitation_purity` definition
nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=2))))
for case in cases:
... |
Test :func:`colour.colorimetry.dominant.excitation_purity` definition
nan support.
| test_nan_excitation_purity | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_colorimetric_purity(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.colorimetric_purity`
definition.
"""
xy = np.array([0.54369557, 0.32107944])
xy_n = self._xy_D65
np.testing.assert_allclose(
colorimetric_purity(xy, xy_n),
... |
Test :func:`colour.colorimetry.dominant.colorimetric_purity`
definition.
| test_colorimetric_purity | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_n_dimensional_colorimetric_purity(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.colorimetric_purity`
definition n-dimensional arrays support.
"""
xy = np.array([0.54369557, 0.32107944])
xy_n = self._xy_D65
P_e = colorimetric_purity(xy, xy_n)... |
Test :func:`colour.colorimetry.dominant.colorimetric_purity`
definition n-dimensional arrays support.
| test_n_dimensional_colorimetric_purity | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_nan_colorimetric_purity(self) -> None:
"""
Test :func:`colour.colorimetry.dominant.colorimetric_purity`
definition nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=2))))
for case in cases:... |
Test :func:`colour.colorimetry.dominant.colorimetric_purity`
definition nan support.
| test_nan_colorimetric_purity | python | colour-science/colour | colour/colorimetry/tests/test_dominant.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_dominant.py | BSD-3-Clause |
def test_sd_constant(self) -> None:
"""Test :func:`colour.colorimetry.generation.sd_constant` definition."""
sd = sd_constant(np.pi)
np.testing.assert_allclose(sd[360], np.pi, atol=TOLERANCE_ABSOLUTE_TESTS)
np.testing.assert_allclose(sd[555], np.pi, atol=TOLERANCE_ABSOLUTE_TESTS)
... | Test :func:`colour.colorimetry.generation.sd_constant` definition. | test_sd_constant | python | colour-science/colour | colour/colorimetry/tests/test_generation.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_generation.py | BSD-3-Clause |
def test_sd_zeros(self) -> None:
"""
Test :func:`colour.colorimetry.generation.sd_zeros`
definition.
"""
sd = sd_zeros()
assert sd[360] == 0
assert sd[555] == 0
assert sd[780] == 0 |
Test :func:`colour.colorimetry.generation.sd_zeros`
definition.
| test_sd_zeros | python | colour-science/colour | colour/colorimetry/tests/test_generation.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_generation.py | BSD-3-Clause |
def test_sd_ones(self) -> None:
"""Test :func:`colour.colorimetry.generation.sd_ones` definition."""
sd = sd_ones()
assert sd[360] == 1
assert sd[555] == 1
assert sd[780] == 1 | Test :func:`colour.colorimetry.generation.sd_ones` definition. | test_sd_ones | python | colour-science/colour | colour/colorimetry/tests/test_generation.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_generation.py | BSD-3-Clause |
def test_msds_constant(self) -> None:
"""Test :func:`colour.colorimetry.generation.msds_constant` definition."""
msds = msds_constant(np.pi, labels=["a", "b", "c"])
np.testing.assert_allclose(
msds[360],
np.array([np.pi, np.pi, np.pi]),
atol=TOLERANCE_ABSOLU... | Test :func:`colour.colorimetry.generation.msds_constant` definition. | test_msds_constant | python | colour-science/colour | colour/colorimetry/tests/test_generation.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_generation.py | BSD-3-Clause |
def test_msds_zeros(self) -> None:
"""
Test :func:`colour.colorimetry.generation.msds_zeros`
definition.
"""
msds = msds_zeros(labels=["a", "b", "c"])
np.testing.assert_equal(msds[360], np.array([0, 0, 0]))
np.testing.assert_equal(msds[555], np.array([0, 0, 0])... |
Test :func:`colour.colorimetry.generation.msds_zeros`
definition.
| test_msds_zeros | python | colour-science/colour | colour/colorimetry/tests/test_generation.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_generation.py | BSD-3-Clause |
def test_msds_ones(self) -> None:
"""Test :func:`colour.colorimetry.generation.msds_ones` definition."""
msds = msds_ones(labels=["a", "b", "c"])
np.testing.assert_equal(msds[360], np.array([1, 1, 1]))
np.testing.assert_equal(msds[555], np.array([1, 1, 1]))
np.testing.assert_... | Test :func:`colour.colorimetry.generation.msds_ones` definition. | test_msds_ones | python | colour-science/colour | colour/colorimetry/tests/test_generation.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_generation.py | BSD-3-Clause |
def test_sd_gaussian_normal(self) -> None:
"""
Test :func:`colour.colorimetry.generation.sd_gaussian_normal`
definition.
"""
sd = sd_gaussian_normal(555, 25)
np.testing.assert_allclose(
sd[530], 0.606530659712633, atol=TOLERANCE_ABSOLUTE_TESTS
)
... |
Test :func:`colour.colorimetry.generation.sd_gaussian_normal`
definition.
| test_sd_gaussian_normal | python | colour-science/colour | colour/colorimetry/tests/test_generation.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_generation.py | BSD-3-Clause |
def test_sd_gaussian_fwhm(self) -> None:
"""
Test :func:`colour.colorimetry.generation.sd_gaussian_fwhm` definition.
"""
sd = sd_gaussian_fwhm(555, 25)
np.testing.assert_allclose(sd[530], 0.0625, atol=TOLERANCE_ABSOLUTE_TESTS)
np.testing.assert_allclose(sd[555], 1, ato... |
Test :func:`colour.colorimetry.generation.sd_gaussian_fwhm` definition.
| test_sd_gaussian_fwhm | python | colour-science/colour | colour/colorimetry/tests/test_generation.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_generation.py | BSD-3-Clause |
def test_sd_single_led_Ohno2005(self) -> None:
"""
Test :func:`colour.colorimetry.generation.sd_single_led_Ohno2005`
definition.
"""
sd = sd_single_led_Ohno2005(555, 25)
np.testing.assert_allclose(
sd[530], 0.127118445056538, atol=TOLERANCE_ABSOLUTE_TESTS
... |
Test :func:`colour.colorimetry.generation.sd_single_led_Ohno2005`
definition.
| test_sd_single_led_Ohno2005 | python | colour-science/colour | colour/colorimetry/tests/test_generation.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_generation.py | BSD-3-Clause |
def test_sd_multi_leds_Ohno2005(self) -> None:
"""
Test :func:`colour.colorimetry.generation.sd_multi_leds_Ohno2005`
definition.
"""
sd = sd_multi_leds_Ohno2005(
np.array([457, 530, 615]),
np.array([20, 30, 20]),
np.array([0.731, 1.000, 1.660]... |
Test :func:`colour.colorimetry.generation.sd_multi_leds_Ohno2005`
definition.
| test_sd_multi_leds_Ohno2005 | python | colour-science/colour | colour/colorimetry/tests/test_generation.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_generation.py | BSD-3-Clause |
def test_sd_CIE_standard_illuminant_A(self) -> None:
"""
Test :func:`colour.colorimetry.illuminants.\
sd_CIE_standard_illuminant_A` definition.
"""
np.testing.assert_allclose(
sd_CIE_standard_illuminant_A(SpectralShape(360, 830, 5)).values,
DATA_A,
at... |
Test :func:`colour.colorimetry.illuminants.sd_CIE_standard_illuminant_A` definition.
| test_sd_CIE_standard_illuminant_A | python | colour-science/colour | colour/colorimetry/tests/test_illuminants.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_illuminants.py | BSD-3-Clause |
def test_sd_CIE_illuminant_D_series(self) -> None:
"""
Test :func:`colour.colorimetry.illuminants.\
sd_CIE_illuminant_D_series` definition.
"""
for name, CCT, tolerance in (
("D50", 5000, 0.001),
("D55", 5500, 0.001),
("D65", 6500, 0.001),
... |
Test :func:`colour.colorimetry.illuminants.sd_CIE_illuminant_D_series` definition.
| test_sd_CIE_illuminant_D_series | python | colour-science/colour | colour/colorimetry/tests/test_illuminants.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_illuminants.py | BSD-3-Clause |
def test_daylight_locus_function(self) -> None:
"""
Test :func:`colour.colorimetry.illuminants.daylight_locus_function`
definition.
"""
np.testing.assert_allclose(
daylight_locus_function(0.31270),
0.329105129999999,
atol=TOLERANCE_ABSOLUTE_TE... |
Test :func:`colour.colorimetry.illuminants.daylight_locus_function`
definition.
| test_daylight_locus_function | python | colour-science/colour | colour/colorimetry/tests/test_illuminants.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_illuminants.py | BSD-3-Clause |
def test_n_dimensional_daylight_locus_function(self) -> None:
"""
Test :func:`colour.colorimetry.illuminants.daylight_locus_function`
definition n-dimensional support.
"""
x_D = np.array([0.31270])
y_D = daylight_locus_function(x_D)
x_D = np.tile(x_D, (6, 1))
... |
Test :func:`colour.colorimetry.illuminants.daylight_locus_function`
definition n-dimensional support.
| test_n_dimensional_daylight_locus_function | python | colour-science/colour | colour/colorimetry/tests/test_illuminants.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_illuminants.py | BSD-3-Clause |
def test_mesopic_weighting_function(self) -> None:
"""
Test :func:`colour.colorimetry.lefs.mesopic_weighting_function`
definition.
"""
np.testing.assert_allclose(
mesopic_weighting_function(500, 0.2),
0.70522000,
atol=TOLERANCE_ABSOLUTE_TESTS,... |
Test :func:`colour.colorimetry.lefs.mesopic_weighting_function`
definition.
| test_mesopic_weighting_function | python | colour-science/colour | colour/colorimetry/tests/test_lefs.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lefs.py | BSD-3-Clause |
def test_n_dimensional_mesopic_weighting_function(self) -> None:
"""
Test :func:`colour.colorimetry.lefs.mesopic_weighting_function`
definition n-dimensional arrays support.
"""
wl = 500
Vm = mesopic_weighting_function(wl, 0.2)
wl = np.tile(wl, 6)
Vm = n... |
Test :func:`colour.colorimetry.lefs.mesopic_weighting_function`
definition n-dimensional arrays support.
| test_n_dimensional_mesopic_weighting_function | python | colour-science/colour | colour/colorimetry/tests/test_lefs.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lefs.py | BSD-3-Clause |
def test_nan_mesopic_weighting_function(self) -> None:
"""
Test :func:`colour.colorimetry.lefs.mesopic_weighting_function`
definition nan support.
"""
(
mesopic_weighting_function(
np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]), 0.2
)... |
Test :func:`colour.colorimetry.lefs.mesopic_weighting_function`
definition nan support.
| test_nan_mesopic_weighting_function | python | colour-science/colour | colour/colorimetry/tests/test_lefs.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lefs.py | BSD-3-Clause |
def test_sd_mesopic_luminous_efficiency_function(self) -> None:
"""
Test :func:`colour.colorimetry.lefs.\
sd_mesopic_luminous_efficiency_function` definition.
"""
np.testing.assert_allclose(
sd_mesopic_luminous_efficiency_function(0.2).values,
DATA_MESOPIC_LEF,
... |
Test :func:`colour.colorimetry.lefs.sd_mesopic_luminous_efficiency_function` definition.
| test_sd_mesopic_luminous_efficiency_function | python | colour-science/colour | colour/colorimetry/tests/test_lefs.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lefs.py | BSD-3-Clause |
def test_lightness_Glasser1958(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Glasser1958`
definition.
"""
np.testing.assert_allclose(
lightness_Glasser1958(12.19722535),
39.83512646492521,
atol=TOLERANCE_ABSOLUTE_TESTS,... |
Test :func:`colour.colorimetry.lightness.lightness_Glasser1958`
definition.
| test_lightness_Glasser1958 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_n_dimensional_lightness_Glasser1958(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Glasser1958`
definition n-dimensional arrays support.
"""
Y = 12.19722535
L = lightness_Glasser1958(Y)
Y = np.tile(Y, 6)
L = np.tile(L, 6)
... |
Test :func:`colour.colorimetry.lightness.lightness_Glasser1958`
definition n-dimensional arrays support.
| test_n_dimensional_lightness_Glasser1958 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_domain_range_scale_lightness_Glasser1958(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Glasser1958`
definition domain and range scale support.
"""
L = lightness_Glasser1958(12.19722535)
d_r = (("reference", 1), ("1", 0.01), ("100", 1))
... |
Test :func:`colour.colorimetry.lightness.lightness_Glasser1958`
definition domain and range scale support.
| test_domain_range_scale_lightness_Glasser1958 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_lightness_Wyszecki1963(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Wyszecki1963`
definition.
"""
np.testing.assert_allclose(
lightness_Wyszecki1963(12.19722535),
40.547574599570197,
atol=TOLERANCE_ABSOLUTE_TE... |
Test :func:`colour.colorimetry.lightness.lightness_Wyszecki1963`
definition.
| test_lightness_Wyszecki1963 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_n_dimensional_lightness_Wyszecki1963(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Wyszecki1963`
definition n-dimensional arrays support.
"""
Y = 12.19722535
W = lightness_Wyszecki1963(Y)
Y = np.tile(Y, 6)
W = np.tile(W, ... |
Test :func:`colour.colorimetry.lightness.lightness_Wyszecki1963`
definition n-dimensional arrays support.
| test_n_dimensional_lightness_Wyszecki1963 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_domain_range_scale_lightness_Wyszecki1963(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Wyszecki1963`
definition domain and range scale support.
"""
W = lightness_Wyszecki1963(12.19722535)
d_r = (("reference", 1), ("1", 0.01), ("100", 1)... |
Test :func:`colour.colorimetry.lightness.lightness_Wyszecki1963`
definition domain and range scale support.
| test_domain_range_scale_lightness_Wyszecki1963 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_intermediate_lightness_function_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.\
intermediate_lightness_function_CIE1976` definition.
"""
np.testing.assert_allclose(
intermediate_lightness_function_CIE1976(12.19722535),
0.49592996417... |
Test :func:`colour.colorimetry.lightness.intermediate_lightness_function_CIE1976` definition.
| test_intermediate_lightness_function_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_n_dimensional_intermediate_lightness_function_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.\
intermediate_lightness_function_CIE1976` definition n-dimensional arrays
support.
"""
Y = 12.19722535
f_Y_Y_n = intermediate_lightness_function_CI... |
Test :func:`colour.colorimetry.lightness.intermediate_lightness_function_CIE1976` definition n-dimensional arrays
support.
| test_n_dimensional_intermediate_lightness_function_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_domain_range_scale_intermediate_lightness_function_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.\
intermediate_lightness_function_CIE1976` definition domain and range scale
support.
"""
f_Y_Y_n = intermediate_lightness_function_CIE1976(12.19722535... |
Test :func:`colour.colorimetry.lightness.intermediate_lightness_function_CIE1976` definition domain and range scale
support.
| test_domain_range_scale_intermediate_lightness_function_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_nan_intermediate_lightness_function_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.\
intermediate_lightness_function_CIE1976` definition nan support.
"""
intermediate_lightness_function_CIE1976(
np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]... |
Test :func:`colour.colorimetry.lightness.intermediate_lightness_function_CIE1976` definition nan support.
| test_nan_intermediate_lightness_function_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_lightness_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_CIE1976`
definition.
"""
np.testing.assert_allclose(
lightness_CIE1976(12.19722535),
41.527875844653451,
atol=TOLERANCE_ABSOLUTE_TESTS,
)
... |
Test :func:`colour.colorimetry.lightness.lightness_CIE1976`
definition.
| test_lightness_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_n_dimensional_lightness_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_CIE1976`
definition n-dimensional arrays support.
"""
Y = 12.19722535
L_star = lightness_CIE1976(Y)
Y = np.tile(Y, 6)
L_star = np.tile(L_star, ... |
Test :func:`colour.colorimetry.lightness.lightness_CIE1976`
definition n-dimensional arrays support.
| test_n_dimensional_lightness_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_domain_range_scale_lightness_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_CIE1976`
definition domain and range scale support.
"""
L_star = lightness_CIE1976(12.19722535, 100)
d_r = (("reference", 1), ("1", 0.01), ("100", 1))
... |
Test :func:`colour.colorimetry.lightness.lightness_CIE1976`
definition domain and range scale support.
| test_domain_range_scale_lightness_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_lightness_Fairchild2010(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Fairchild2010`
definition.
"""
np.testing.assert_allclose(
lightness_Fairchild2010(12.19722535 / 100),
31.996390226262736,
atol=TOLERANCE_AB... |
Test :func:`colour.colorimetry.lightness.lightness_Fairchild2010`
definition.
| test_lightness_Fairchild2010 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_n_dimensional_lightness_Fairchild2010(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Fairchild2010`
definition n-dimensional arrays support.
"""
Y = 12.19722535 / 100
L_hdr = lightness_Fairchild2010(Y)
Y = np.tile(Y, 6)
L_... |
Test :func:`colour.colorimetry.lightness.lightness_Fairchild2010`
definition n-dimensional arrays support.
| test_n_dimensional_lightness_Fairchild2010 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_domain_range_scale_lightness_Fairchild2010(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Fairchild2010`
definition domain and range scale support.
"""
L_hdr = lightness_Fairchild2010(12.19722535 / 100)
d_r = (("reference", 1, 1), ("1", 1... |
Test :func:`colour.colorimetry.lightness.lightness_Fairchild2010`
definition domain and range scale support.
| test_domain_range_scale_lightness_Fairchild2010 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_lightness_Fairchild2011(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Fairchild2011`
definition.
"""
np.testing.assert_allclose(
lightness_Fairchild2011(12.19722535 / 100),
51.852958445912506,
atol=TOLERANCE_AB... |
Test :func:`colour.colorimetry.lightness.lightness_Fairchild2011`
definition.
| test_lightness_Fairchild2011 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_n_dimensional_lightness_Fairchild2011(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Fairchild2011`
definition n-dimensional arrays support.
"""
Y = 12.19722535 / 100
L_hdr = lightness_Fairchild2011(Y)
Y = np.tile(Y, 6)
L_... |
Test :func:`colour.colorimetry.lightness.lightness_Fairchild2011`
definition n-dimensional arrays support.
| test_n_dimensional_lightness_Fairchild2011 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_domain_range_scale_lightness_Fairchild2011(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Fairchild2011`
definition domain and range scale support.
"""
L_hdr = lightness_Fairchild2011(12.19722535 / 100)
d_r = (("reference", 1, 1), ("1", 1... |
Test :func:`colour.colorimetry.lightness.lightness_Fairchild2011`
definition domain and range scale support.
| test_domain_range_scale_lightness_Fairchild2011 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_lightness_Abebe2017(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Abebe2017`
definition.
"""
np.testing.assert_allclose(
lightness_Abebe2017(12.19722535),
0.486955571109229,
atol=TOLERANCE_ABSOLUTE_TESTS,
... |
Test :func:`colour.colorimetry.lightness.lightness_Abebe2017`
definition.
| test_lightness_Abebe2017 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_n_dimensional_lightness_Abebe2017(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Abebe2017`
definition n-dimensional arrays support.
"""
Y = 12.19722535
L = lightness_Abebe2017(Y)
Y = np.tile(Y, 6)
L = np.tile(L, 6)
... |
Test :func:`colour.colorimetry.lightness.lightness_Abebe2017`
definition n-dimensional arrays support.
| test_n_dimensional_lightness_Abebe2017 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_domain_range_scale_lightness_Abebe2017(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness_Abebe2017`
definition domain and range scale support.
"""
L = lightness_Abebe2017(12.19722535)
d_r = (("reference", 1), ("1", 1), ("100", 1))
fo... |
Test :func:`colour.colorimetry.lightness.lightness_Abebe2017`
definition domain and range scale support.
| test_domain_range_scale_lightness_Abebe2017 | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_domain_range_scale_lightness(self) -> None:
"""
Test :func:`colour.colorimetry.lightness.lightness` definition domain
and range scale support.
"""
m = (
"Glasser 1958",
"Wyszecki 1963",
"CIE 1976",
"Fairchild 2010",
... |
Test :func:`colour.colorimetry.lightness.lightness` definition domain
and range scale support.
| test_domain_range_scale_lightness | python | colour-science/colour | colour/colorimetry/tests/test_lightness.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_lightness.py | BSD-3-Clause |
def test_luminance_Newhall1943(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.luminance_Newhall1943`
definition.
"""
np.testing.assert_allclose(
luminance_Newhall1943(4.08244375),
12.550078816731881,
atol=TOLERANCE_ABSOLUTE_TESTS,... |
Test :func:`colour.colorimetry.luminance.luminance_Newhall1943`
definition.
| test_luminance_Newhall1943 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_n_dimensional_luminance_Newhall1943(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.luminance_Newhall1943`
definition n-dimensional arrays support.
"""
V = 4.08244375
Y = luminance_Newhall1943(V)
V = np.tile(V, 6)
Y = np.tile(Y, 6)
... |
Test :func:`colour.colorimetry.luminance.luminance_Newhall1943`
definition n-dimensional arrays support.
| test_n_dimensional_luminance_Newhall1943 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_domain_range_scale_luminance_Newhall1943(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.luminance_Newhall1943`
definition domain and range scale support.
"""
Y = luminance_Newhall1943(4.08244375)
d_r = (("reference", 1, 1), ("1", 0.1, 0.01), ("100"... |
Test :func:`colour.colorimetry.luminance.luminance_Newhall1943`
definition domain and range scale support.
| test_domain_range_scale_luminance_Newhall1943 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_luminance_ASTMD1535(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.luminance_ASTMD1535`
definition.
"""
np.testing.assert_allclose(
luminance_ASTMD1535(4.08244375),
12.236342675366036,
atol=TOLERANCE_ABSOLUTE_TESTS,
... |
Test :func:`colour.colorimetry.luminance.luminance_ASTMD1535`
definition.
| test_luminance_ASTMD1535 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_n_dimensional_luminance_ASTMD1535(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.luminance_ASTMD1535`
definition n-dimensional arrays support.
"""
V = 4.08244375
Y = luminance_ASTMD1535(V)
V = np.tile(V, 6)
Y = np.tile(Y, 6)
... |
Test :func:`colour.colorimetry.luminance.luminance_ASTMD1535`
definition n-dimensional arrays support.
| test_n_dimensional_luminance_ASTMD1535 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_domain_range_scale_luminance_ASTMD1535(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.luminance_ASTMD1535`
definition domain and range scale support.
"""
Y = luminance_ASTMD1535(4.08244375)
d_r = (("reference", 1, 1), ("1", 0.1, 0.01), ("100", 10, ... |
Test :func:`colour.colorimetry.luminance.luminance_ASTMD1535`
definition domain and range scale support.
| test_domain_range_scale_luminance_ASTMD1535 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_intermediate_luminance_function_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.\
intermediate_luminance_function_CIE1976` definition.
"""
np.testing.assert_allclose(
intermediate_luminance_function_CIE1976(0.495929964178047),
12.1972... |
Test :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition.
| test_intermediate_luminance_function_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_n_dimensional_intermediate_luminance_function_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.\
intermediate_luminance_function_CIE1976` definition n-dimensional arrays
support.
"""
f_Y_Y_n = 0.495929964178047
Y = intermediate_luminance_funct... |
Test :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition n-dimensional arrays
support.
| test_n_dimensional_intermediate_luminance_function_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_domain_range_scale_intermediate_luminance_function_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.\
intermediate_luminance_function_CIE1976` definition domain and range scale
support.
"""
Y = intermediate_luminance_function_CIE1976(41.52787584465345... |
Test :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition domain and range scale
support.
| test_domain_range_scale_intermediate_luminance_function_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_nan_intermediate_luminance_function_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.\
intermediate_luminance_function_CIE1976` definition nan support.
"""
intermediate_luminance_function_CIE1976(
np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]... |
Test :func:`colour.colorimetry.luminance.intermediate_luminance_function_CIE1976` definition nan support.
| test_nan_intermediate_luminance_function_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_luminance_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.luminance_CIE1976`
definition.
"""
np.testing.assert_allclose(
luminance_CIE1976(41.527875844653451),
12.197225350000002,
atol=TOLERANCE_ABSOLUTE_TESTS,
... |
Test :func:`colour.colorimetry.luminance.luminance_CIE1976`
definition.
| test_luminance_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_n_dimensional_luminance_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.luminance_CIE1976`
definition n-dimensional arrays support.
"""
L_star = 41.527875844653451
Y = luminance_CIE1976(L_star)
L_star = np.tile(L_star, 6)
Y =... |
Test :func:`colour.colorimetry.luminance.luminance_CIE1976`
definition n-dimensional arrays support.
| test_n_dimensional_luminance_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_domain_range_scale_luminance_CIE1976(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.luminance_CIE1976`
definition domain and range scale support.
"""
Y = luminance_CIE1976(41.527875844653451, 100)
d_r = (("reference", 1), ("1", 0.01), ("100", 1))
... |
Test :func:`colour.colorimetry.luminance.luminance_CIE1976`
definition domain and range scale support.
| test_domain_range_scale_luminance_CIE1976 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
def test_luminance_Fairchild2010(self) -> None:
"""
Test :func:`colour.colorimetry.luminance.luminance_Fairchild2010`
definition.
"""
np.testing.assert_allclose(
luminance_Fairchild2010(31.996390226262736),
0.12197225350000002,
atol=TOLERANCE_... |
Test :func:`colour.colorimetry.luminance.luminance_Fairchild2010`
definition.
| test_luminance_Fairchild2010 | python | colour-science/colour | colour/colorimetry/tests/test_luminance.py | https://github.com/colour-science/colour/blob/master/colour/colorimetry/tests/test_luminance.py | BSD-3-Clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.