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 test_domain_range_scale_XYZ_to_sd_Otsu2018(self) -> None:
"""
Test :func:`colour.recovery.otsu2018.XYZ_to_sd_Otsu2018` definition
domain and range scale support.
"""
XYZ_i = np.array([0.20654008, 0.12197225, 0.05136952])
XYZ_o = sd_to_XYZ(
XYZ_to_sd_Otsu2... |
Test :func:`colour.recovery.otsu2018.XYZ_to_sd_Otsu2018` definition
domain and range scale support.
| test_domain_range_scale_XYZ_to_sd_Otsu2018 | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_mean(self) -> None:
"""Test :attr:`colour.recovery.otsu2018.Data_Otsu2018.mean` property."""
data = Data_Otsu2018(self._reflectances, self._cmfs, self._sd_D65)
assert data.mean is None
data.PCA()
assert data.mean is not None
assert data.mean.shape == (36,) | Test :attr:`colour.recovery.otsu2018.Data_Otsu2018.mean` property. | test_mean | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_origin(self) -> None:
"""Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.origin` method."""
np.testing.assert_allclose(
self._data.origin(4, 1),
0.255284008578559,
atol=TOLERANCE_ABSOLUTE_TESTS,
) | Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.origin` method. | test_origin | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_raise_exception_origin(self) -> None:
"""
Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.origin` method
raised exception.
"""
pytest.raises(
ValueError,
Data_Otsu2018(None, self._cmfs, self._sd_D65).origin,
4,
1,
... |
Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.origin` method
raised exception.
| test_raise_exception_origin | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_partition(self) -> None:
"""Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.partition` method."""
partition = self._data.partition(PartitionAxis(4, 1))
assert len(partition) == 2 | Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.partition` method. | test_partition | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_raise_exception_partition(self) -> None:
"""
Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.partition` method
raised exception.
"""
pytest.raises(
ValueError,
Data_Otsu2018(None, self._cmfs, self._sd_D65).partition,
PartitionAxis(... |
Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.partition` method
raised exception.
| test_raise_exception_partition | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_PCA(self) -> None:
"""Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.PCA` method."""
if platform.system() in ("Windows", "Microsoft", "Linux"):
return
data = Data_Otsu2018(self._reflectances, self._cmfs, self._sd_D65)
data.PCA()
assert data.basis_func... | Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.PCA` method. | test_PCA | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_reconstruct(self) -> None:
"""
Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.reconstruct`
method.
"""
data = Data_Otsu2018(self._reflectances, self._cmfs, self._sd_D65)
data.PCA()
np.testing.assert_allclose(
data.reconstruct(
... |
Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.reconstruct`
method.
| test_reconstruct | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_raise_exception_reconstruct(self) -> None:
"""
Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.reconstruct` method
raised exception.
"""
pytest.raises(
ValueError,
Data_Otsu2018(None, self._cmfs, self._sd_D65).reconstruct,
np.array... |
Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.reconstruct` method
raised exception.
| test_raise_exception_reconstruct | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_raise_exception_reconstruction_error(self) -> None:
"""
Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.\
reconstruction_error` method raised exception.
"""
pytest.raises(
ValueError,
Data_Otsu2018(None, self._cmfs, self._sd_D65).reconstruction_error,... |
Test :meth:`colour.recovery.otsu2018.Data_Otsu2018.reconstruction_error` method raised exception.
| test_raise_exception_reconstruction_error | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_row(self) -> None:
"""Test :attr:`colour.recovery.otsu2018.Node_Otsu2018.row` property."""
assert self._node_a.row == (
self._partition_axis.origin,
self._partition_axis.direction,
self._node_b,
self._node_c,
) | Test :attr:`colour.recovery.otsu2018.Node_Otsu2018.row` property. | test_row | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_split(self) -> None:
"""Test :meth:`colour.recovery.otsu2018.Node_Otsu2018.split` method."""
node_a = Node_Otsu2018(self._tree, None)
node_b = Node_Otsu2018(self._tree, data=self._data_a)
node_c = Node_Otsu2018(self._tree, data=self._data_a)
node_a.split([node_b, node_c... | Test :meth:`colour.recovery.otsu2018.Node_Otsu2018.split` method. | test_split | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_minimise(self) -> None:
"""Test :meth:`colour.recovery.otsu2018.Node_Otsu2018.minimise` method."""
node = Node_Otsu2018(data=self._data_a)
partition, axis, partition_error = node.minimise(3)
assert (len(partition[0].data), len(partition[1].data)) == (10, 14)
np.testin... | Test :meth:`colour.recovery.otsu2018.Node_Otsu2018.minimise` method. | test_minimise | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_reflectances(self) -> None:
"""
Test :attr:`colour.recovery.otsu2018.Tree_Otsu2018.reflectances`
property.
"""
np.testing.assert_allclose(
self._tree.reflectances,
np.transpose(
reshape_msds(
sds_and_msds_to_ms... |
Test :attr:`colour.recovery.otsu2018.Tree_Otsu2018.reflectances`
property.
| test_reflectances | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_optimise(self) -> None:
"""Test :class:`colour.recovery.otsu2018.Tree_Otsu2018.optimise` method."""
node_tree = Tree_Otsu2018(self._reflectances, self._cmfs, self._sd_D65)
node_tree.optimise(iterations=5)
dataset = node_tree.to_dataset()
dataset.write(self._path)
... | Test :class:`colour.recovery.otsu2018.Tree_Otsu2018.optimise` method. | test_optimise | python | colour-science/colour | colour/recovery/tests/test_otsu2018.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test_otsu2018.py | BSD-3-Clause |
def test_domain_range_scale_XYZ_to_sd(self) -> None:
"""
Test :func:`colour.recovery.XYZ_to_sd` definition domain
and range scale support.
"""
XYZ = np.array([0.20654008, 0.12197225, 0.05136952])
m = (
"Jakob 2019",
"Mallett 2019",
"Me... |
Test :func:`colour.recovery.XYZ_to_sd` definition domain
and range scale support.
| test_domain_range_scale_XYZ_to_sd | python | colour-science/colour | colour/recovery/tests/test__init__.py | https://github.com/colour-science/colour/blob/master/colour/recovery/tests/test__init__.py | BSD-3-Clause |
def xy_to_CCT_CIE_D(
xy: ArrayLike, optimisation_kwargs: dict | None = None
) -> NDArrayFloat:
"""
Compute the correlated colour temperature :math:`T_{cp}` of a
*CIE Illuminant D Series* from its *CIE xy* chromaticity coordinates.
Parameters
----------
xy
*CIE xy* chromaticity coord... |
Compute the correlated colour temperature :math:`T_{cp}` of a
*CIE Illuminant D Series* from its *CIE xy* chromaticity coordinates.
Parameters
----------
xy
*CIE xy* chromaticity coordinates.
optimisation_kwargs
Parameters for :func:`scipy.optimize.minimize` definition.
Re... | xy_to_CCT_CIE_D | python | colour-science/colour | colour/temperature/cie_d.py | https://github.com/colour-science/colour/blob/master/colour/temperature/cie_d.py | BSD-3-Clause |
def CCT_to_xy_CIE_D(CCT: ArrayLike) -> NDArrayFloat:
"""
Compute the *CIE xy* chromaticity coordinates of a
*CIE Illuminant D Series* from its correlated colour temperature
:math:`T_{cp}`.
Parameters
----------
CCT
Correlated colour temperature :math:`T_{cp}`.
Returns
-----... |
Compute the *CIE xy* chromaticity coordinates of a
*CIE Illuminant D Series* from its correlated colour temperature
:math:`T_{cp}`.
Parameters
----------
CCT
Correlated colour temperature :math:`T_{cp}`.
Returns
-------
:class:`numpy.ndarray`
*CIE xy* chromaticity ... | CCT_to_xy_CIE_D | python | colour-science/colour | colour/temperature/cie_d.py | https://github.com/colour-science/colour/blob/master/colour/temperature/cie_d.py | BSD-3-Clause |
def xy_to_CCT_Hernandez1999(xy: ArrayLike) -> NDArrayFloat:
"""
Compute the correlated colour temperature :math:`T_{cp}` from specified
*CIE xy* chromaticity coordinates using *Hernandez-Andres et al. (1999)*
method.
Parameters
----------
xy
*CIE xy* chromaticity coordinates.
R... |
Compute the correlated colour temperature :math:`T_{cp}` from specified
*CIE xy* chromaticity coordinates using *Hernandez-Andres et al. (1999)*
method.
Parameters
----------
xy
*CIE xy* chromaticity coordinates.
Returns
-------
:class:`numpy.ndarray`
Correlated co... | xy_to_CCT_Hernandez1999 | python | colour-science/colour | colour/temperature/hernandez1999.py | https://github.com/colour-science/colour/blob/master/colour/temperature/hernandez1999.py | BSD-3-Clause |
def CCT_to_xy_Hernandez1999(
CCT: ArrayLike, optimisation_kwargs: dict | None = None
) -> NDArrayFloat:
"""
Compute the *CIE xy* chromaticity coordinates from specified correlated colour
temperature :math:`T_{cp}` using *Hernandez-Andres et al. (1999)* method.
Parameters
----------
CCT
... |
Compute the *CIE xy* chromaticity coordinates from specified correlated colour
temperature :math:`T_{cp}` using *Hernandez-Andres et al. (1999)* method.
Parameters
----------
CCT
Correlated colour temperature :math:`T_{cp}`.
optimisation_kwargs
Parameters for :func:`scipy.optim... | CCT_to_xy_Hernandez1999 | python | colour-science/colour | colour/temperature/hernandez1999.py | https://github.com/colour-science/colour/blob/master/colour/temperature/hernandez1999.py | BSD-3-Clause |
def xy_to_CCT_Kang2002(
xy: ArrayLike, optimisation_kwargs: dict | None = None
) -> NDArrayFloat:
"""
Compute the correlated colour temperature :math:`T_{cp}` from specified
*CIE xy* chromaticity coordinates using *Kang et al. (2002)* method.
Parameters
----------
xy
*CIE xy* chroma... |
Compute the correlated colour temperature :math:`T_{cp}` from specified
*CIE xy* chromaticity coordinates using *Kang et al. (2002)* method.
Parameters
----------
xy
*CIE xy* chromaticity coordinates.
optimisation_kwargs
Parameters for :func:`scipy.optimize.minimize` definition... | xy_to_CCT_Kang2002 | python | colour-science/colour | colour/temperature/kang2002.py | https://github.com/colour-science/colour/blob/master/colour/temperature/kang2002.py | BSD-3-Clause |
def CCT_to_xy_Kang2002(CCT: ArrayLike) -> NDArrayFloat:
"""
Compute the *CIE xy* chromaticity coordinates from specified correlated colour
temperature :math:`T_{cp}` using *Kang et al. (2002)* method.
Parameters
----------
CCT
Correlated colour temperature :math:`T_{cp}`.
Returns
... |
Compute the *CIE xy* chromaticity coordinates from specified correlated colour
temperature :math:`T_{cp}` using *Kang et al. (2002)* method.
Parameters
----------
CCT
Correlated colour temperature :math:`T_{cp}`.
Returns
-------
:class:`numpy.ndarray`
*CIE xy* chromati... | CCT_to_xy_Kang2002 | python | colour-science/colour | colour/temperature/kang2002.py | https://github.com/colour-science/colour/blob/master/colour/temperature/kang2002.py | BSD-3-Clause |
def uv_to_CCT_Krystek1985(
uv: ArrayLike, optimisation_kwargs: dict | None = None
) -> NDArrayFloat:
"""
Compute the correlated colour temperature :math:`T_{cp}` from specified
*CIE UCS* colourspace *uv* chromaticity coordinates using *Krystek (1985)*
method.
Parameters
----------
uv
... |
Compute the correlated colour temperature :math:`T_{cp}` from specified
*CIE UCS* colourspace *uv* chromaticity coordinates using *Krystek (1985)*
method.
Parameters
----------
uv
*CIE UCS* colourspace *uv* chromaticity coordinates.
optimisation_kwargs
Parameters for :func... | uv_to_CCT_Krystek1985 | python | colour-science/colour | colour/temperature/krystek1985.py | https://github.com/colour-science/colour/blob/master/colour/temperature/krystek1985.py | BSD-3-Clause |
def CCT_to_uv_Krystek1985(CCT: ArrayLike) -> NDArrayFloat:
"""
Compute the *CIE UCS* colourspace *uv* chromaticity coordinates from specified
correlated colour temperature :math:`T_{cp}` using *Krystek (1985)* method.
Parameters
----------
CCT
Correlated colour temperature :math:`T_{cp}... |
Compute the *CIE UCS* colourspace *uv* chromaticity coordinates from specified
correlated colour temperature :math:`T_{cp}` using *Krystek (1985)* method.
Parameters
----------
CCT
Correlated colour temperature :math:`T_{cp}`.
Returns
-------
:class:`numpy.ndarray`
*CI... | CCT_to_uv_Krystek1985 | python | colour-science/colour | colour/temperature/krystek1985.py | https://github.com/colour-science/colour/blob/master/colour/temperature/krystek1985.py | BSD-3-Clause |
def xy_to_CCT_McCamy1992(xy: ArrayLike) -> NDArrayFloat:
"""
Compute the correlated colour temperature :math:`T_{cp}` from specified
*CIE xy* chromaticity coordinates using *McCamy (1992)* method.
Parameters
----------
xy
*CIE xy* chromaticity coordinates.
Returns
-------
:... |
Compute the correlated colour temperature :math:`T_{cp}` from specified
*CIE xy* chromaticity coordinates using *McCamy (1992)* method.
Parameters
----------
xy
*CIE xy* chromaticity coordinates.
Returns
-------
:class:`numpy.ndarray`
Correlated colour temperature :mat... | xy_to_CCT_McCamy1992 | python | colour-science/colour | colour/temperature/mccamy1992.py | https://github.com/colour-science/colour/blob/master/colour/temperature/mccamy1992.py | BSD-3-Clause |
def CCT_to_xy_McCamy1992(
CCT: ArrayLike, optimisation_kwargs: dict | None = None
) -> NDArrayFloat:
"""
Compute the *CIE xy* chromaticity coordinates from specified correlated colour
temperature :math:`T_{cp}` using *McCamy (1992)* method.
Parameters
----------
CCT
Correlated colou... |
Compute the *CIE xy* chromaticity coordinates from specified correlated colour
temperature :math:`T_{cp}` using *McCamy (1992)* method.
Parameters
----------
CCT
Correlated colour temperature :math:`T_{cp}`.
optimisation_kwargs
Parameters for :func:`scipy.optimize.minimize` def... | CCT_to_xy_McCamy1992 | python | colour-science/colour | colour/temperature/mccamy1992.py | https://github.com/colour-science/colour/blob/master/colour/temperature/mccamy1992.py | BSD-3-Clause |
def planckian_table(
cmfs: MultiSpectralDistributions,
start: float,
end: float,
spacing: float,
) -> NDArrayFloat:
"""
Generate a planckian table from specified *CIE UCS* colourspace *uv*
chromaticity coordinates, colour matching functions and temperature range
using *Ohno (2013)* metho... |
Generate a planckian table from specified *CIE UCS* colourspace *uv*
chromaticity coordinates, colour matching functions and temperature range
using *Ohno (2013)* method.
Parameters
----------
cmfs
Standard observer colour matching functions.
start
Temperature range start i... | planckian_table | python | colour-science/colour | colour/temperature/ohno2013.py | https://github.com/colour-science/colour/blob/master/colour/temperature/ohno2013.py | BSD-3-Clause |
def uv_to_CCT_Ohno2013(
uv: ArrayLike,
cmfs: MultiSpectralDistributions | None = None,
start: float | None = None,
end: float | None = None,
spacing: float | None = None,
) -> NDArrayFloat:
"""
Compute the correlated colour temperature :math:`T_{cp}` and
:math:`\\Delta_{uv}` from specifi... |
Compute the correlated colour temperature :math:`T_{cp}` and
:math:`\Delta_{uv}` from specified *CIE UCS* colourspace *uv* chromaticity
coordinates, colour matching functions and temperature range using
*Ohno (2013)* method.
Parameters
----------
uv
*CIE UCS* colourspace *uv* chrom... | uv_to_CCT_Ohno2013 | python | colour-science/colour | colour/temperature/ohno2013.py | https://github.com/colour-science/colour/blob/master/colour/temperature/ohno2013.py | BSD-3-Clause |
def CCT_to_uv_Ohno2013(
CCT_D_uv: ArrayLike, cmfs: MultiSpectralDistributions | None = None
) -> NDArrayFloat:
"""
Compute the *CIE UCS* colourspace *uv* chromaticity coordinates from specified
correlated colour temperature :math:`T_{cp}`, :math:`\\Delta_{uv}` and
colour matching functions using *Oh... |
Compute the *CIE UCS* colourspace *uv* chromaticity coordinates from specified
correlated colour temperature :math:`T_{cp}`, :math:`\Delta_{uv}` and
colour matching functions using *Ohno (2013)* method.
Parameters
----------
CCT_D_uv
Correlated colour temperature :math:`T_{cp}`, :math:... | CCT_to_uv_Ohno2013 | python | colour-science/colour | colour/temperature/ohno2013.py | https://github.com/colour-science/colour/blob/master/colour/temperature/ohno2013.py | BSD-3-Clause |
def XYZ_to_CCT_Ohno2013(
XYZ: ArrayLike,
cmfs: MultiSpectralDistributions | None = None,
start: float | None = None,
end: float | None = None,
spacing: float | None = None,
) -> NDArrayFloat:
"""
Compute the correlated colour temperature :math:`T_{cp}` and
:math:`\\Delta_{uv}` from speci... |
Compute the correlated colour temperature :math:`T_{cp}` and
:math:`\Delta_{uv}` from specified *CIE XYZ* tristimulus values, colour
matching functions and temperature range using *Ohno (2013)* method.
Parameters
----------
XYZ
*XYZ* colourspace *uv* chromaticity coordinates.
cmfs
... | XYZ_to_CCT_Ohno2013 | python | colour-science/colour | colour/temperature/ohno2013.py | https://github.com/colour-science/colour/blob/master/colour/temperature/ohno2013.py | BSD-3-Clause |
def CCT_to_XYZ_Ohno2013(
CCT_D_uv: ArrayLike, cmfs: MultiSpectralDistributions | None = None
) -> NDArrayFloat:
"""
Compute the *CIE XYZ* tristimulus values from specified correlated colour
temperature :math:`T_{cp}`, :math:`\\Delta_{uv}` and colour matching
functions using *Ohno (2013)* method.
... |
Compute the *CIE XYZ* tristimulus values from specified correlated colour
temperature :math:`T_{cp}`, :math:`\Delta_{uv}` and colour matching
functions using *Ohno (2013)* method.
Parameters
----------
CCT_D_uv
Correlated colour temperature :math:`T_{cp}`, :math:`\Delta_{uv}`.
cmfs... | CCT_to_XYZ_Ohno2013 | python | colour-science/colour | colour/temperature/ohno2013.py | https://github.com/colour-science/colour/blob/master/colour/temperature/ohno2013.py | BSD-3-Clause |
def uv_to_CCT_Planck1900(
uv: ArrayLike,
cmfs: MultiSpectralDistributions | None = None,
optimisation_kwargs: dict | None = None,
) -> NDArrayFloat:
"""
Compute the correlated colour temperature :math:`T_{cp}` of a blackbody from
specified *CIE UCS* colourspace *uv* chromaticity coordinates and ... |
Compute the correlated colour temperature :math:`T_{cp}` of a blackbody from
specified *CIE UCS* colourspace *uv* chromaticity coordinates and colour
matching functions.
Parameters
----------
uv
*CIE UCS* colourspace *uv* chromaticity coordinates.
cmfs
Standard observer col... | uv_to_CCT_Planck1900 | python | colour-science/colour | colour/temperature/planck1900.py | https://github.com/colour-science/colour/blob/master/colour/temperature/planck1900.py | BSD-3-Clause |
def CCT_to_uv_Planck1900(
CCT: ArrayLike, cmfs: MultiSpectralDistributions | None = None
) -> NDArrayFloat:
"""
Compute the *CIE UCS* colourspace *uv* chromaticity coordinates from specified
correlated colour temperature :math:`T_{cp}` and colour matching functions
using the spectral radiance of a b... |
Compute the *CIE UCS* colourspace *uv* chromaticity coordinates from specified
correlated colour temperature :math:`T_{cp}` and colour matching functions
using the spectral radiance of a blackbody at the specified thermodynamic
temperature.
Parameters
----------
CCT
Colour temperat... | CCT_to_uv_Planck1900 | python | colour-science/colour | colour/temperature/planck1900.py | https://github.com/colour-science/colour/blob/master/colour/temperature/planck1900.py | BSD-3-Clause |
def mired_to_CCT(mired: ArrayLike) -> NDArrayFloat:
"""
Convert specified micro reciprocal degree to correlated colour temperature
:math:`T_{cp}`.
Parameters
----------
mired
Micro reciprocal degree (mired).
Returns
-------
:class:`numpy.ndarray`
Correlated colour ... |
Convert specified micro reciprocal degree to correlated colour temperature
:math:`T_{cp}`.
Parameters
----------
mired
Micro reciprocal degree (mired).
Returns
-------
:class:`numpy.ndarray`
Correlated colour temperature :math:`T_{cp}`.
Examples
--------
... | mired_to_CCT | python | colour-science/colour | colour/temperature/robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/robertson1968.py | BSD-3-Clause |
def CCT_to_mired(CCT: ArrayLike) -> NDArrayFloat:
"""
Convert specified correlated colour temperature :math:`T_{cp}` to micro
reciprocal degree (mired).
Parameters
----------
CCT
Correlated colour temperature :math:`T_{cp}`.
Returns
-------
:class:`numpy.ndarray`
M... |
Convert specified correlated colour temperature :math:`T_{cp}` to micro
reciprocal degree (mired).
Parameters
----------
CCT
Correlated colour temperature :math:`T_{cp}`.
Returns
-------
:class:`numpy.ndarray`
Micro reciprocal degree (mired).
Examples
-------... | CCT_to_mired | python | colour-science/colour | colour/temperature/robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/robertson1968.py | BSD-3-Clause |
def _uv_to_CCT_Robertson1968(uv: ArrayLike) -> NDArrayFloat:
"""
Compute the correlated colour temperature :math:`T_{cp}` and
:math:`\\Delta_{uv}` from specified *CIE UCS* colourspace *uv* chromaticity
coordinates using *Roberston (1968)* method.
Parameters
----------
uv
*CIE UCS* c... |
Compute the correlated colour temperature :math:`T_{cp}` and
:math:`\Delta_{uv}` from specified *CIE UCS* colourspace *uv* chromaticity
coordinates using *Roberston (1968)* method.
Parameters
----------
uv
*CIE UCS* colourspace *uv* chromaticity coordinates.
Returns
-------
... | _uv_to_CCT_Robertson1968 | python | colour-science/colour | colour/temperature/robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/robertson1968.py | BSD-3-Clause |
def uv_to_CCT_Robertson1968(uv: ArrayLike) -> NDArrayFloat:
"""
Compute the correlated colour temperature :math:`T_{cp}` and
:math:`\\Delta_{uv}` from specified *CIE UCS* colourspace *uv* chromaticity
coordinates using *Roberston (1968)* method.
Parameters
----------
uv
*CIE UCS* co... |
Compute the correlated colour temperature :math:`T_{cp}` and
:math:`\Delta_{uv}` from specified *CIE UCS* colourspace *uv* chromaticity
coordinates using *Roberston (1968)* method.
Parameters
----------
uv
*CIE UCS* colourspace *uv* chromaticity coordinates.
Returns
-------
... | uv_to_CCT_Robertson1968 | python | colour-science/colour | colour/temperature/robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/robertson1968.py | BSD-3-Clause |
def _CCT_to_uv_Robertson1968(CCT_D_uv: ArrayLike) -> NDArrayFloat:
"""
Compute the *CIE UCS* colourspace *uv* chromaticity coordinates from specified
correlated colour temperature :math:`T_{cp}` and :math:`\\Delta_{uv}` using
*Roberston (1968)* method.
Parameters
----------
CCT_D_uv
... |
Compute the *CIE UCS* colourspace *uv* chromaticity coordinates from specified
correlated colour temperature :math:`T_{cp}` and :math:`\Delta_{uv}` using
*Roberston (1968)* method.
Parameters
----------
CCT_D_uv
Correlated colour temperature :math:`T_{cp}`, :math:`\Delta_{uv}`.
Re... | _CCT_to_uv_Robertson1968 | python | colour-science/colour | colour/temperature/robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/robertson1968.py | BSD-3-Clause |
def CCT_to_uv_Robertson1968(CCT_D_uv: ArrayLike) -> NDArrayFloat:
"""
Compute the *CIE UCS* colourspace *uv* chromaticity coordinates from specified
correlated colour temperature :math:`T_{cp}` and :math:`\\Delta_{uv}` using
*Roberston (1968)* method.
Parameters
----------
CCT_D_uv
... |
Compute the *CIE UCS* colourspace *uv* chromaticity coordinates from specified
correlated colour temperature :math:`T_{cp}` and :math:`\Delta_{uv}` using
*Roberston (1968)* method.
Parameters
----------
CCT_D_uv
Correlated colour temperature :math:`T_{cp}`, :math:`\Delta_{uv}`.
Re... | CCT_to_uv_Robertson1968 | python | colour-science/colour | colour/temperature/robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/robertson1968.py | BSD-3-Clause |
def uv_to_CCT(
uv: ArrayLike,
method: (
Literal["Krystek 1985", "Ohno 2013", "Planck 1900", "Robertson 1968"] | str
) = "Ohno 2013",
**kwargs: Any,
) -> NDArrayFloat:
"""
Compute the correlated colour temperature :math:`T_{cp}` and
:math:`\\Delta_{uv}` from specified *CIE UCS* colour... |
Compute the correlated colour temperature :math:`T_{cp}` and
:math:`\Delta_{uv}` from specified *CIE UCS* colourspace *uv* chromaticity
coordinates using specified method.
Parameters
----------
uv
*CIE UCS* colourspace *uv* chromaticity coordinates.
method
Computation metho... | uv_to_CCT | python | colour-science/colour | colour/temperature/__init__.py | https://github.com/colour-science/colour/blob/master/colour/temperature/__init__.py | BSD-3-Clause |
def CCT_to_uv(
CCT_D_uv: ArrayLike,
method: (
Literal["Krystek 1985", "Ohno 2013", "Planck 1900", "Robertson 1968"] | str
) = "Ohno 2013",
**kwargs: Any,
) -> NDArrayFloat:
"""
Compute the *CIE UCS* colourspace *uv* chromaticity coordinates from specified
correlated colour temperatur... |
Compute the *CIE UCS* colourspace *uv* chromaticity coordinates from specified
correlated colour temperature :math:`T_{cp}` using specified method.
Parameters
----------
CCT_D_uv
Correlated colour temperature :math:`T_{cp}`, :math:`\Delta_{uv}`.
method
Computation method.
... | CCT_to_uv | python | colour-science/colour | colour/temperature/__init__.py | https://github.com/colour-science/colour/blob/master/colour/temperature/__init__.py | BSD-3-Clause |
def xy_to_CCT(
xy: ArrayLike,
method: (
Literal[
"CIE Illuminant D Series",
"Kang 2002",
"Hernandez 1999",
"McCamy 1992",
]
| str
) = "CIE Illuminant D Series",
) -> NDArrayFloat:
"""
Compute the correlated colour temperature :m... |
Compute the correlated colour temperature :math:`T_{cp}` from specified
*CIE xy* chromaticity coordinates using specified method.
Parameters
----------
xy
*CIE xy* chromaticity coordinates.
method
Computation method.
Other Parameters
----------------
optimisation_k... | xy_to_CCT | python | colour-science/colour | colour/temperature/__init__.py | https://github.com/colour-science/colour/blob/master/colour/temperature/__init__.py | BSD-3-Clause |
def CCT_to_xy(
CCT: ArrayLike,
method: (
Literal[
"CIE Illuminant D Series",
"Kang 2002",
"Hernandez 1999",
"McCamy 1992",
]
| str
) = "CIE Illuminant D Series",
) -> NDArrayFloat:
"""
Compute the *CIE xy* chromaticity coordinat... |
Compute the *CIE xy* chromaticity coordinates from specified correlated colour
temperature :math:`T_{cp}` using specified method.
Parameters
----------
CCT
Correlated colour temperature :math:`T_{cp}`.
method
Computation method.
Other Parameters
----------------
op... | CCT_to_xy | python | colour-science/colour | colour/temperature/__init__.py | https://github.com/colour-science/colour/blob/master/colour/temperature/__init__.py | BSD-3-Clause |
def test_n_dimensional_xy_to_CCT_CIE_D(self) -> None:
"""
Test :func:`colour.temperature.cie_d.xy_to_CCT_CIE_D` definition
n-dimensional arrays support.
"""
xy = np.array([0.382343625000000, 0.383766261015578])
CCT = xy_to_CCT_CIE_D(xy)
xy = np.tile(xy, (6, 1))
... |
Test :func:`colour.temperature.cie_d.xy_to_CCT_CIE_D` definition
n-dimensional arrays support.
| test_n_dimensional_xy_to_CCT_CIE_D | python | colour-science/colour | colour/temperature/tests/test_cie_d.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_cie_d.py | BSD-3-Clause |
def test_nan_xy_to_CCT_CIE_D(self) -> None:
"""
Test :func:`colour.temperature.cie_d.xy_to_CCT_CIE_D` 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))))
xy_to_CCT_CIE_D(cases) |
Test :func:`colour.temperature.cie_d.xy_to_CCT_CIE_D` definition nan
support.
| test_nan_xy_to_CCT_CIE_D | python | colour-science/colour | colour/temperature/tests/test_cie_d.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_cie_d.py | BSD-3-Clause |
def test_n_dimensional_CCT_to_xy_CIE_D(self) -> None:
"""
Test :func:`colour.temperature.cie_d.CCT_to_xy_CIE_D` definition
n-dimensional arrays support.
"""
CCT = 4000
xy = CCT_to_xy_CIE_D(CCT)
CCT = np.tile(CCT, 6)
xy = np.tile(xy, (6, 1))
np.te... |
Test :func:`colour.temperature.cie_d.CCT_to_xy_CIE_D` definition
n-dimensional arrays support.
| test_n_dimensional_CCT_to_xy_CIE_D | python | colour-science/colour | colour/temperature/tests/test_cie_d.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_cie_d.py | BSD-3-Clause |
def test_nan_CCT_to_xy_CIE_D(self) -> None:
"""
Test :func:`colour.temperature.cie_d.CCT_to_xy_CIE_D` 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))))
CCT_to_xy_CIE_D(cases) |
Test :func:`colour.temperature.cie_d.CCT_to_xy_CIE_D` definition
nan support.
| test_nan_CCT_to_xy_CIE_D | python | colour-science/colour | colour/temperature/tests/test_cie_d.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_cie_d.py | BSD-3-Clause |
def test_n_dimensional_xy_to_CCT_Hernandez1999(self) -> None:
"""
Test :func:`colour.temperature.hernandez1999.xy_to_CCT_Hernandez1999`
definition n-dimensional arrays support.
"""
xy = np.array([0.31270, 0.32900])
CCT = xy_to_CCT_Hernandez1999(xy)
xy = np.tile(... |
Test :func:`colour.temperature.hernandez1999.xy_to_CCT_Hernandez1999`
definition n-dimensional arrays support.
| test_n_dimensional_xy_to_CCT_Hernandez1999 | python | colour-science/colour | colour/temperature/tests/test_hernandez1999.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_hernandez1999.py | BSD-3-Clause |
def test_nan_xy_to_CCT_Hernandez1999(self) -> None:
"""
Test :func:`colour.temperature.hernandez1999.xy_to_CCT_Hernandez1999`
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))))
xy_to... |
Test :func:`colour.temperature.hernandez1999.xy_to_CCT_Hernandez1999`
definition nan support.
| test_nan_xy_to_CCT_Hernandez1999 | python | colour-science/colour | colour/temperature/tests/test_hernandez1999.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_hernandez1999.py | BSD-3-Clause |
def test_n_dimensional_CCT_to_xy_Hernandez1999(self) -> None:
"""
Test :func:`colour.temperature.hernandez1999.CCT_to_xy_Hernandez1999`
definition n-dimensional arrays support.
"""
CCT = 6500.74204318
xy = CCT_to_xy_Hernandez1999(CCT)
CCT = np.tile(CCT, 6)
... |
Test :func:`colour.temperature.hernandez1999.CCT_to_xy_Hernandez1999`
definition n-dimensional arrays support.
| test_n_dimensional_CCT_to_xy_Hernandez1999 | python | colour-science/colour | colour/temperature/tests/test_hernandez1999.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_hernandez1999.py | BSD-3-Clause |
def test_nan_CCT_to_xy_Hernandez1999(self) -> None:
"""
Test :func:`colour.temperature.hernandez1999.CCT_to_xy_Hernandez1999`
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))))
CCT_t... |
Test :func:`colour.temperature.hernandez1999.CCT_to_xy_Hernandez1999`
definition nan support.
| test_nan_CCT_to_xy_Hernandez1999 | python | colour-science/colour | colour/temperature/tests/test_hernandez1999.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_hernandez1999.py | BSD-3-Clause |
def test_n_dimensional_xy_to_CCT_Kang2002(self) -> None:
"""
Test :func:`colour.temperature.kang2002.xy_to_CCT_Kang2002`
definition n-dimensional arrays support.
"""
uv = np.array([0.380528282812500, 0.376733530961114])
CCT = xy_to_CCT_Kang2002(uv)
uv = np.tile(... |
Test :func:`colour.temperature.kang2002.xy_to_CCT_Kang2002`
definition n-dimensional arrays support.
| test_n_dimensional_xy_to_CCT_Kang2002 | python | colour-science/colour | colour/temperature/tests/test_kang2002.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_kang2002.py | BSD-3-Clause |
def test_nan_xy_to_CCT_Kang2002(self) -> None:
"""
Test :func:`colour.temperature.kang2002.xy_to_CCT_Kang2002`
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))))
xy_to_CCT_Kang2002(c... |
Test :func:`colour.temperature.kang2002.xy_to_CCT_Kang2002`
definition nan support.
| test_nan_xy_to_CCT_Kang2002 | python | colour-science/colour | colour/temperature/tests/test_kang2002.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_kang2002.py | BSD-3-Clause |
def test_n_dimensional_CCT_to_xy_Kang2002(self) -> None:
"""
Test :func:`colour.temperature.kang2002.CCT_to_xy_Kang2002` definition
n-dimensional arrays support.
"""
CCT = 4000
xy = CCT_to_xy_Kang2002(CCT)
CCT = np.tile(CCT, 6)
xy = np.tile(xy, (6, 1))
... |
Test :func:`colour.temperature.kang2002.CCT_to_xy_Kang2002` definition
n-dimensional arrays support.
| test_n_dimensional_CCT_to_xy_Kang2002 | python | colour-science/colour | colour/temperature/tests/test_kang2002.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_kang2002.py | BSD-3-Clause |
def test_nan_CCT_to_xy_Kang2002(self) -> None:
"""
Test :func:`colour.temperature.kang2002.CCT_to_xy_Kang2002` 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))))
CCT_to_xy_Kang2002(c... |
Test :func:`colour.temperature.kang2002.CCT_to_xy_Kang2002` definition
nan support.
| test_nan_CCT_to_xy_Kang2002 | python | colour-science/colour | colour/temperature/tests/test_kang2002.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_kang2002.py | BSD-3-Clause |
def test_n_dimensional_uv_to_CCT_Krystek1985(self) -> None:
"""
Test :func:`colour.temperature.krystek1985.uv_to_CCT_Krystek1985`
definition n-dimensional arrays support.
"""
uv = np.array([0.198152565091092, 0.307023596915037])
CCT = uv_to_CCT_Krystek1985(uv)
u... |
Test :func:`colour.temperature.krystek1985.uv_to_CCT_Krystek1985`
definition n-dimensional arrays support.
| test_n_dimensional_uv_to_CCT_Krystek1985 | python | colour-science/colour | colour/temperature/tests/test_krystek1985.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_krystek1985.py | BSD-3-Clause |
def test_nan_uv_to_CCT_Krystek1985(self) -> None:
"""
Test :func:`colour.temperature.krystek1985.uv_to_CCT_Krystek1985`
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))))
uv_to_CCT_K... |
Test :func:`colour.temperature.krystek1985.uv_to_CCT_Krystek1985`
definition nan support.
| test_nan_uv_to_CCT_Krystek1985 | python | colour-science/colour | colour/temperature/tests/test_krystek1985.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_krystek1985.py | BSD-3-Clause |
def test_n_dimensional_CCT_to_uv_Krystek1985(self) -> None:
"""
Test :func:`colour.temperature.krystek1985.CCT_to_uv_Krystek1985`
definition n-dimensional arrays support.
"""
CCT = 7000
uv = CCT_to_uv_Krystek1985(CCT)
CCT = np.tile(CCT, 6)
uv = np.tile(u... |
Test :func:`colour.temperature.krystek1985.CCT_to_uv_Krystek1985`
definition n-dimensional arrays support.
| test_n_dimensional_CCT_to_uv_Krystek1985 | python | colour-science/colour | colour/temperature/tests/test_krystek1985.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_krystek1985.py | BSD-3-Clause |
def test_n_dimensional_xy_to_CCT_McCamy1992(self) -> None:
"""
Test :func:`colour.temperature.mccamy1992.xy_to_CCT_McCamy1992`
definition n-dimensional arrays support.
"""
xy = np.array([0.31270, 0.32900])
CCT = xy_to_CCT_McCamy1992(xy)
xy = np.tile(xy, (6, 1))
... |
Test :func:`colour.temperature.mccamy1992.xy_to_CCT_McCamy1992`
definition n-dimensional arrays support.
| test_n_dimensional_xy_to_CCT_McCamy1992 | python | colour-science/colour | colour/temperature/tests/test_mccamy1992.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_mccamy1992.py | BSD-3-Clause |
def test_nan_xy_to_CCT_McCamy1992(self) -> None:
"""
Test :func:`colour.temperature.mccamy1992.xy_to_CCT_McCamy1992`
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))))
xy_to_CCT_McCa... |
Test :func:`colour.temperature.mccamy1992.xy_to_CCT_McCamy1992`
definition nan support.
| test_nan_xy_to_CCT_McCamy1992 | python | colour-science/colour | colour/temperature/tests/test_mccamy1992.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_mccamy1992.py | BSD-3-Clause |
def test_n_dimensional_CCT_to_xy_McCamy1992(self) -> None:
"""
Test :func:`colour.temperature.mccamy1992.CCT_to_xy_McCamy1992`
definition n-dimensional arrays support.
"""
CCT = 6505.08059131
xy = CCT_to_xy_McCamy1992(CCT)
CCT = np.tile(CCT, 6)
xy = np.t... |
Test :func:`colour.temperature.mccamy1992.CCT_to_xy_McCamy1992`
definition n-dimensional arrays support.
| test_n_dimensional_CCT_to_xy_McCamy1992 | python | colour-science/colour | colour/temperature/tests/test_mccamy1992.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_mccamy1992.py | BSD-3-Clause |
def test_nan_CCT_to_xy_McCamy1992(self) -> None:
"""
Test :func:`colour.temperature.mccamy1992.CCT_to_xy_McCamy1992`
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))))
CCT_to_xy_McCa... |
Test :func:`colour.temperature.mccamy1992.CCT_to_xy_McCamy1992`
definition nan support.
| test_nan_CCT_to_xy_McCamy1992 | python | colour-science/colour | colour/temperature/tests/test_mccamy1992.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_mccamy1992.py | BSD-3-Clause |
def test_n_dimensional_uv_to_CCT_Ohno2013(self) -> None:
"""
Test :func:`colour.temperature.ohno2013.uv_to_CCT_Ohno2013` definition
n-dimensional arrays support.
"""
uv = np.array([0.1978, 0.3122])
CCT_D_uv = uv_to_CCT_Ohno2013(uv)
uv = np.tile(uv, (6, 1))
... |
Test :func:`colour.temperature.ohno2013.uv_to_CCT_Ohno2013` definition
n-dimensional arrays support.
| test_n_dimensional_uv_to_CCT_Ohno2013 | python | colour-science/colour | colour/temperature/tests/test_ohno2013.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_ohno2013.py | BSD-3-Clause |
def test_nan_uv_to_CCT_Ohno2013(self) -> None:
"""
Test :func:`colour.temperature.ohno2013.uv_to_CCT_Ohno2013` 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))))
uv_to_CCT_Ohno2013(c... |
Test :func:`colour.temperature.ohno2013.uv_to_CCT_Ohno2013` definition
nan support.
| test_nan_uv_to_CCT_Ohno2013 | python | colour-science/colour | colour/temperature/tests/test_ohno2013.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_ohno2013.py | BSD-3-Clause |
def test_n_dimensional_CCT_to_uv_Ohno2013(self) -> None:
"""
Test :func:`colour.temperature.ohno2013.CCT_to_uv_Ohno2013` definition
n-dimensional arrays support.
"""
CCT_D_uv = np.array([6507.47380460, 0.00322335])
uv = CCT_to_uv_Ohno2013(CCT_D_uv)
CCT_D_uv = np... |
Test :func:`colour.temperature.ohno2013.CCT_to_uv_Ohno2013` definition
n-dimensional arrays support.
| test_n_dimensional_CCT_to_uv_Ohno2013 | python | colour-science/colour | colour/temperature/tests/test_ohno2013.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_ohno2013.py | BSD-3-Clause |
def test_nan_CCT_to_uv_Ohno2013(self) -> None:
"""
Test :func:`colour.temperature.ohno2013.CCT_to_uv_Ohno2013` 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))))
CCT_to_uv_Ohno2013(c... |
Test :func:`colour.temperature.ohno2013.CCT_to_uv_Ohno2013` definition
nan support.
| test_nan_CCT_to_uv_Ohno2013 | python | colour-science/colour | colour/temperature/tests/test_ohno2013.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_ohno2013.py | BSD-3-Clause |
def test_n_dimensional_XYZ_to_CCT_Ohno2013(self) -> None:
"""
Test :func:`colour.temperature.ohno2013.XYZ_to_CCT_Ohno2013` definition
n-dimensional arrays support.
"""
XYZ = np.array([95.04, 100.00, 108.88])
CCT_D_uv = XYZ_to_CCT_Ohno2013(XYZ)
XYZ = np.tile(XYZ,... |
Test :func:`colour.temperature.ohno2013.XYZ_to_CCT_Ohno2013` definition
n-dimensional arrays support.
| test_n_dimensional_XYZ_to_CCT_Ohno2013 | python | colour-science/colour | colour/temperature/tests/test_ohno2013.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_ohno2013.py | BSD-3-Clause |
def test_nan_XYZ_to_CCT_Ohno2013(self) -> None:
"""
Test :func:`colour.temperature.ohno2013.XYZ_to_CCT_Ohno2013` 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_CCT_Ohno201... |
Test :func:`colour.temperature.ohno2013.XYZ_to_CCT_Ohno2013` definition
nan support.
| test_nan_XYZ_to_CCT_Ohno2013 | python | colour-science/colour | colour/temperature/tests/test_ohno2013.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_ohno2013.py | BSD-3-Clause |
def test_n_dimensional_CCT_to_XYZ_Ohno2013(self) -> None:
"""
Test :func:`colour.temperature.ohno2013.CCT_to_XYZ_Ohno2013` definition
n-dimensional arrays support.
"""
CCT_D_uv = np.array([6503.30711709, 0.00321729])
XYZ = CCT_to_XYZ_Ohno2013(CCT_D_uv)
CCT_D_uv ... |
Test :func:`colour.temperature.ohno2013.CCT_to_XYZ_Ohno2013` definition
n-dimensional arrays support.
| test_n_dimensional_CCT_to_XYZ_Ohno2013 | python | colour-science/colour | colour/temperature/tests/test_ohno2013.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_ohno2013.py | BSD-3-Clause |
def test_n_dimensional_uv_to_CCT_Planck1900(self) -> None:
"""
Test :func:`colour.temperature.planck1900.uv_to_CCT_Planck1900`
definition n-dimensional arrays support.
"""
uv = np.array([0.225109670227493, 0.334387366663923])
CCT = uv_to_CCT_Planck1900(uv)
uv = ... |
Test :func:`colour.temperature.planck1900.uv_to_CCT_Planck1900`
definition n-dimensional arrays support.
| test_n_dimensional_uv_to_CCT_Planck1900 | python | colour-science/colour | colour/temperature/tests/test_planck1900.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_planck1900.py | BSD-3-Clause |
def test_nan_uv_to_CCT_Planck1900(self) -> None:
"""
Test :func:`colour.temperature.planck1900.uv_to_CCT_Planck1900`
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))))
uv_to_CCT_Plan... |
Test :func:`colour.temperature.planck1900.uv_to_CCT_Planck1900`
definition nan support.
| test_nan_uv_to_CCT_Planck1900 | python | colour-science/colour | colour/temperature/tests/test_planck1900.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_planck1900.py | BSD-3-Clause |
def test_n_dimensional_CCT_to_uv_Planck1900(self) -> None:
"""
Test :func:`colour.temperature.planck1900.CCT_to_uv_Planck1900` definition
n-dimensional arrays support.
"""
CCT = 4000
uv = CCT_to_uv_Planck1900(CCT)
CCT = np.tile(CCT, 6)
uv = np.tile(uv, (... |
Test :func:`colour.temperature.planck1900.CCT_to_uv_Planck1900` definition
n-dimensional arrays support.
| test_n_dimensional_CCT_to_uv_Planck1900 | python | colour-science/colour | colour/temperature/tests/test_planck1900.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_planck1900.py | BSD-3-Clause |
def test_nan_CCT_to_uv_Planck1900(self) -> None:
"""
Test :func:`colour.temperature.planck1900.CCT_to_uv_Planck1900` 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))))
CCT_to_uv_Plan... |
Test :func:`colour.temperature.planck1900.CCT_to_uv_Planck1900` definition
nan support.
| test_nan_CCT_to_uv_Planck1900 | python | colour-science/colour | colour/temperature/tests/test_planck1900.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_planck1900.py | BSD-3-Clause |
def test_n_dimensional_mired_to_CCT(self) -> None:
"""
Test :func:`colour.temperature.robertson1968.mired_to_CCT`
definition n-dimensional arrays support.
"""
mired = 312.5
CCT = mired_to_CCT(mired)
mired = np.tile(mired, (6, 1))
CCT = np.tile(CCT, (6, 1... |
Test :func:`colour.temperature.robertson1968.mired_to_CCT`
definition n-dimensional arrays support.
| test_n_dimensional_mired_to_CCT | python | colour-science/colour | colour/temperature/tests/test_robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_robertson1968.py | BSD-3-Clause |
def test_nan_mired_to_CCT(self) -> None:
"""
Test :func:`colour.temperature.robertson1968.mired_to_CCT`
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))))
mired_to_CCT(cases) |
Test :func:`colour.temperature.robertson1968.mired_to_CCT`
definition nan support.
| test_nan_mired_to_CCT | python | colour-science/colour | colour/temperature/tests/test_robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_robertson1968.py | BSD-3-Clause |
def test_n_dimensional_CCT_to_mired(self) -> None:
"""
Test :func:`colour.temperature.robertson1968.CCT_to_mired`
definition n-dimensional arrays support.
"""
CCT = 3200
mired = CCT_to_mired(CCT)
CCT = np.tile(CCT, (6, 1))
mired = np.tile(mired, (6, 1))
... |
Test :func:`colour.temperature.robertson1968.CCT_to_mired`
definition n-dimensional arrays support.
| test_n_dimensional_CCT_to_mired | python | colour-science/colour | colour/temperature/tests/test_robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_robertson1968.py | BSD-3-Clause |
def test_nan_CCT_to_mired(self) -> None:
"""
Test :func:`colour.temperature.robertson1968.CCT_to_mired`
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))))
CCT_to_mired(cases) |
Test :func:`colour.temperature.robertson1968.CCT_to_mired`
definition nan support.
| test_nan_CCT_to_mired | python | colour-science/colour | colour/temperature/tests/test_robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_robertson1968.py | BSD-3-Clause |
def test_n_dimensional_uv_to_CCT_Robertson1968(self) -> None:
"""
Test :func:`colour.temperature.robertson1968.uv_to_CCT_Robertson1968`
definition n-dimensional arrays support.
"""
uv = np.array([0.1978, 0.3122])
CCT_D_uv = uv_to_CCT_Robertson1968(uv)
uv = np.ti... |
Test :func:`colour.temperature.robertson1968.uv_to_CCT_Robertson1968`
definition n-dimensional arrays support.
| test_n_dimensional_uv_to_CCT_Robertson1968 | python | colour-science/colour | colour/temperature/tests/test_robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_robertson1968.py | BSD-3-Clause |
def test_nan_uv_to_CCT_Robertson1968(self) -> None:
"""
Test :func:`colour.temperature.robertson1968.uv_to_CCT_Robertson1968`
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))))
uv_to... |
Test :func:`colour.temperature.robertson1968.uv_to_CCT_Robertson1968`
definition nan support.
| test_nan_uv_to_CCT_Robertson1968 | python | colour-science/colour | colour/temperature/tests/test_robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_robertson1968.py | BSD-3-Clause |
def test_n_dimensional_CCT_to_uv_Robertson1968(self) -> None:
"""
Test :func:`colour.temperature.robertson1968.CCT_to_uv_Robertson1968`
definition n-dimensional arrays support.
"""
CCT_D_uv = np.array([4500, 0.0250])
uv = CCT_to_uv_Robertson1968(CCT_D_uv)
CCT_D_... |
Test :func:`colour.temperature.robertson1968.CCT_to_uv_Robertson1968`
definition n-dimensional arrays support.
| test_n_dimensional_CCT_to_uv_Robertson1968 | python | colour-science/colour | colour/temperature/tests/test_robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_robertson1968.py | BSD-3-Clause |
def test_nan_CCT_to_uv_Robertson1968(self) -> None:
"""
Test :func:`colour.temperature.robertson1968.CCT_to_uv_Robertson1968`
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))))
CCT_t... |
Test :func:`colour.temperature.robertson1968.CCT_to_uv_Robertson1968`
definition nan support.
| test_nan_CCT_to_uv_Robertson1968 | python | colour-science/colour | colour/temperature/tests/test_robertson1968.py | https://github.com/colour-science/colour/blob/master/colour/temperature/tests/test_robertson1968.py | BSD-3-Clause |
def __iter__(self) -> Generator:
"""
Return a generator for the :class:`dataclass`-like class fields.
Yields
------
Generator
:class:`dataclass`-like class field generator.
"""
yield from {
field.name: getattr(self, field.name) for field i... |
Return a generator for the :class:`dataclass`-like class fields.
Yields
------
Generator
:class:`dataclass`-like class field generator.
| __iter__ | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def __array__(
self, dtype: Type[DTypeReal] | None = None, copy: bool = True
) -> NDArray:
"""
Implement support for :class:`dataclass`-like class conversion to
:class:`numpy.ndarray` class.
A field set to *None* will be filled with `np.nan` according to the
shape of... |
Implement support for :class:`dataclass`-like class conversion to
:class:`numpy.ndarray` class.
A field set to *None* will be filled with `np.nan` according to the
shape of the first field not set with *None*.
Parameters
----------
dtype
:class:`num... | __array__ | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def arithmetical_operation(
self, a: Any, operation: str, in_place: bool = False
) -> Dataclass:
"""
Perform specified arithmetical operation with :math:`a` operand on the
:class:`dataclass`-like class.
Parameters
----------
a
Operand.
ope... |
Perform specified arithmetical operation with :math:`a` operand on the
:class:`dataclass`-like class.
Parameters
----------
a
Operand.
operation
Operation to perform.
in_place
Operation happens in place.
Returns
... | arithmetical_operation | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def as_array(
a: ArrayLike | KeysView | ValuesView,
dtype: Type[DType] | None = None,
) -> NDArray:
"""
Convert specified variable :math:`a` to :class:`numpy.ndarray` using
specified :class:`numpy.dtype`.
Parameters
----------
a
Variable :math:`a` to convert.
dtype
:... |
Convert specified variable :math:`a` to :class:`numpy.ndarray` using
specified :class:`numpy.dtype`.
Parameters
----------
a
Variable :math:`a` to convert.
dtype
:class:`numpy.dtype` to use for conversion, default to the
:class:`numpy.dtype` defined by the
:attr... | as_array | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def as_int(a: ArrayLike, dtype: Type[DTypeInt] | None = None) -> DTypeInt | NDArrayInt:
"""
Attempt to convert specified variable :math:`a` to :class:`numpy.integer`
using specified :class:`numpy.dtype`. If variable :math:`a` is not a scalar or
0-dimensional, it is converted to :class:`numpy.ndarray`.
... |
Attempt to convert specified variable :math:`a` to :class:`numpy.integer`
using specified :class:`numpy.dtype`. If variable :math:`a` is not a scalar or
0-dimensional, it is converted to :class:`numpy.ndarray`.
Parameters
----------
a
Variable :math:`a` to convert.
dtype
:c... | as_int | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def as_float(
a: ArrayLike, dtype: Type[DTypeFloat] | None = None
) -> DTypeFloat | NDArrayFloat:
"""
Attempt to convert specified variable :math:`a` to :class:`numpy.floating`
using specified :class:`numpy.dtype`. If variable :math:`a` is not a scalar or
0-dimensional, it is converted to :class:`nu... |
Attempt to convert specified variable :math:`a` to :class:`numpy.floating`
using specified :class:`numpy.dtype`. If variable :math:`a` is not a scalar or
0-dimensional, it is converted to :class:`numpy.ndarray`.
Parameters
----------
a
Variable :math:`a` to convert.
dtype
:... | as_float | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def as_int_array(a: ArrayLike, dtype: Type[DTypeInt] | None = None) -> NDArrayInt:
"""
Convert specified variable :math:`a` to :class:`numpy.ndarray` using
specified :class:`numpy.dtype`.
Parameters
----------
a
Variable :math:`a` to convert.
dtype
:class:`numpy.dtype` to us... |
Convert specified variable :math:`a` to :class:`numpy.ndarray` using
specified :class:`numpy.dtype`.
Parameters
----------
a
Variable :math:`a` to convert.
dtype
:class:`numpy.dtype` to use for conversion, default to the
:class:`numpy.dtype` defined by the
:attr... | as_int_array | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def as_float_array(a: ArrayLike, dtype: Type[DTypeFloat] | None = None) -> NDArrayFloat:
"""
Convert specified variable :math:`a` to :class:`numpy.ndarray` using
specified :class:`numpy.dtype`.
Parameters
----------
a
Variable :math:`a` to convert.
dtype
:class:`numpy.dtype`... |
Convert specified variable :math:`a` to :class:`numpy.ndarray` using
specified :class:`numpy.dtype`.
Parameters
----------
a
Variable :math:`a` to convert.
dtype
:class:`numpy.dtype` to use for conversion, default to the
:class:`numpy.dtype` defined by the
:attr... | as_float_array | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def as_int_scalar(a: ArrayLike, dtype: Type[DTypeInt] | None = None) -> int:
"""
Convert specified :math:`a` variable to :class:`numpy.integer` using
specified
:class:`numpy.dtype`.
Parameters
----------
a
Variable :math:`a` to convert.
dtype
:class:`numpy.dtype` to use ... |
Convert specified :math:`a` variable to :class:`numpy.integer` using
specified
:class:`numpy.dtype`.
Parameters
----------
a
Variable :math:`a` to convert.
dtype
:class:`numpy.dtype` to use for conversion, default to the
:class:`numpy.dtype` defined by the
:... | as_int_scalar | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def as_float_scalar(a: ArrayLike, dtype: Type[DTypeFloat] | None = None) -> float:
"""
Convert specified :math:`a` variable to :class:`numpy.floating` using
specified
:class:`numpy.dtype`.
Parameters
----------
a
Variable :math:`a` to convert.
dtype
:class:`numpy.dtype` ... |
Convert specified :math:`a` variable to :class:`numpy.floating` using
specified
:class:`numpy.dtype`.
Parameters
----------
a
Variable :math:`a` to convert.
dtype
:class:`numpy.dtype` to use for conversion, default to the
:class:`numpy.dtype` defined by the
... | as_float_scalar | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def set_default_int_dtype(
dtype: Type[DTypeInt] = DTYPE_INT_DEFAULT,
) -> None:
"""
Set *Colour* default :class:`numpy.integer` precision by setting
:attr:`colour.constant.DTYPE_INT_DEFAULT` attribute with specified
:class:`numpy.dtype` wherever the attribute is imported.
Parameters
------... |
Set *Colour* default :class:`numpy.integer` precision by setting
:attr:`colour.constant.DTYPE_INT_DEFAULT` attribute with specified
:class:`numpy.dtype` wherever the attribute is imported.
Parameters
----------
dtype
:class:`numpy.dtype` to set :attr:`colour.constant.DTYPE_INT_DEFAULT`... | set_default_int_dtype | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def set_default_float_dtype(
dtype: Type[DTypeFloat] = DTYPE_FLOAT_DEFAULT,
) -> None:
"""
Set *Colour* default :class:`numpy.floating` precision by setting
:attr:`colour.constant.DTYPE_FLOAT_DEFAULT` attribute with specified
:class:`numpy.dtype` wherever the attribute is imported.
Parameters
... |
Set *Colour* default :class:`numpy.floating` precision by setting
:attr:`colour.constant.DTYPE_FLOAT_DEFAULT` attribute with specified
:class:`numpy.dtype` wherever the attribute is imported.
Parameters
----------
dtype
:class:`numpy.dtype` to set :attr:`colour.constant.DTYPE_FLOAT_DEF... | set_default_float_dtype | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def set_domain_range_scale(
scale: (
Literal["ignore", "reference", "Ignore", "Reference", "1", "100"] | str
) = "reference",
) -> None:
"""
Set the current *Colour* domain-range scale. The following scales are
available:
- **'Reference'**, the default *Colour* domain-range scale whic... |
Set the current *Colour* domain-range scale. The following scales are
available:
- **'Reference'**, the default *Colour* domain-range scale which varies
depending on the referenced algorithm, e.g., [0, 1], [0, 10], [0, 100],
[0, 255], etc...
- **'1'**, a domain-range scale normalis... | set_domain_range_scale | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def to_domain_1(
a: ArrayLike,
scale_factor: ArrayLike = 100,
dtype: Type[DTypeFloat] | None = None,
) -> NDArray:
"""
Scale specified array :math:`a` to domain **'1'**. The behaviour is as
follows:
- If *Colour* domain-range scale is **'Reference'** or **'1'**, the
definition is ... |
Scale specified array :math:`a` to domain **'1'**. The behaviour is as
follows:
- If *Colour* domain-range scale is **'Reference'** or **'1'**, the
definition is almost entirely by-passed and will conveniently convert
array :math:`a` to :class:`np.ndarray`.
- If *Colour* domain-ran... | to_domain_1 | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def to_domain_10(
a: ArrayLike,
scale_factor: ArrayLike = 10,
dtype: Type[DTypeFloat] | None = None,
) -> NDArray:
"""
Scale specified array :math:`a` to domain **'10'**, used by
*Munsell Renotation System*. The behaviour is as follows:
- If *Colour* domain-range scale is **'Reference'**,... |
Scale specified array :math:`a` to domain **'10'**, used by
*Munsell Renotation System*. The behaviour is as follows:
- If *Colour* domain-range scale is **'Reference'**, the
definition is almost entirely by-passed and will conveniently convert
array :math:`a` to :class:`np.ndarray`.
... | to_domain_10 | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def to_domain_100(
a: ArrayLike,
scale_factor: ArrayLike = 100,
dtype: Type[DTypeFloat] | None = None,
) -> NDArray:
"""
Scale specified array :math:`a` to domain **'100'**. The behaviour is as
follows:
- If *Colour* domain-range scale is **'Reference'** or **'100'**
(currently un... |
Scale specified array :math:`a` to domain **'100'**. The behaviour is as
follows:
- If *Colour* domain-range scale is **'Reference'** or **'100'**
(currently unsupported private value only used for unit tests), the
definition is almost entirely by-passed and will conveniently convert
... | to_domain_100 | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def to_domain_degrees(
a: ArrayLike,
scale_factor: ArrayLike = 360,
dtype: Type[DTypeFloat] | None = None,
) -> NDArray:
"""
Scale specified array :math:`a` to degrees domain. The behaviour is as
follows:
- If *Colour* domain-range scale is **'Reference'**, the
definition is almos... |
Scale specified array :math:`a` to degrees domain. The behaviour is as
follows:
- If *Colour* domain-range scale is **'Reference'**, the
definition is almost entirely by-passed and will conveniently convert
array :math:`a` to :class:`np.ndarray`.
- If *Colour* domain-range scale is... | to_domain_degrees | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def to_domain_int(
a: ArrayLike,
bit_depth: ArrayLike = 8,
dtype: Type[DTypeFloat] | None = None,
) -> NDArray:
"""
Scale specified array :math:`a` to int domain. The behaviour is as follows:
- If *Colour* domain-range scale is **'Reference'**, the
definition is almost entirely by-pas... |
Scale specified array :math:`a` to int domain. The behaviour is as follows:
- If *Colour* domain-range scale is **'Reference'**, the
definition is almost entirely by-passed and will conveniently convert
array :math:`a` to :class:`np.ndarray`.
- If *Colour* domain-range scale is **'1'**... | to_domain_int | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
def from_range_1(
a: ArrayLike,
scale_factor: ArrayLike = 100,
dtype: Type[DTypeFloat] | None = None,
) -> NDArray:
"""
Scale specified array :math:`a` from range **'1'**. The behaviour is as
follows:
- If *Colour* domain-range scale is **'Reference'** or **'1'**, the
definition i... |
Scale specified array :math:`a` from range **'1'**. The behaviour is as
follows:
- If *Colour* domain-range scale is **'Reference'** or **'1'**, the
definition is entirely by-passed.
- If *Colour* domain-range scale is **'100'** (currently unsupported
private value only used for un... | from_range_1 | python | colour-science/colour | colour/utilities/array.py | https://github.com/colour-science/colour/blob/master/colour/utilities/array.py | BSD-3-Clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.