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 munsell_specification_to_munsell_colour(
specification: ArrayLike,
hue_decimals: int = 1,
value_decimals: int = 1,
chroma_decimals: int = 1,
) -> str:
"""
Convert from *Munsell* *Colorlab* specification to specified *Munsell* colour.
Parameters
----------
specification
*... |
Convert from *Munsell* *Colorlab* specification to specified *Munsell* colour.
Parameters
----------
specification
*Munsell* *Colorlab* specification.
hue_decimals
Hue formatting decimals.
value_decimals
Value formatting decimals.
chroma_decimals
Chroma form... | munsell_specification_to_munsell_colour | python | colour-science/colour | colour/notation/munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py | BSD-3-Clause |
def xyY_from_renotation(
specification: ArrayLike,
absolute_tolerance: float = TOLERANCE_ABSOLUTE_DEFAULT,
relative_tolerance: float = TOLERANCE_RELATIVE_DEFAULT,
) -> NDArrayFloat:
"""
Return specified existing *Munsell* *Colorlab* specification *CIE xyY*
colourspace vector from *Munsell Renota... |
Return specified existing *Munsell* *Colorlab* specification *CIE xyY*
colourspace vector from *Munsell Renotation System* data.
Parameters
----------
specification
*Munsell* *Colorlab* specification.
absolute_tolerance
Absolute tolerance to find the existing *Munsell Renotatio... | xyY_from_renotation | python | colour-science/colour | colour/notation/munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py | BSD-3-Clause |
def is_specification_in_renotation(specification: ArrayLike) -> bool:
"""
Return whether specified *Munsell* *Colorlab* specification is in
*Munsell Renotation System* data.
Parameters
----------
specification
*Munsell* *Colorlab* specification.
Returns
-------
:class:`bool... |
Return whether specified *Munsell* *Colorlab* specification is in
*Munsell Renotation System* data.
Parameters
----------
specification
*Munsell* *Colorlab* specification.
Returns
-------
:class:`bool`
Whether specification is in *Munsell Renotation System* data.
... | is_specification_in_renotation | python | colour-science/colour | colour/notation/munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py | BSD-3-Clause |
def bounding_hues_from_renotation(hue_and_code: ArrayLike) -> NDArrayFloat:
"""
Return for a specified *Munsell* *Colorlab* specification hue and *Munsell*
*Colorlab* specification code the two bounding hues from
*Munsell Renotation System* data.
Parameters
----------
hue_and_code
*... |
Return for a specified *Munsell* *Colorlab* specification hue and *Munsell*
*Colorlab* specification code the two bounding hues from
*Munsell Renotation System* data.
Parameters
----------
hue_and_code
*Munsell* *Colorlab* specification hue and *Munsell* *Colorlab*
specificatio... | bounding_hues_from_renotation | python | colour-science/colour | colour/notation/munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py | BSD-3-Clause |
def hue_to_hue_angle(hue_and_code: ArrayLike) -> float:
"""
Convert from the *Munsell* *Colorlab* specification hue and *Munsell*
*Colorlab* specification code to hue angle in degrees.
Parameters
----------
hue_and_code
*Munsell* *Colorlab* specification hue and *Munsell* *Colorlab*
... |
Convert from the *Munsell* *Colorlab* specification hue and *Munsell*
*Colorlab* specification code to hue angle in degrees.
Parameters
----------
hue_and_code
*Munsell* *Colorlab* specification hue and *Munsell* *Colorlab*
specification code.
Returns
-------
:class:`f... | hue_to_hue_angle | python | colour-science/colour | colour/notation/munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py | BSD-3-Clause |
def hue_angle_to_hue(hue_angle: float) -> NDArrayFloat:
"""
Convert from hue angle in degrees to the *Munsell* *Colorlab*
specification hue and code.
Parameters
----------
hue_angle
Hue angle in degrees.
Returns
-------
:class:`numpy.NDArrayFloat`
(*Munsell* *Colorl... |
Convert from hue angle in degrees to the *Munsell* *Colorlab*
specification hue and code.
Parameters
----------
hue_angle
Hue angle in degrees.
Returns
-------
:class:`numpy.NDArrayFloat`
(*Munsell* *Colorlab* specification hue, *Munsell* *Colorlab*
specificati... | hue_angle_to_hue | python | colour-science/colour | colour/notation/munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py | BSD-3-Clause |
def hue_to_ASTM_hue(hue_and_code: ArrayLike) -> float:
"""
Convert from the *Munsell* *Colorlab* specification hue and *Munsell*
*Colorlab* specification codeto *ASTM* hue number.
Parameters
----------
hue_and_code
*Munsell* *Colorlab* specification hue and *Munsell* *Colorlab*
... |
Convert from the *Munsell* *Colorlab* specification hue and *Munsell*
*Colorlab* specification codeto *ASTM* hue number.
Parameters
----------
hue_and_code
*Munsell* *Colorlab* specification hue and *Munsell* *Colorlab*
specification code.
Returns
-------
:class:`floa... | hue_to_ASTM_hue | python | colour-science/colour | colour/notation/munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py | BSD-3-Clause |
def interpolation_method_from_renotation_ovoid(
specification: ArrayLike,
) -> Literal["Linear", "Radial"] | None:
"""
Return whether to use linear or radial interpolation when drawing ovoids
through data points in the *Munsell Renotation System* data from specified
specification.
Parameters
... |
Return whether to use linear or radial interpolation when drawing ovoids
through data points in the *Munsell Renotation System* data from specified
specification.
Parameters
----------
specification
*Munsell* *Colorlab* specification.
Returns
-------
:class:`str` or :py:da... | interpolation_method_from_renotation_ovoid | python | colour-science/colour | colour/notation/munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py | BSD-3-Clause |
def xy_from_renotation_ovoid(specification: ArrayLike) -> NDArrayFloat:
"""
Convert specified *Munsell* *Colorlab* specification to *CIE xy* chromaticity
coordinates on *Munsell Renotation System* ovoid.
The *CIE xy* point will be on the ovoid about the achromatic point,
corresponding to the *Munsel... |
Convert specified *Munsell* *Colorlab* specification to *CIE xy* chromaticity
coordinates on *Munsell Renotation System* ovoid.
The *CIE xy* point will be on the ovoid about the achromatic point,
corresponding to the *Munsell* *Colorlab* specification
value and chroma.
Parameters
---------... | xy_from_renotation_ovoid | python | colour-science/colour | colour/notation/munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py | BSD-3-Clause |
def LCHab_to_munsell_specification(LCHab: ArrayLike) -> NDArrayFloat:
"""
Convert from *CIE L\\*C\\*Hab* colourspace to approximate *Munsell*
*Colorlab* specification.
Parameters
----------
LCHab
*CIE L\\*C\\*Hab* colourspace array.
Returns
-------
:class:`numpy.NDArrayFloa... |
Convert from *CIE L\*C\*Hab* colourspace to approximate *Munsell*
*Colorlab* specification.
Parameters
----------
LCHab
*CIE L\*C\*Hab* colourspace array.
Returns
-------
:class:`numpy.NDArrayFloat`
*Munsell* *Colorlab* specification.
References
----------
... | LCHab_to_munsell_specification | python | colour-science/colour | colour/notation/munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py | BSD-3-Clause |
def maximum_chroma_from_renotation(hue_and_value_and_code: ArrayLike) -> float:
"""
Return the maximum *Munsell* chroma from *Munsell Renotation System* data
using specified *Munsell* *Colorlab* specification hue, *Munsell* *Colorlab*
specification value and *Munsell* *Colorlab* specification code.
... |
Return the maximum *Munsell* chroma from *Munsell Renotation System* data
using specified *Munsell* *Colorlab* specification hue, *Munsell* *Colorlab*
specification value and *Munsell* *Colorlab* specification code.
Parameters
----------
hue_and_value_and_code
*Munsell* *Colorlab* spec... | maximum_chroma_from_renotation | python | colour-science/colour | colour/notation/munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py | BSD-3-Clause |
def munsell_specification_to_xy(specification: ArrayLike) -> NDArrayFloat:
"""
Convert specified *Munsell* *Colorlab* specification to *CIE xy* chromaticity
coordinates by interpolating over *Munsell Renotation System* data.
Parameters
----------
specification
*Munsell* *Colorlab* speci... |
Convert specified *Munsell* *Colorlab* specification to *CIE xy* chromaticity
coordinates by interpolating over *Munsell Renotation System* data.
Parameters
----------
specification
*Munsell* *Colorlab* specification.
Returns
-------
:class:`numpy.NDArrayFloat`
*CIE xy... | munsell_specification_to_xy | python | colour-science/colour | colour/notation/munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/munsell.py | BSD-3-Clause |
def test_RGB_to_HEX(self) -> None:
"""Test :func:`colour.notation.hexadecimal.RGB_to_HEX` definition."""
assert RGB_to_HEX(np.array([0.45620519, 0.03081071, 0.04091952])) == "#74070a"
assert RGB_to_HEX(np.array([0.00000000, 0.00000000, 0.00000000])) == "#000000"
assert RGB_to_HEX(np.a... | Test :func:`colour.notation.hexadecimal.RGB_to_HEX` definition. | test_RGB_to_HEX | python | colour-science/colour | colour/notation/tests/test_hexadecimal.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_hexadecimal.py | BSD-3-Clause |
def test_n_dimensional_RGB_to_HEX(self) -> None:
"""
Test :func:`colour.notation.hexadecimal.RGB_to_HEX` definition
n-dimensional arrays support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
HEX = RGB_to_HEX(RGB)
RGB = np.tile(RGB, (6, 1))
HE... |
Test :func:`colour.notation.hexadecimal.RGB_to_HEX` definition
n-dimensional arrays support.
| test_n_dimensional_RGB_to_HEX | python | colour-science/colour | colour/notation/tests/test_hexadecimal.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_hexadecimal.py | BSD-3-Clause |
def test_domain_range_scale_RGB_to_HEX(self) -> None:
"""
Test :func:`colour.notation.hexadecimal.RGB_to_HEX` definition domain
and range scale support.
"""
RGB = np.array([0.45620519, 0.03081071, 0.04091952])
HEX = RGB_to_HEX(RGB)
d_r = (("reference", 1), ("1",... |
Test :func:`colour.notation.hexadecimal.RGB_to_HEX` definition domain
and range scale support.
| test_domain_range_scale_RGB_to_HEX | python | colour-science/colour | colour/notation/tests/test_hexadecimal.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_hexadecimal.py | BSD-3-Clause |
def test_nan_RGB_to_HEX(self) -> None:
"""
Test :func:`colour.notation.hexadecimal.RGB_to_HEX` 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))))
RGB_to_HEX(cases) |
Test :func:`colour.notation.hexadecimal.RGB_to_HEX` definition
nan support.
| test_nan_RGB_to_HEX | python | colour-science/colour | colour/notation/tests/test_hexadecimal.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_hexadecimal.py | BSD-3-Clause |
def test_HEX_to_RGB(self) -> None:
"""Test :func:`colour.notation.hexadecimal.HEX_to_RGB` definition."""
np.testing.assert_allclose(
HEX_to_RGB("#74070a"),
np.array([0.45620519, 0.03081071, 0.04091952]),
atol=1e-1,
)
np.testing.assert_allclose(
... | Test :func:`colour.notation.hexadecimal.HEX_to_RGB` definition. | test_HEX_to_RGB | python | colour-science/colour | colour/notation/tests/test_hexadecimal.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_hexadecimal.py | BSD-3-Clause |
def test_n_dimensional_HEX_to_RGB(self) -> None:
"""
Test :func:`colour.notation.hexadecimal.HEX_to_RGB` definition
n-dimensional arrays support.
"""
HEX = "#74070a"
RGB = HEX_to_RGB(HEX)
HEX = np.tile(HEX, 6)
RGB = np.tile(RGB, (6, 1))
np.testin... |
Test :func:`colour.notation.hexadecimal.HEX_to_RGB` definition
n-dimensional arrays support.
| test_n_dimensional_HEX_to_RGB | python | colour-science/colour | colour/notation/tests/test_hexadecimal.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_hexadecimal.py | BSD-3-Clause |
def test_domain_range_scale_HEX_to_RGB(self) -> None:
"""
Test :func:`colour.notation.hexadecimal.HEX_to_RGB` definition domain
and range scale support.
"""
HEX = "#74070a"
RGB = HEX_to_RGB(HEX)
d_r = (("reference", 1), ("1", 1), ("100", 100))
for scale,... |
Test :func:`colour.notation.hexadecimal.HEX_to_RGB` definition domain
and range scale support.
| test_domain_range_scale_HEX_to_RGB | python | colour-science/colour | colour/notation/tests/test_hexadecimal.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_hexadecimal.py | BSD-3-Clause |
def _generate_unit_tests_specifications() -> tuple: # pragma: no cover
"""
Generate the unit tests specifications.
Returns
-------
:class:`tuple`
Tuples of unit tests specifications. The first tuple represents even
specifications and their corresponding *CIE xyY* colourspace values... |
Generate the unit tests specifications.
Returns
-------
:class:`tuple`
Tuples of unit tests specifications. The first tuple represents even
specifications and their corresponding *CIE xyY* colourspace values.
The tuple represents random specifications and their corresponding
... | _generate_unit_tests_specifications | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_munsell_value_Priest1920(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Priest1920`
definition.
"""
np.testing.assert_allclose(
munsell_value_Priest1920(12.23634268),
3.498048410185314,
atol=TOLERANCE_ABSOLUTE_TE... |
Test :func:`colour.notation.munsell.munsell_value_Priest1920`
definition.
| test_munsell_value_Priest1920 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_n_dimensional_munsell_value_Priest1920(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Priest1920`
definition n-dimensional arrays support.
"""
Y = 12.23634268
V = munsell_value_Priest1920(Y)
V = np.tile(V, 6)
Y = np.tile(Y,... |
Test :func:`colour.notation.munsell.munsell_value_Priest1920`
definition n-dimensional arrays support.
| test_n_dimensional_munsell_value_Priest1920 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_domain_range_scale_munsell_value_Priest1920(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Priest1920`
definition domain and range scale support.
"""
Y = 12.23634268
V = munsell_value_Priest1920(Y)
d_r = (("reference", 1, 1), ("1",... |
Test :func:`colour.notation.munsell.munsell_value_Priest1920`
definition domain and range scale support.
| test_domain_range_scale_munsell_value_Priest1920 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_munsell_value_Munsell1933(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Munsell1933`
definition.
"""
np.testing.assert_allclose(
munsell_value_Munsell1933(12.23634268),
4.1627702416858083,
atol=TOLERANCE_ABSOLUT... |
Test :func:`colour.notation.munsell.munsell_value_Munsell1933`
definition.
| test_munsell_value_Munsell1933 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_n_dimensional_munsell_value_Munsell1933(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Munsell1933`
definition n-dimensional arrays support.
"""
Y = 12.23634268
V = munsell_value_Munsell1933(Y)
V = np.tile(V, 6)
Y = np.tile... |
Test :func:`colour.notation.munsell.munsell_value_Munsell1933`
definition n-dimensional arrays support.
| test_n_dimensional_munsell_value_Munsell1933 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_domain_range_scale_munsell_value_Munsell1933(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Munsell1933`
definition domain and range scale support.
"""
Y = 12.23634268
V = munsell_value_Munsell1933(Y)
d_r = (("reference", 1, 1), ("... |
Test :func:`colour.notation.munsell.munsell_value_Munsell1933`
definition domain and range scale support.
| test_domain_range_scale_munsell_value_Munsell1933 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_munsell_value_Moon1943(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Moon1943`
definition.
"""
np.testing.assert_allclose(
munsell_value_Moon1943(12.23634268),
4.0688120634976421,
atol=TOLERANCE_ABSOLUTE_TESTS,
... |
Test :func:`colour.notation.munsell.munsell_value_Moon1943`
definition.
| test_munsell_value_Moon1943 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_n_dimensional_munsell_value_Moon1943(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Moon1943`
definition n-dimensional arrays support.
"""
Y = 12.23634268
V = munsell_value_Moon1943(Y)
V = np.tile(V, 6)
Y = np.tile(Y, 6)
... |
Test :func:`colour.notation.munsell.munsell_value_Moon1943`
definition n-dimensional arrays support.
| test_n_dimensional_munsell_value_Moon1943 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_domain_range_scale_munsell_value_Moon1943(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Moon1943`
definition domain and range scale support.
"""
Y = 12.23634268
V = munsell_value_Moon1943(Y)
d_r = (("reference", 1, 1), ("1", 0.01,... |
Test :func:`colour.notation.munsell.munsell_value_Moon1943`
definition domain and range scale support.
| test_domain_range_scale_munsell_value_Moon1943 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_munsell_value_Saunderson1944(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Saunderson1944`
definition.
"""
np.testing.assert_allclose(
munsell_value_Saunderson1944(12.23634268),
4.0444736723175119,
atol=TOLERANC... |
Test :func:`colour.notation.munsell.munsell_value_Saunderson1944`
definition.
| test_munsell_value_Saunderson1944 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_n_dimensional_munsell_value_Saunderson1944(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Saunderson1944`
definition n-dimensional arrays support.
"""
Y = 12.23634268
V = munsell_value_Saunderson1944(Y)
V = np.tile(V, 6)
Y ... |
Test :func:`colour.notation.munsell.munsell_value_Saunderson1944`
definition n-dimensional arrays support.
| test_n_dimensional_munsell_value_Saunderson1944 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_domain_range_scale_munsell_value_Saunderson1944(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Saunderson1944`
definition domain and range scale support.
"""
Y = 12.23634268
V = munsell_value_Saunderson1944(Y)
d_r = (("reference", ... |
Test :func:`colour.notation.munsell.munsell_value_Saunderson1944`
definition domain and range scale support.
| test_domain_range_scale_munsell_value_Saunderson1944 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_nan_munsell_value_Saunderson1944(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Saunderson1944`
definition nan support.
"""
munsell_value_Saunderson1944(
np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan])
) |
Test :func:`colour.notation.munsell.munsell_value_Saunderson1944`
definition nan support.
| test_nan_munsell_value_Saunderson1944 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_munsell_value_Ladd1955(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Ladd1955`
definition.
"""
np.testing.assert_allclose(
munsell_value_Ladd1955(12.23634268),
4.0511633044287088,
atol=TOLERANCE_ABSOLUTE_TESTS,
... |
Test :func:`colour.notation.munsell.munsell_value_Ladd1955`
definition.
| test_munsell_value_Ladd1955 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_n_dimensional_munsell_value_Ladd1955(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Ladd1955`
definition n-dimensional arrays support.
"""
Y = 12.23634268
V = munsell_value_Ladd1955(Y)
V = np.tile(V, 6)
Y = np.tile(Y, 6)
... |
Test :func:`colour.notation.munsell.munsell_value_Ladd1955`
definition n-dimensional arrays support.
| test_n_dimensional_munsell_value_Ladd1955 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_domain_range_scale_munsell_value_Ladd1955(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_Ladd1955`
definition domain and range scale support.
"""
Y = 12.23634268
V = munsell_value_Ladd1955(Y)
d_r = (("reference", 1, 1), ("1", 0.01,... |
Test :func:`colour.notation.munsell.munsell_value_Ladd1955`
definition domain and range scale support.
| test_domain_range_scale_munsell_value_Ladd1955 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_munsell_value_McCamy1987(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_McCamy1987`
definition.
"""
np.testing.assert_allclose(
munsell_value_McCamy1987(12.23634268),
4.081434853194113,
atol=TOLERANCE_ABSOLUTE_TE... |
Test :func:`colour.notation.munsell.munsell_value_McCamy1987`
definition.
| test_munsell_value_McCamy1987 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_n_dimensional_munsell_value_McCamy1987(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_McCamy1987`
definition n-dimensional arrays support.
"""
Y = 12.23634268
V = munsell_value_McCamy1987(Y)
V = np.tile(V, 6)
Y = np.tile(Y,... |
Test :func:`colour.notation.munsell.munsell_value_McCamy1987`
definition n-dimensional arrays support.
| test_n_dimensional_munsell_value_McCamy1987 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_domain_range_scale_munsell_value_McCamy1987(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_McCamy1987`
definition domain and range scale support.
"""
Y = 12.23634268
V = munsell_value_McCamy1987(Y)
d_r = (("reference", 1, 1), ("1",... |
Test :func:`colour.notation.munsell.munsell_value_McCamy1987`
definition domain and range scale support.
| test_domain_range_scale_munsell_value_McCamy1987 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_munsell_value_ASTMD1535(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_ASTMD1535`
definition.
"""
np.testing.assert_allclose(
munsell_value_ASTMD1535(12.23634268),
4.0824437076525664,
atol=TOLERANCE_ABSOLUTE_TEST... |
Test :func:`colour.notation.munsell.munsell_value_ASTMD1535`
definition.
| test_munsell_value_ASTMD1535 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_n_dimensional_munsell_value_ASTMD1535(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_ASTMD1535`
definition n-dimensional arrays support.
"""
Y = 12.23634268
V = munsell_value_ASTMD1535(Y)
V = np.tile(V, 6)
Y = np.tile(Y, 6)... |
Test :func:`colour.notation.munsell.munsell_value_ASTMD1535`
definition n-dimensional arrays support.
| test_n_dimensional_munsell_value_ASTMD1535 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_domain_range_scale_munsell_value_ASTMD1535(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_value_ASTMD1535`
definition domain and range scale support.
"""
Y = 12.23634268
V = munsell_value_ASTMD1535(Y)
d_r = (("reference", 1, 1), ("1", 0.... |
Test :func:`colour.notation.munsell.munsell_value_ASTMD1535`
definition domain and range scale support.
| test_domain_range_scale_munsell_value_ASTMD1535 | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_munsell_specification_to_xyY(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_specification_to_xyY`
definition.
"""
specification, xyY = (
as_float_array(list(MUNSELL_SPECIFICATIONS[..., 0])),
as_float_array(list(MUNSELL_SPECIFICATI... |
Test :func:`colour.notation.munsell.munsell_specification_to_xyY`
definition.
| test_munsell_specification_to_xyY | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_n_dimensional_munsell_specification_to_xyY(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_specification_to_xyY`
definition n-dimensional arrays support.
"""
specification = np.array([7.18927191, 5.34025196, 16.05861170, 3.00000000])
xyY = munsell... |
Test :func:`colour.notation.munsell.munsell_specification_to_xyY`
definition n-dimensional arrays support.
| test_n_dimensional_munsell_specification_to_xyY | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_domain_range_scale_munsell_specification_to_xyY(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_specification_to_xyY`
definition domain and range scale support.
"""
specification = np.array([7.18927191, 5.34025196, 16.05861170, 3.00000000])
xyY = ... |
Test :func:`colour.notation.munsell.munsell_specification_to_xyY`
definition domain and range scale support.
| test_domain_range_scale_munsell_specification_to_xyY | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_nan_munsell_specification_to_xyY(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_specification_to_xyY`
definition nan support.
"""
cases = [-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan]
cases = np.array(list(set(product(cases, repeat=4))))
for ... |
Test :func:`colour.notation.munsell.munsell_specification_to_xyY`
definition nan support.
| test_nan_munsell_specification_to_xyY | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_domain_range_scale_munsell_colour_to_xyY(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_colour_to_xyY` definition
domain and range scale support.
"""
munsell_colour = "4.2YR 8.1/5.3"
xyY = munsell_colour_to_xyY(munsell_colour)
d_r = (
... |
Test :func:`colour.notation.munsell.munsell_colour_to_xyY` definition
domain and range scale support.
| test_domain_range_scale_munsell_colour_to_xyY | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_n_dimensional_munsell_colour_to_xyY(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_colour_to_xyY` definition
n-dimensional arrays support.
"""
munsell_colour = "4.2YR 8.1/5.3"
xyY = munsell_colour_to_xyY(munsell_colour)
munsell_colour = ... |
Test :func:`colour.notation.munsell.munsell_colour_to_xyY` definition
n-dimensional arrays support.
| test_n_dimensional_munsell_colour_to_xyY | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_xyY_to_munsell_specification(self) -> None:
"""
Test :func:`colour.notation.munsell.xyY_to_munsell_specification`
definition.
"""
specification, xyY = (
as_float_array(list(MUNSELL_SPECIFICATIONS[..., 0])),
as_float_array(list(MUNSELL_SPECIFICATI... |
Test :func:`colour.notation.munsell.xyY_to_munsell_specification`
definition.
| test_xyY_to_munsell_specification | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_n_dimensional_xyY_to_munsell_specification(self) -> None:
"""
Test :func:`colour.notation.munsell.xyY_to_munsell_specification`
definition n-dimensional arrays support.
"""
xyY = [0.16623068, 0.45684550, 0.22399519]
specification = xyY_to_munsell_specification(x... |
Test :func:`colour.notation.munsell.xyY_to_munsell_specification`
definition n-dimensional arrays support.
| test_n_dimensional_xyY_to_munsell_specification | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_raise_exception_xyY_to_munsell_specification(self) -> None:
"""
Test :func:`colour.notation.munsell.xyY_to_munsell_specification`
definition raised exception.
"""
pytest.raises(
RuntimeError,
xyY_to_munsell_specification,
np.array([0.... |
Test :func:`colour.notation.munsell.xyY_to_munsell_specification`
definition raised exception.
| test_raise_exception_xyY_to_munsell_specification | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_domain_range_scale_xyY_to_munsell_specification(self) -> None:
"""
Test :func:`colour.notation.munsell.xyY_to_munsell_specification`
definition domain and range scale support.
"""
xyY = [0.16623068, 0.45684550, 0.22399519]
specification = xyY_to_munsell_specific... |
Test :func:`colour.notation.munsell.xyY_to_munsell_specification`
definition domain and range scale support.
| test_domain_range_scale_xyY_to_munsell_specification | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_nan_xyY_to_munsell_specification(self) -> None:
"""
Test :func:`colour.notation.munsell.xyY_to_munsell_specification`
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))))
for ... |
Test :func:`colour.notation.munsell.xyY_to_munsell_specification`
definition nan support.
| test_nan_xyY_to_munsell_specification | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_domain_range_scale_xyY_to_munsell_colour(self) -> None:
"""
Test :func:`colour.notation.munsell.xyY_to_munsell_colour` definition
domain and range scale support.
"""
xyY = np.array([0.38736945, 0.35751656, 0.59362000])
munsell_colour = xyY_to_munsell_colour(xyY)... |
Test :func:`colour.notation.munsell.xyY_to_munsell_colour` definition
domain and range scale support.
| test_domain_range_scale_xyY_to_munsell_colour | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_n_dimensional_xyY_to_munsell_colour(self) -> None:
"""
Test :func:`colour.notation.munsell.xyY_to_munsell_colour` definition
n-dimensional arrays support.
"""
xyY = [0.16623068, 0.45684550, 0.22399519]
munsell_colour = xyY_to_munsell_colour(xyY)
xyY = n... |
Test :func:`colour.notation.munsell.xyY_to_munsell_colour` definition
n-dimensional arrays support.
| test_n_dimensional_xyY_to_munsell_colour | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_parse_munsell_colour(self) -> None:
"""
Test :func:`colour.notation.munsell.is_grey_munsell_colour`
definition.
"""
np.testing.assert_allclose(
parse_munsell_colour("N5.2"),
np.array([np.nan, 5.2, np.nan, np.nan]),
atol=TOLERANCE_ABSO... |
Test :func:`colour.notation.munsell.is_grey_munsell_colour`
definition.
| test_parse_munsell_colour | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_normalise_munsell_specification(self) -> None:
"""
Test :func:`colour.notation.munsell.normalise_munsell_specification`
definition.
"""
np.testing.assert_allclose(
normalise_munsell_specification((0.0, 2.0, 4.0, 6)),
np.array([10.0, 2.0, 4.0, 7])... |
Test :func:`colour.notation.munsell.normalise_munsell_specification`
definition.
| test_normalise_munsell_specification | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_munsell_colour_to_munsell_specification(self) -> None:
"""
Test :func:`colour.notation.munsell.\
munsell_colour_to_munsell_specification` definition.
"""
np.testing.assert_allclose(
munsell_colour_to_munsell_specification("0.0YR 2.0/4.0"),
np.array([10.0... |
Test :func:`colour.notation.munsell.munsell_colour_to_munsell_specification` definition.
| test_munsell_colour_to_munsell_specification | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_munsell_specification_to_munsell_colour(self) -> None:
"""
Test :func:`colour.notation.munsell.\
munsell_specification_to_munsell_colour` definition.
"""
assert (
munsell_specification_to_munsell_colour(np.array([10.0, 2.0, 4.0, 7]))
== "10.0R 2.0/4.0"
... |
Test :func:`colour.notation.munsell.munsell_specification_to_munsell_colour` definition.
| test_munsell_specification_to_munsell_colour | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_xyY_from_renotation(self) -> None:
"""
Test :func:`colour.notation.munsell.xyY_from_renotation`
definition.
"""
np.testing.assert_array_equal(
xyY_from_renotation([2.5, 0.2, 2.0, 4]),
np.array([0.713, 1.414, 0.237]),
)
np.testing... |
Test :func:`colour.notation.munsell.xyY_from_renotation`
definition.
| test_xyY_from_renotation | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_is_specification_in_renotation(self) -> None:
"""
Test :func:`colour.notation.munsell.is_specification_in_renotation`
definition.
"""
assert is_specification_in_renotation(np.array([2.5, 0.2, 2.0, 4]))
assert is_specification_in_renotation(np.array([5.0, 0.2, 2... |
Test :func:`colour.notation.munsell.is_specification_in_renotation`
definition.
| test_is_specification_in_renotation | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_bounding_hues_from_renotation(self) -> None:
"""
Test :func:`colour.notation.munsell.bounding_hues_from_renotation`
definition.
"""
for i, (specification, _xyY) in enumerate(MUNSELL_SPECIFICATIONS):
hue, _value, _chroma, code = specification
np.t... |
Test :func:`colour.notation.munsell.bounding_hues_from_renotation`
definition.
| test_bounding_hues_from_renotation | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_hue_to_hue_angle(self) -> None:
"""Test :func:`colour.notation.munsell.hue_to_hue_angle` definition."""
for hue, code, angle in MUNSELL_HUE_TO_ANGLE:
assert hue_to_hue_angle([hue, code]) == angle | Test :func:`colour.notation.munsell.hue_to_hue_angle` definition. | test_hue_to_hue_angle | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_hue_angle_to_hue(self) -> None:
"""Test :func:`colour.notation.munsell.hue_angle_to_hue` definition."""
for hue, code, angle in MUNSELL_HUE_TO_ANGLE:
np.testing.assert_array_equal(hue_angle_to_hue(angle), (hue, code)) | Test :func:`colour.notation.munsell.hue_angle_to_hue` definition. | test_hue_angle_to_hue | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_hue_to_ASTM_hue(self) -> None:
"""Test :func:`colour.notation.munsell.hue_to_ASTM_hue` definition."""
for hue, code, angle in MUNSELL_HUE_TO_ASTM_HUE:
assert hue_to_ASTM_hue([hue, code]) == angle | Test :func:`colour.notation.munsell.hue_to_ASTM_hue` definition. | test_hue_to_ASTM_hue | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_interpolation_method_from_renotation_ovoid(self) -> None:
"""
Test :func:`colour.notation.munsell.\
interpolation_method_from_renotation_ovoid` definition.
"""
for i, (specification, _xyY) in enumerate(MUNSELL_EVEN_SPECIFICATIONS):
assert (
interpola... |
Test :func:`colour.notation.munsell.interpolation_method_from_renotation_ovoid` definition.
| test_interpolation_method_from_renotation_ovoid | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_xy_from_renotation_ovoid(self) -> None:
"""
Test :func:`colour.notation.munsell.xy_from_renotation_ovoid`
definition.
"""
for i, (specification, _xyY) in enumerate(MUNSELL_EVEN_SPECIFICATIONS):
if is_specification_in_renotation(specification):
... |
Test :func:`colour.notation.munsell.xy_from_renotation_ovoid`
definition.
| test_xy_from_renotation_ovoid | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_LCHab_to_munsell_specification(self) -> None:
"""
Test :func:`colour.notation.munsell.LCHab_to_munsell_specification`
definition.
"""
np.testing.assert_allclose(
LCHab_to_munsell_specification(
np.array([100.00000000, 21.57210357, 272.2281935... |
Test :func:`colour.notation.munsell.LCHab_to_munsell_specification`
definition.
| test_LCHab_to_munsell_specification | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_maximum_chroma_from_renotation(self) -> None:
"""
Test :func:`colour.notation.munsell.maximum_chroma_from_renotation`
definition.
"""
assert maximum_chroma_from_renotation([2.5, 5, 5]) == 14.0
assert maximum_chroma_from_renotation([8.675, 1.225, 10]) == 48.0
... |
Test :func:`colour.notation.munsell.maximum_chroma_from_renotation`
definition.
| test_maximum_chroma_from_renotation | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def test_munsell_specification_to_xy(self) -> None:
"""
Test :func:`colour.notation.munsell.munsell_specification_to_xy`
definition.
"""
for specification, xyY in MUNSELL_EVEN_SPECIFICATIONS:
np.testing.assert_allclose(
munsell_specification_to_xy(spe... |
Test :func:`colour.notation.munsell.munsell_specification_to_xy`
definition.
| test_munsell_specification_to_xy | python | colour-science/colour | colour/notation/tests/test_munsell.py | https://github.com/colour-science/colour/blob/master/colour/notation/tests/test_munsell.py | BSD-3-Clause |
def air_refraction_index_Penndorf1957(
wavelength: ArrayLike,
) -> NDArrayFloat:
"""
Compute the air refraction index :math:`n_s` from specified wavelength
:math:`\\lambda` in micrometers (:math:`\\mu m`) using *Penndorf (1957)*
method.
Parameters
----------
wavelength
Waveleng... |
Compute the air refraction index :math:`n_s` from specified wavelength
:math:`\lambda` in micrometers (:math:`\mu m`) using *Penndorf (1957)*
method.
Parameters
----------
wavelength
Wavelength :math:`\lambda` in micrometers (:math:`\mu m`).
Returns
-------
:class:`numpy.... | air_refraction_index_Penndorf1957 | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def air_refraction_index_Edlen1966(
wavelength: ArrayLike,
) -> NDArrayFloat:
"""
Compute the air refraction index :math:`n_s` from specified wavelength
:math:`\\lambda` in micrometers (:math:`\\mu m`) using *Edlen (1966)*
method.
Parameters
----------
wavelength
Wavelength :mat... |
Compute the air refraction index :math:`n_s` from specified wavelength
:math:`\lambda` in micrometers (:math:`\mu m`) using *Edlen (1966)*
method.
Parameters
----------
wavelength
Wavelength :math:`\lambda` in micrometers (:math:`\mu m`).
Returns
-------
:class:`numpy.ndar... | air_refraction_index_Edlen1966 | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def air_refraction_index_Peck1972(
wavelength: ArrayLike,
) -> NDArrayFloat:
"""
Compute the air refraction index :math:`n_s` from specified wavelength
:math:`\\lambda` in micrometers (:math:`\\mu m`) using
*Peck and Reeder (1972)* method.
Parameters
----------
wavelength
Wavele... |
Compute the air refraction index :math:`n_s` from specified wavelength
:math:`\lambda` in micrometers (:math:`\mu m`) using
*Peck and Reeder (1972)* method.
Parameters
----------
wavelength
Wavelength :math:`\lambda` in micrometers (:math:`\mu m`).
Returns
-------
:class:`... | air_refraction_index_Peck1972 | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def air_refraction_index_Bodhaine1999(
wavelength: ArrayLike,
CO2_concentration: ArrayLike = CONSTANT_STANDARD_CO2_CONCENTRATION,
) -> NDArrayFloat:
"""
Compute the air refraction index :math:`n_s` from specified wavelength
:math:`\\lambda` in micrometers (:math:`\\mu m`) using
*Bodhaine, Wood, ... |
Compute the air refraction index :math:`n_s` from specified wavelength
:math:`\lambda` in micrometers (:math:`\mu m`) using
*Bodhaine, Wood, Dutton and Slusser (1999)* method.
Parameters
----------
wavelength
Wavelength :math:`\lambda` in micrometers (:math:`\mu m`).
CO2_concentrat... | air_refraction_index_Bodhaine1999 | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def N2_depolarisation(wavelength: ArrayLike) -> NDArrayFloat:
"""
Compute the depolarisation of nitrogen :math:`N_2` as function of
wavelength :math:`\\lambda` in micrometers (:math:`\\mu m`).
Parameters
----------
wavelength
Wavelength :math:`\\lambda` in micrometers (:math:`\\mu m`).
... |
Compute the depolarisation of nitrogen :math:`N_2` as function of
wavelength :math:`\lambda` in micrometers (:math:`\mu m`).
Parameters
----------
wavelength
Wavelength :math:`\lambda` in micrometers (:math:`\mu m`).
Returns
-------
:class:`numpy.ndarray`
Nitrogen :mat... | N2_depolarisation | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def O2_depolarisation(wavelength: ArrayLike) -> NDArrayFloat:
"""
Compute the depolarisation of oxygen :math:`O_2` as function of
wavelength :math:`\\lambda` in micrometers (:math:`\\mu m`).
Parameters
----------
wavelength
Wavelength :math:`\\lambda` in micrometers (:math:`\\mu m`).
... |
Compute the depolarisation of oxygen :math:`O_2` as function of
wavelength :math:`\lambda` in micrometers (:math:`\mu m`).
Parameters
----------
wavelength
Wavelength :math:`\lambda` in micrometers (:math:`\mu m`).
Returns
-------
:class:`numpy.ndarray`
Oxygen :math:`O... | O2_depolarisation | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def F_air_Penndorf1957(wavelength: ArrayLike) -> NDArrayFloat:
"""
Compute :math:`(6+3_p)/(6-7_p)`, the depolarisation term :math:`F(air)` or
*King Factor* using *Penndorf (1957)* method.
Parameters
----------
wavelength
Wavelength :math:`\\lambda` in micrometers (:math:`\\mu m`).
... |
Compute :math:`(6+3_p)/(6-7_p)`, the depolarisation term :math:`F(air)` or
*King Factor* using *Penndorf (1957)* method.
Parameters
----------
wavelength
Wavelength :math:`\lambda` in micrometers (:math:`\mu m`).
Returns
-------
:class:`numpy.ndarray`
Air depolarisatio... | F_air_Penndorf1957 | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def F_air_Young1981(wavelength: ArrayLike) -> NDArrayFloat:
"""
Compute :math:`(6+3_p)/(6-7_p)`, the depolarisation term :math:`F(air)` or
*King Factor* using *Young (1981)* method.
Parameters
----------
wavelength
Wavelength :math:`\\lambda` in micrometers (:math:`\\mu m`).
Return... |
Compute :math:`(6+3_p)/(6-7_p)`, the depolarisation term :math:`F(air)` or
*King Factor* using *Young (1981)* method.
Parameters
----------
wavelength
Wavelength :math:`\lambda` in micrometers (:math:`\mu m`).
Returns
-------
:class:`numpy.ndarray`
Air depolarisation.
... | F_air_Young1981 | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def F_air_Bates1984(wavelength: ArrayLike) -> NDArrayFloat:
"""
Compute :math:`(6+3_p)/(6-7_p)`, the depolarisation term :math:`F(air)` or
*King Factor* as function of wavelength :math:`\\lambda` in micrometers
(:math:`\\mu m`) using *Bates (1984)* method.
Parameters
----------
wavelength
... |
Compute :math:`(6+3_p)/(6-7_p)`, the depolarisation term :math:`F(air)` or
*King Factor* as function of wavelength :math:`\lambda` in micrometers
(:math:`\mu m`) using *Bates (1984)* method.
Parameters
----------
wavelength
Wavelength :math:`\lambda` in micrometers (:math:`\mu m`).
... | F_air_Bates1984 | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def F_air_Bodhaine1999(
wavelength: ArrayLike,
CO2_concentration: ArrayLike = CONSTANT_STANDARD_CO2_CONCENTRATION,
) -> NDArrayFloat:
"""
Compute :math:`(6+3_p)/(6-7_p)`, the depolarisation term :math:`F(air)` or
*King Factor* as function of wavelength :math:`\\lambda` in micrometers
(:math:`\\m... |
Compute :math:`(6+3_p)/(6-7_p)`, the depolarisation term :math:`F(air)` or
*King Factor* as function of wavelength :math:`\lambda` in micrometers
(:math:`\mu m`) and :math:`CO_2` concentration in parts per million (ppm)
using *Bodhaine, Wood, Dutton and Slusser (1999)* method.
Parameters
-----... | F_air_Bodhaine1999 | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def mean_molecular_weights(
CO2_concentration: ArrayLike = CONSTANT_STANDARD_CO2_CONCENTRATION,
) -> NDArrayFloat:
"""
Compute the mean molecular weights :math:`m_a` for dry air as function of
:math:`CO_2` concentration in parts per million (ppm).
Parameters
----------
CO2_concentration
... |
Compute the mean molecular weights :math:`m_a` for dry air as function of
:math:`CO_2` concentration in parts per million (ppm).
Parameters
----------
CO2_concentration
:math:`CO_2` concentration in parts per million (ppm).
Returns
-------
:class:`numpy.ndarray`
Mean m... | mean_molecular_weights | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def gravity_List1968(
latitude: ArrayLike = CONSTANT_DEFAULT_LATITUDE,
altitude: ArrayLike = CONSTANT_DEFAULT_ALTITUDE,
) -> NDArrayFloat:
"""
Compute the gravity :math:`g` in :math:`cm/s_2` (gal) representative of the
mass-weighted column of air molecules above the site of specified latitude
an... |
Compute the gravity :math:`g` in :math:`cm/s_2` (gal) representative of the
mass-weighted column of air molecules above the site of specified latitude
and altitude using *list (1968)* method.
Parameters
----------
latitude
Latitude of the site in degrees.
altitude
Altitude ... | gravity_List1968 | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def scattering_cross_section(
wavelength: ArrayLike,
CO2_concentration: ArrayLike = CONSTANT_STANDARD_CO2_CONCENTRATION,
temperature: ArrayLike = CONSTANT_STANDARD_AIR_TEMPERATURE,
avogadro_constant: ArrayLike = CONSTANT_AVOGADRO,
n_s_function: Callable = air_refraction_index_Bodhaine1999,
F_air... |
Compute the scattering cross-section per molecule :math:`\sigma` of dry
air as function of wavelength :math:`\lambda` in centimeters (cm) using
specified :math:`CO_2` concentration in parts per million (ppm) and
temperature :math:`T[K]` in kelvin degrees following *Van de Hulst (1957)*
method.
... | scattering_cross_section | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def rayleigh_optical_depth(
wavelength: ArrayLike,
CO2_concentration: ArrayLike = CONSTANT_STANDARD_CO2_CONCENTRATION,
temperature: ArrayLike = CONSTANT_STANDARD_AIR_TEMPERATURE,
pressure: ArrayLike = CONSTANT_AVERAGE_PRESSURE_MEAN_SEA_LEVEL,
latitude: ArrayLike = CONSTANT_DEFAULT_LATITUDE,
alti... |
Compute the *Rayleigh* optical depth :math:`T_r(\lambda)` as function of
wavelength :math:`\lambda` in centimeters (cm).
Parameters
----------
wavelength
Wavelength :math:`\lambda` in centimeters (cm).
CO2_concentration
:math:`CO_2` concentration in parts per million (ppm).
... | rayleigh_optical_depth | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def sd_rayleigh_scattering(
shape: SpectralShape = SPECTRAL_SHAPE_DEFAULT,
CO2_concentration: ArrayLike = CONSTANT_STANDARD_CO2_CONCENTRATION,
temperature: ArrayLike = CONSTANT_STANDARD_AIR_TEMPERATURE,
pressure: ArrayLike = CONSTANT_AVERAGE_PRESSURE_MEAN_SEA_LEVEL,
latitude: ArrayLike = CONSTANT_DE... |
Compute the *Rayleigh* spectral distribution for specified spectral shape.
Parameters
----------
shape
Spectral shape used to create the *Rayleigh* scattering spectral
distribution.
CO2_concentration
:math:`CO_2` concentration in parts per million (ppm).
temperature
... | sd_rayleigh_scattering | python | colour-science/colour | colour/phenomena/rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/rayleigh.py | BSD-3-Clause |
def test_air_refraction_index_Penndorf1957(self) -> None:
"""
Test :func:`colour.phenomena.rayleigh.\
air_refraction_index_Penndorf1957` definition.
"""
np.testing.assert_allclose(
air_refraction_index_Penndorf1957(0.360),
1.000285316795146,
atol=TOLE... |
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Penndorf1957` definition.
| test_air_refraction_index_Penndorf1957 | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_n_dimensional_air_refraction_index_Penndorf1957(self) -> None:
"""
Test :func:`colour.phenomena.rayleigh.\
air_refraction_index_Penndorf1957` definition n-dimensional arrays support.
"""
wl = 0.360
n = air_refraction_index_Penndorf1957(wl)
wl = np.tile(wl, 6)
... |
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Penndorf1957` definition n-dimensional arrays support.
| test_n_dimensional_air_refraction_index_Penndorf1957 | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_nan_air_refraction_index_Penndorf1957(self) -> None:
"""
Test :func:`colour.phenomena.rayleigh.\
air_refraction_index_Penndorf1957` definition nan support.
"""
air_refraction_index_Penndorf1957(
np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan])
) |
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Penndorf1957` definition nan support.
| test_nan_air_refraction_index_Penndorf1957 | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_air_refraction_index_Edlen1966(self) -> None:
"""
Test :func:`colour.phenomena.\
rayleigh.air_refraction_index_Edlen1966` definition.
"""
np.testing.assert_allclose(
air_refraction_index_Edlen1966(0.360),
1.000285308809879,
atol=TOLERANCE_ABS... |
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Edlen1966` definition.
| test_air_refraction_index_Edlen1966 | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_n_dimensional_air_refraction_index_Edlen1966(self) -> None:
"""
Test :func:`colour.phenomena.rayleigh.\
air_refraction_index_Edlen1966` definition n-dimensional arrays support.
"""
wl = 0.360
n = air_refraction_index_Edlen1966(wl)
wl = np.tile(wl, 6)
n ... |
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Edlen1966` definition n-dimensional arrays support.
| test_n_dimensional_air_refraction_index_Edlen1966 | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_nan_air_refraction_index_Edlen1966(self) -> None:
"""
Test :func:`colour.phenomena.rayleigh.\
air_refraction_index_Edlen1966` definition nan support.
"""
air_refraction_index_Edlen1966(
np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan])
) |
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Edlen1966` definition nan support.
| test_nan_air_refraction_index_Edlen1966 | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_air_refraction_index_Peck1972(self) -> None:
"""
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Peck1972`
definition.
"""
np.testing.assert_allclose(
air_refraction_index_Peck1972(0.360),
1.000285310285056,
atol=TOLERANCE_... |
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Peck1972`
definition.
| test_air_refraction_index_Peck1972 | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_n_dimensional_air_refraction_index_Peck1972(self) -> None:
"""
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Peck1972`
definition n-dimensional arrays support.
"""
wl = 0.360
n = air_refraction_index_Peck1972(wl)
wl = np.tile(wl, 6)
... |
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Peck1972`
definition n-dimensional arrays support.
| test_n_dimensional_air_refraction_index_Peck1972 | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_nan_air_refraction_index_Peck1972(self) -> None:
"""
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Peck1972`
definition nan support.
"""
air_refraction_index_Peck1972(
np.array([-1.0, 0.0, 1.0, -np.inf, np.inf, np.nan])
) |
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Peck1972`
definition nan support.
| test_nan_air_refraction_index_Peck1972 | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_air_refraction_index_Bodhaine1999(self) -> None:
"""
Test :func:`colour.phenomena.rayleigh.\
air_refraction_index_Bodhaine1999` definition.
"""
np.testing.assert_allclose(
air_refraction_index_Bodhaine1999(0.360),
1.000285310285056,
atol=TOLE... |
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Bodhaine1999` definition.
| test_air_refraction_index_Bodhaine1999 | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_n_dimensional_air_refraction_index_Bodhaine1999(self) -> None:
"""
Test :func:`colour.phenomena.rayleigh.\
air_refraction_index_Bodhaine1999` definition n-dimensional arrays support.
"""
wl = 0.360
n = air_refraction_index_Bodhaine1999(wl)
wl = np.tile(wl, 6)
... |
Test :func:`colour.phenomena.rayleigh.air_refraction_index_Bodhaine1999` definition n-dimensional arrays support.
| test_n_dimensional_air_refraction_index_Bodhaine1999 | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_N2_depolarisation(self) -> None:
"""Test :func:`colour.phenomena.rayleigh.N2_depolarisation` definition."""
np.testing.assert_allclose(
N2_depolarisation(0.360),
1.036445987654321,
atol=TOLERANCE_ABSOLUTE_TESTS,
)
np.testing.assert_allclose(... | Test :func:`colour.phenomena.rayleigh.N2_depolarisation` definition. | test_N2_depolarisation | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_n_dimensional_N2_depolarisation(self) -> None:
"""
Test :func:`colour.phenomena.rayleigh.N2_depolarisation`
definition n-dimensional arrays support.
"""
wl = 0.360
n = N2_depolarisation(wl)
wl = np.tile(wl, 6)
n = np.tile(n, 6)
np.testin... |
Test :func:`colour.phenomena.rayleigh.N2_depolarisation`
definition n-dimensional arrays support.
| test_n_dimensional_N2_depolarisation | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_O2_depolarisation(self) -> None:
"""Test :func:`colour.phenomena.rayleigh.O2_depolarisation` definition."""
np.testing.assert_allclose(
O2_depolarisation(0.360),
1.115307746532541,
atol=TOLERANCE_ABSOLUTE_TESTS,
)
np.testing.assert_allclose(... | Test :func:`colour.phenomena.rayleigh.O2_depolarisation` definition. | test_O2_depolarisation | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
def test_n_dimensional_O2_depolarisation(self) -> None:
"""
Test :func:`colour.phenomena.rayleigh.O2_depolarisation` definition
n-dimensional arrays support.
"""
wl = 0.360
n = O2_depolarisation(wl)
wl = np.tile(wl, 6)
n = np.tile(n, 6)
np.testin... |
Test :func:`colour.phenomena.rayleigh.O2_depolarisation` definition
n-dimensional arrays support.
| test_n_dimensional_O2_depolarisation | python | colour-science/colour | colour/phenomena/tests/test_rayleigh.py | https://github.com/colour-science/colour/blob/master/colour/phenomena/tests/test_rayleigh.py | BSD-3-Clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.