Skip to content

Commit

Permalink
Merge branch 'feature/v0.4.5' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Jan 8, 2024
2 parents 0d73093 + 5eda5ff commit 5adf88b
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,22 @@ def test_log_encoding_AppleLogProfile(self):
log_encoding_AppleLogProfile` definition.
"""

self.assertAlmostEqual(
log_encoding_AppleLogProfile(0.0), 0.150476452300913, places=7
np.testing.assert_allclose(
log_encoding_AppleLogProfile(0.0),
0.150476452300913,
atol=TOLERANCE_ABSOLUTE_TESTS,
)

self.assertAlmostEqual(
log_encoding_AppleLogProfile(0.18), 0.488272458526868, places=7
np.testing.assert_allclose(
log_encoding_AppleLogProfile(0.18),
0.488272458526868,
atol=TOLERANCE_ABSOLUTE_TESTS,
)

self.assertAlmostEqual(
log_encoding_AppleLogProfile(1.0), 0.694552983055191, places=7
np.testing.assert_allclose(
log_encoding_AppleLogProfile(1.0),
0.694552983055191,
atol=TOLERANCE_ABSOLUTE_TESTS,
)

def test_n_dimensional_log_encoding_DLog(self):
Expand Down Expand Up @@ -120,16 +126,22 @@ def test_log_decoding_AppleLogProfile(self):
log_decoding_AppleLogProfile` definition.
"""

self.assertAlmostEqual(
log_decoding_AppleLogProfile(0.150476452300913), 0.0, places=7
np.testing.assert_allclose(
log_decoding_AppleLogProfile(0.150476452300913),
0.0,
atol=TOLERANCE_ABSOLUTE_TESTS,
)

self.assertAlmostEqual(
log_decoding_AppleLogProfile(0.488272458526868), 0.18, places=6
np.testing.assert_allclose(
log_decoding_AppleLogProfile(0.488272458526868),
0.18,
atol=TOLERANCE_ABSOLUTE_TESTS,
)

self.assertAlmostEqual(
log_decoding_AppleLogProfile(0.694552983055191), 1.0, places=6
np.testing.assert_allclose(
log_decoding_AppleLogProfile(0.694552983055191),
1.0,
atol=TOLERANCE_ABSOLUTE_TESTS,
)

def test_n_dimensional_log_decoding_DLog(self):
Expand Down
2 changes: 1 addition & 1 deletion colour/plotting/diagrams.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def plot_chromaticity_diagram_colours(
Parameters
----------
samples
Samples count on one axis when computing the *Chromaticity Diagram*
Sample count on one axis when computing the *Chromaticity Diagram*
colours.
diagram_colours
Colours of the *Chromaticity Diagram*, if ``diagram_colours`` is set
Expand Down
2 changes: 1 addition & 1 deletion colour/plotting/section.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def plot_hull_section_colours(
convert_kwargs
Keyword arguments for the :func:`colour.convert` definition.
samples
Samples count on one axis when computing the hull section colours.
Sample count on one axis when computing the hull section colours.
Other Parameters
----------------
Expand Down
16 changes: 8 additions & 8 deletions colour/quality/tests/test_cqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,35 @@ def test_colour_quality_scale(self):
np.testing.assert_allclose(
colour_quality_scale(SDS_ILLUMINANTS["FL1"]),
74.982585798279914,
atol=TOLERANCE_ABSOLUTE_TESTS,
atol=5e-5,
)

np.testing.assert_allclose(
colour_quality_scale(
SDS_ILLUMINANTS["FL1"], method="NIST CQS 7.4"
),
75.377089740493361,
atol=TOLERANCE_ABSOLUTE_TESTS,
atol=5e-5,
)

np.testing.assert_allclose(
colour_quality_scale(SDS_ILLUMINANTS["FL2"]),
64.111822015662852,
atol=TOLERANCE_ABSOLUTE_TESTS,
atol=5e-5,
)

np.testing.assert_allclose(
colour_quality_scale(
SDS_ILLUMINANTS["FL2"], method="NIST CQS 7.4"
),
64.774586908581369,
atol=TOLERANCE_ABSOLUTE_TESTS,
atol=5e-5,
)

np.testing.assert_allclose(
colour_quality_scale(SDS_LIGHT_SOURCES["Neodimium Incandescent"]),
89.737456186836681,
atol=TOLERANCE_ABSOLUTE_TESTS,
atol=5e-5,
)

np.testing.assert_allclose(
Expand All @@ -74,15 +74,15 @@ def test_colour_quality_scale(self):
method="NIST CQS 7.4",
),
87.700300087538821,
atol=TOLERANCE_ABSOLUTE_TESTS,
atol=5e-5,
)

np.testing.assert_allclose(
colour_quality_scale(
SDS_LIGHT_SOURCES["F32T8/TL841 (Triphosphor)"]
),
84.934928463428903,
atol=TOLERANCE_ABSOLUTE_TESTS,
atol=5e-5,
)

np.testing.assert_allclose(
Expand All @@ -91,7 +91,7 @@ def test_colour_quality_scale(self):
method="NIST CQS 7.4",
),
83.255457439460713,
atol=TOLERANCE_ABSOLUTE_TESTS,
atol=5e-5,
)

specification_r = ColourRendering_Specification_CQS(
Expand Down
2 changes: 1 addition & 1 deletion colour/recovery/jakob2019.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ def __init__(self) -> None:
def size(self) -> int:
"""
Getter property for the *Jakob and Hanika (2019)* interpolator
size, i.e. the samples count on one side of the 3D table.
size, i.e. the sample count on one side of the 3D table.
Returns
-------
Expand Down
14 changes: 7 additions & 7 deletions colour/volume/rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _wrapper_RGB_colourspace_volume_MonteCarlo(arguments: tuple) -> int:
Returns
-------
:class:`int`
Inside *RGB* colourspace volume samples count.
Inside *RGB* colourspace volume sample count.
"""

return sample_RGB_colourspace_volume_MonteCarlo(*arguments)
Expand Down Expand Up @@ -94,7 +94,7 @@ def sample_RGB_colourspace_volume_MonteCarlo(
colourspace
*RGB* colourspace to compute the volume of.
samples
Samples count.
Sample count.
limits
*CIE L\\*a\\*b\\** colourspace volume.
illuminant_Lab
Expand All @@ -111,7 +111,7 @@ def sample_RGB_colourspace_volume_MonteCarlo(
Returns
-------
:class:`int`
Within *RGB* colourspace volume samples count.
Within *RGB* colourspace volume sample count.
Notes
-----
Expand Down Expand Up @@ -222,7 +222,7 @@ def RGB_colourspace_volume_MonteCarlo(
colourspace\
*RGB* colourspace to compute the volume of.
samples\
Samples count.
Sample count.
limits\
*CIE L\\*a\\*b\\** colourspace volume.
illuminant_Lab\
Expand Down Expand Up @@ -307,7 +307,7 @@ def RGB_colourspace_volume_coverage_MonteCarlo(
coverage_sampler
Python object responsible for checking the volume coverage.
samples
Samples count.
Sample count.
random_generator
Random triplet generator providing the random samples.
random_state
Expand Down Expand Up @@ -363,7 +363,7 @@ def RGB_colourspace_pointer_gamut_coverage_MonteCarlo(
colourspace
*RGB* colourspace to compute the *Pointer's Gamut* coverage percentage.
samples
Samples count.
Sample count.
random_generator
Random triplet generator providing the random samples.
random_state
Expand Down Expand Up @@ -409,7 +409,7 @@ def RGB_colourspace_visible_spectrum_coverage_MonteCarlo(
colourspace
*RGB* colourspace to compute the visible spectrum coverage percentage.
samples
Samples count.
Sample count.
random_generator
Random triplet generator providing the random samples.
random_state
Expand Down

0 comments on commit 5adf88b

Please sign in to comment.