diff --git a/colour/algebra/coordinates/tests/test_transformations.py b/colour/algebra/coordinates/tests/test_transformations.py index 7baea7ce0b..45b0f5d2a9 100644 --- a/colour/algebra/coordinates/tests/test_transformations.py +++ b/colour/algebra/coordinates/tests/test_transformations.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.algebra.coordinates.transformations` module. """ diff --git a/colour/algebra/tests/test_interpolation.py b/colour/algebra/tests/test_interpolation.py index 572a2976ea..9381b57ce0 100644 --- a/colour/algebra/tests/test_interpolation.py +++ b/colour/algebra/tests/test_interpolation.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.algebra.interpolation` module. +Define the unit tests for the :mod:`colour.algebra.interpolation` module. References ---------- diff --git a/colour/algebra/tests/test_prng.py b/colour/algebra/tests/test_prng.py index a3c6e8d152..8ffe85b5d6 100644 --- a/colour/algebra/tests/test_prng.py +++ b/colour/algebra/tests/test_prng.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.algebra.prng` module. +Define the unit tests for the :mod:`colour.algebra.prng` module. References ---------- diff --git a/colour/biochemistry/tests/test_michaelis_menten.py b/colour/biochemistry/tests/test_michaelis_menten.py index 2f1bf7ac0f..c594f33bf3 100644 --- a/colour/biochemistry/tests/test_michaelis_menten.py +++ b/colour/biochemistry/tests/test_michaelis_menten.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.biochemistry.michaelis_menten` +Define the unit tests for the :mod:`colour.biochemistry.michaelis_menten` module. """ diff --git a/colour/characterisation/tests/test_correction.py b/colour/characterisation/tests/test_correction.py index 7b32ff60d0..d034262a1e 100644 --- a/colour/characterisation/tests/test_correction.py +++ b/colour/characterisation/tests/test_correction.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.characterisation.correction` +Define the unit tests for the :mod:`colour.characterisation.correction` module. """ diff --git a/colour/colorimetry/tests/test_transformations.py b/colour/colorimetry/tests/test_transformations.py index 584b3cdd39..18bb54c80d 100644 --- a/colour/colorimetry/tests/test_transformations.py +++ b/colour/colorimetry/tests/test_transformations.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.colorimetry.transformations` +Define the unit tests for the :mod:`colour.colorimetry.transformations` module. """ diff --git a/colour/colorimetry/tests/test_tristimulus_values.py b/colour/colorimetry/tests/test_tristimulus_values.py index 7ced95b854..80bcbb5392 100644 --- a/colour/colorimetry/tests/test_tristimulus_values.py +++ b/colour/colorimetry/tests/test_tristimulus_values.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.colorimetry.tristimulus_values` +Define the unit tests for the :mod:`colour.colorimetry.tristimulus_values` module. References diff --git a/colour/difference/tests/test_delta_e.py b/colour/difference/tests/test_delta_e.py index 26aee34132..bf5a779a08 100644 --- a/colour/difference/tests/test_delta_e.py +++ b/colour/difference/tests/test_delta_e.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.difference.delta_e` module. +Define the unit tests for the :mod:`colour.difference.delta_e` module. References ---------- diff --git a/colour/models/rgb/transfer_functions/filmic_pro.py b/colour/models/rgb/transfer_functions/filmic_pro.py index c56e569b24..e1e42bf1a4 100644 --- a/colour/models/rgb/transfer_functions/filmic_pro.py +++ b/colour/models/rgb/transfer_functions/filmic_pro.py @@ -94,7 +94,7 @@ def log_encoding_FilmicPro6(t: FloatingOrArrayLike) -> FloatingOrNDArray: return as_float(from_range_1(y)) -_LOG_DECODING_FILMICPRO_INTERPOLATOR_CACHE: Optional[Extrapolator] = None +_CACHE_LOG_DECODING_FILMICPRO_INTERPOLATOR: Optional[Extrapolator] = None def _log_decoding_FilmicPro6_interpolator() -> Extrapolator: @@ -109,15 +109,15 @@ def _log_decoding_FilmicPro6_interpolator() -> Extrapolator: function interpolator. """ - global _LOG_DECODING_FILMICPRO_INTERPOLATOR_CACHE + global _CACHE_LOG_DECODING_FILMICPRO_INTERPOLATOR t = np.arange(0, 1, 0.0001) - if _LOG_DECODING_FILMICPRO_INTERPOLATOR_CACHE is None: - _LOG_DECODING_FILMICPRO_INTERPOLATOR_CACHE = Extrapolator( + if _CACHE_LOG_DECODING_FILMICPRO_INTERPOLATOR is None: + _CACHE_LOG_DECODING_FILMICPRO_INTERPOLATOR = Extrapolator( LinearInterpolator(log_encoding_FilmicPro6(t), t) ) - return _LOG_DECODING_FILMICPRO_INTERPOLATOR_CACHE + return _CACHE_LOG_DECODING_FILMICPRO_INTERPOLATOR def log_decoding_FilmicPro6(y: FloatingOrArrayLike) -> FloatingOrNDArray: diff --git a/colour/models/rgb/transfer_functions/filmlight_tlog.py b/colour/models/rgb/transfer_functions/filmlight_tlog.py index a8f49bb611..1bc2721db6 100644 --- a/colour/models/rgb/transfer_functions/filmlight_tlog.py +++ b/colour/models/rgb/transfer_functions/filmlight_tlog.py @@ -108,13 +108,13 @@ def log_encoding_FilmLightTLog( x = to_domain_1(x) - b = 1.0 / (0.7107 + 1.2359 * np.log(w * g)) - gs = g / (1.0 - o) + b = 1 / (0.7107 + 1.2359 * np.log(w * g)) + gs = g / (1 - o) C = b / gs - a = 1.0 - b * np.log(w + C) + a = 1 - b * np.log(w + C) y0 = a + b * np.log(C) - s = (1.0 - o) / (1.0 - y0) - A = 1.0 + (a - 1.0) * s + s = (1 - o) / (1 - y0) + A = 1 + (a - 1) * s B = b * s G = gs * s @@ -202,13 +202,13 @@ def log_decoding_FilmLightTLog( t = to_domain_1(t) - b = 1.0 / (0.7107 + 1.2359 * np.log(w * g)) - gs = g / (1.0 - o) + b = 1 / (0.7107 + 1.2359 * np.log(w * g)) + gs = g / (1 - o) C = b / gs - a = 1.0 - b * np.log(w + C) + a = 1 - b * np.log(w + C) y0 = a + b * np.log(C) - s = (1.0 - o) / (1.0 - y0) - A = 1.0 + (a - 1.0) * s + s = (1 - o) / (1 - y0) + A = 1 + (a - 1) * s B = b * s G = gs * s diff --git a/colour/models/rgb/transfer_functions/tests/test__init__.py b/colour/models/rgb/transfer_functions/tests/test__init__.py index 9243bf3a37..41d5459888 100644 --- a/colour/models/rgb/transfer_functions/tests/test__init__.py +++ b/colour/models/rgb/transfer_functions/tests/test__init__.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.common` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_aces.py b/colour/models/rgb/transfer_functions/tests/test_aces.py index e40647d8b9..4ac1ce8d70 100644 --- a/colour/models/rgb/transfer_functions/tests/test_aces.py +++ b/colour/models/rgb/transfer_functions/tests/test_aces.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.models.rgb.transfer_functions.aces` +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.aces` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_arib_std_b67.py b/colour/models/rgb/transfer_functions/tests/test_arib_std_b67.py index 69af7c5fde..3bafc41fd4 100644 --- a/colour/models/rgb/transfer_functions/tests/test_arib_std_b67.py +++ b/colour/models/rgb/transfer_functions/tests/test_arib_std_b67.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.arib_std_b67` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_arri_alexa_log_c.py b/colour/models/rgb/transfer_functions/tests/test_arri_alexa_log_c.py index aa5b86fa09..86db79e695 100644 --- a/colour/models/rgb/transfer_functions/tests/test_arri_alexa_log_c.py +++ b/colour/models/rgb/transfer_functions/tests/test_arri_alexa_log_c.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.arri_alexa_log_c` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_blackmagic_design.py b/colour/models/rgb/transfer_functions/tests/test_blackmagic_design.py index 78a6bd3095..959824f471 100644 --- a/colour/models/rgb/transfer_functions/tests/test_blackmagic_design.py +++ b/colour/models/rgb/transfer_functions/tests/test_blackmagic_design.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ blackmagic_design` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_canon_log.py b/colour/models/rgb/transfer_functions/tests/test_canon_log.py index aa928e11ba..5f61e42bdf 100644 --- a/colour/models/rgb/transfer_functions/tests/test_canon_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_canon_log.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.canon_log` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_cineon.py b/colour/models/rgb/transfer_functions/tests/test_cineon.py index a8920b8e54..398fd8573e 100644 --- a/colour/models/rgb/transfer_functions/tests/test_cineon.py +++ b/colour/models/rgb/transfer_functions/tests/test_cineon.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.cineon` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_common.py b/colour/models/rgb/transfer_functions/tests/test_common.py index 1fc07d6951..07bc872ba3 100644 --- a/colour/models/rgb/transfer_functions/tests/test_common.py +++ b/colour/models/rgb/transfer_functions/tests/test_common.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.common` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_davinci_intermediate.py b/colour/models/rgb/transfer_functions/tests/test_davinci_intermediate.py index 26814a2a18..f33c90d26e 100644 --- a/colour/models/rgb/transfer_functions/tests/test_davinci_intermediate.py +++ b/colour/models/rgb/transfer_functions/tests/test_davinci_intermediate.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ davinci_intermediate` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_dcdm.py b/colour/models/rgb/transfer_functions/tests/test_dcdm.py index 3ff42bdaff..8d745a110c 100644 --- a/colour/models/rgb/transfer_functions/tests/test_dcdm.py +++ b/colour/models/rgb/transfer_functions/tests/test_dcdm.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.models.rgb.transfer_functions.dcdm` +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.dcdm` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_dicom_gsdf.py b/colour/models/rgb/transfer_functions/tests/test_dicom_gsdf.py index 23051a0256..7a23588f4b 100644 --- a/colour/models/rgb/transfer_functions/tests/test_dicom_gsdf.py +++ b/colour/models/rgb/transfer_functions/tests/test_dicom_gsdf.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.dicom_gsdf` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_dji_dlog.py b/colour/models/rgb/transfer_functions/tests/test_dji_dlog.py index 65da83cf13..ae5e32d754 100644 --- a/colour/models/rgb/transfer_functions/tests/test_dji_dlog.py +++ b/colour/models/rgb/transfer_functions/tests/test_dji_dlog.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ dji_dlog` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_exponent.py b/colour/models/rgb/transfer_functions/tests/test_exponent.py index cca8b36402..cba498ced7 100644 --- a/colour/models/rgb/transfer_functions/tests/test_exponent.py +++ b/colour/models/rgb/transfer_functions/tests/test_exponent.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.exponent` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_filmic_pro.py b/colour/models/rgb/transfer_functions/tests/test_filmic_pro.py index 92c765b6d1..ef009054d5 100644 --- a/colour/models/rgb/transfer_functions/tests/test_filmic_pro.py +++ b/colour/models/rgb/transfer_functions/tests/test_filmic_pro.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.filmic_pro` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_filmlight_tlog.py b/colour/models/rgb/transfer_functions/tests/test_filmlight_tlog.py index e9875a6965..5a75b0b58b 100644 --- a/colour/models/rgb/transfer_functions/tests/test_filmlight_tlog.py +++ b/colour/models/rgb/transfer_functions/tests/test_filmlight_tlog.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ filmlight_tlog` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_fujifilm_flog.py b/colour/models/rgb/transfer_functions/tests/test_fujifilm_flog.py index 094c7cb3d7..1ecd2fac6f 100644 --- a/colour/models/rgb/transfer_functions/tests/test_fujifilm_flog.py +++ b/colour/models/rgb/transfer_functions/tests/test_fujifilm_flog.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ fujifilm_flog` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_gamma.py b/colour/models/rgb/transfer_functions/tests/test_gamma.py index e7c0ec1011..d142768b00 100644 --- a/colour/models/rgb/transfer_functions/tests/test_gamma.py +++ b/colour/models/rgb/transfer_functions/tests/test_gamma.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.gamma` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_gopro.py b/colour/models/rgb/transfer_functions/tests/test_gopro.py index 0dd5c8f925..2b8645bc4a 100644 --- a/colour/models/rgb/transfer_functions/tests/test_gopro.py +++ b/colour/models/rgb/transfer_functions/tests/test_gopro.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.gopro` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_itur_bt_1886.py b/colour/models/rgb/transfer_functions/tests/test_itur_bt_1886.py index 542118877e..4b8417314b 100644 --- a/colour/models/rgb/transfer_functions/tests/test_itur_bt_1886.py +++ b/colour/models/rgb/transfer_functions/tests/test_itur_bt_1886.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.itur_bt_1886` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_itur_bt_2020.py b/colour/models/rgb/transfer_functions/tests/test_itur_bt_2020.py index f292e98a5c..12acc04e3b 100644 --- a/colour/models/rgb/transfer_functions/tests/test_itur_bt_2020.py +++ b/colour/models/rgb/transfer_functions/tests/test_itur_bt_2020.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.itur_bt_2020` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_itur_bt_2100.py b/colour/models/rgb/transfer_functions/tests/test_itur_bt_2100.py index ecdf6841e0..dc40ba3ee6 100644 --- a/colour/models/rgb/transfer_functions/tests/test_itur_bt_2100.py +++ b/colour/models/rgb/transfer_functions/tests/test_itur_bt_2100.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.itur_bt_2100` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_itur_bt_601.py b/colour/models/rgb/transfer_functions/tests/test_itur_bt_601.py index d9a071a22a..14cecde576 100644 --- a/colour/models/rgb/transfer_functions/tests/test_itur_bt_601.py +++ b/colour/models/rgb/transfer_functions/tests/test_itur_bt_601.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.itur_bt_601` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_itur_bt_709.py b/colour/models/rgb/transfer_functions/tests/test_itur_bt_709.py index c34d4ea0f1..77f3874b58 100644 --- a/colour/models/rgb/transfer_functions/tests/test_itur_bt_709.py +++ b/colour/models/rgb/transfer_functions/tests/test_itur_bt_709.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.itur_bt_709` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_linear.py b/colour/models/rgb/transfer_functions/tests/test_linear.py index 7cb839997f..7309e2741b 100644 --- a/colour/models/rgb/transfer_functions/tests/test_linear.py +++ b/colour/models/rgb/transfer_functions/tests/test_linear.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.linear` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_log.py b/colour/models/rgb/transfer_functions/tests/test_log.py index 6e1b1e7e3a..34d6374883 100644 --- a/colour/models/rgb/transfer_functions/tests/test_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_log.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.log` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_nikon_nlog.py b/colour/models/rgb/transfer_functions/tests/test_nikon_nlog.py index 5bb913d749..7f6999a077 100644 --- a/colour/models/rgb/transfer_functions/tests/test_nikon_nlog.py +++ b/colour/models/rgb/transfer_functions/tests/test_nikon_nlog.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ nikon_nlog` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_panalog.py b/colour/models/rgb/transfer_functions/tests/test_panalog.py index ea876702cf..4554b1b2cb 100644 --- a/colour/models/rgb/transfer_functions/tests/test_panalog.py +++ b/colour/models/rgb/transfer_functions/tests/test_panalog.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.panalog` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_panasonic_vlog.py b/colour/models/rgb/transfer_functions/tests/test_panasonic_vlog.py index 5f9a5e477f..af2a69a0f7 100644 --- a/colour/models/rgb/transfer_functions/tests/test_panasonic_vlog.py +++ b/colour/models/rgb/transfer_functions/tests/test_panasonic_vlog.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ panasonic_vlog` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_pivoted_log.py b/colour/models/rgb/transfer_functions/tests/test_pivoted_log.py index b135443b0d..a33395f219 100644 --- a/colour/models/rgb/transfer_functions/tests/test_pivoted_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_pivoted_log.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.\ pivoted_log` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_red_log.py b/colour/models/rgb/transfer_functions/tests/test_red_log.py index 714395e9f1..5353d6e13c 100644 --- a/colour/models/rgb/transfer_functions/tests/test_red_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_red_log.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.red_log` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_rimm_romm_rgb.py b/colour/models/rgb/transfer_functions/tests/test_rimm_romm_rgb.py index 63962e4a0b..e062c559ea 100644 --- a/colour/models/rgb/transfer_functions/tests/test_rimm_romm_rgb.py +++ b/colour/models/rgb/transfer_functions/tests/test_rimm_romm_rgb.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.rimm_romm_rgb` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_smpte_240m.py b/colour/models/rgb/transfer_functions/tests/test_smpte_240m.py index ba60c4188e..5c51063c1c 100644 --- a/colour/models/rgb/transfer_functions/tests/test_smpte_240m.py +++ b/colour/models/rgb/transfer_functions/tests/test_smpte_240m.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.smpte_240m` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_sony_slog.py b/colour/models/rgb/transfer_functions/tests/test_sony_slog.py index 1806879158..49f16ac816 100644 --- a/colour/models/rgb/transfer_functions/tests/test_sony_slog.py +++ b/colour/models/rgb/transfer_functions/tests/test_sony_slog.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.sony_slog` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_srgb.py b/colour/models/rgb/transfer_functions/tests/test_srgb.py index 55b1498dda..d340da7763 100644 --- a/colour/models/rgb/transfer_functions/tests/test_srgb.py +++ b/colour/models/rgb/transfer_functions/tests/test_srgb.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.models.rgb.transfer_functions.sRGB` +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.sRGB` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_st_2084.py b/colour/models/rgb/transfer_functions/tests/test_st_2084.py index 04fb2e757a..3aeb675198 100644 --- a/colour/models/rgb/transfer_functions/tests/test_st_2084.py +++ b/colour/models/rgb/transfer_functions/tests/test_st_2084.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.st_2084` module. """ diff --git a/colour/models/rgb/transfer_functions/tests/test_viper_log.py b/colour/models/rgb/transfer_functions/tests/test_viper_log.py index a4f557a5ce..23ef703f81 100644 --- a/colour/models/rgb/transfer_functions/tests/test_viper_log.py +++ b/colour/models/rgb/transfer_functions/tests/test_viper_log.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the +Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.viper_log` module. """ diff --git a/colour/notation/datasets/munsell/__init__.py b/colour/notation/datasets/munsell/__init__.py index 2195aafc36..7b6d5b9ffd 100644 --- a/colour/notation/datasets/munsell/__init__.py +++ b/colour/notation/datasets/munsell/__init__.py @@ -21,7 +21,7 @@ } ) MUNSELL_COLOURS.__doc__ = """ -Defines the *Munsell Renotation System* datasets. +Define the *Munsell Renotation System* datasets. - ``Munsell Colours All``: *all* published *Munsell* colours, including the extrapolated colors. diff --git a/colour/notation/munsell.py b/colour/notation/munsell.py index c092e49383..9d182f52c9 100644 --- a/colour/notation/munsell.py +++ b/colour/notation/munsell.py @@ -262,17 +262,17 @@ "CIE 1931 2 Degree Standard Observer" ][ILLUMINANT_NAME_MUNSELL] -_MUNSELL_SPECIFICATIONS_CACHE: Dict = CACHE_REGISTRY.register_cache( - f"{__name__}._MUNSELL_SPECIFICATIONS_CACHE" +_CACHE_MUNSELL_SPECIFICATIONS: Dict = CACHE_REGISTRY.register_cache( + f"{__name__}._CACHE_MUNSELL_SPECIFICATIONS" ) -_MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR_CACHE: Dict = ( +_CACHE_MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR: Dict = ( CACHE_REGISTRY.register_cache( - f"{__name__}._MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR_CACHE" + f"{__name__}._CACHE_MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR" ) ) -_MUNSELL_MAXIMUM_CHROMAS_FROM_RENOTATION_CACHE: Dict = ( +_CACHE_MUNSELL_MAXIMUM_CHROMAS_FROM_RENOTATION: Dict = ( CACHE_REGISTRY.register_cache( - f"{__name__}._MUNSELL_MAXIMUM_CHROMAS_FROM_RENOTATION_CACHE" + f"{__name__}._CACHE_MUNSELL_MAXIMUM_CHROMAS_FROM_RENOTATION" ) ) @@ -304,10 +304,10 @@ def _munsell_specifications() -> NDArray: *Munsell Renotation System* specifications. """ - global _MUNSELL_SPECIFICATIONS_CACHE + global _CACHE_MUNSELL_SPECIFICATIONS - if "All" in _MUNSELL_SPECIFICATIONS_CACHE: - return _MUNSELL_SPECIFICATIONS_CACHE["All"] + if "All" in _CACHE_MUNSELL_SPECIFICATIONS: + return _CACHE_MUNSELL_SPECIFICATIONS["All"] munsell_specifications = np.array( [ @@ -318,7 +318,7 @@ def _munsell_specifications() -> NDArray: ] ) - _MUNSELL_SPECIFICATIONS_CACHE["All"] = munsell_specifications + _CACHE_MUNSELL_SPECIFICATIONS["All"] = munsell_specifications return munsell_specifications @@ -334,12 +334,12 @@ def _munsell_value_ASTMD1535_interpolator() -> Extrapolator: *Munsell* value interpolator for *ASTM D1535-08e1* method. """ - global _MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR_CACHE + global _CACHE_MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR if "ASTM D1535-08 Interpolator" in ( - _MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR_CACHE + _CACHE_MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR ): - return _MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR_CACHE[ + return _CACHE_MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR[ "ASTM D1535-08 Interpolator" ] @@ -349,7 +349,7 @@ def _munsell_value_ASTMD1535_interpolator() -> Extrapolator: ) extrapolator = Extrapolator(interpolator) - _MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR_CACHE[ + _CACHE_MUNSELL_VALUE_ASTM_D1535_08_INTERPOLATOR[ "ASTM D1535-08 Interpolator" ] = extrapolator @@ -369,12 +369,12 @@ def _munsell_maximum_chromas_from_renotation() -> Tuple[ Maximum *Munsell* chromas. """ - global _MUNSELL_MAXIMUM_CHROMAS_FROM_RENOTATION_CACHE + global _CACHE_MUNSELL_MAXIMUM_CHROMAS_FROM_RENOTATION if "Maximum Chromas From Renotation" in ( - _MUNSELL_MAXIMUM_CHROMAS_FROM_RENOTATION_CACHE + _CACHE_MUNSELL_MAXIMUM_CHROMAS_FROM_RENOTATION ): - return _MUNSELL_MAXIMUM_CHROMAS_FROM_RENOTATION_CACHE[ + return _CACHE_MUNSELL_MAXIMUM_CHROMAS_FROM_RENOTATION[ "Maximum Chromas From Renotation" ] @@ -395,7 +395,7 @@ def _munsell_maximum_chromas_from_renotation() -> Tuple[ zip(chromas.keys(), chromas.values()) ) - _MUNSELL_MAXIMUM_CHROMAS_FROM_RENOTATION_CACHE[ + _CACHE_MUNSELL_MAXIMUM_CHROMAS_FROM_RENOTATION[ "Maximum Chromas From Renotation" ] = maximum_chromas_from_renotation diff --git a/colour/quality/tests/test_cfi2017.py b/colour/quality/tests/test_cfi2017.py index 5181c115f4..efd9aaa787 100644 --- a/colour/quality/tests/test_cfi2017.py +++ b/colour/quality/tests/test_cfi2017.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.quality.CIE2017` module. +Define the unit tests for the :mod:`colour.quality.CIE2017` module. Notes ----- diff --git a/colour/quality/tests/test_tm3018.py b/colour/quality/tests/test_tm3018.py index b836019f11..80ab40d48f 100644 --- a/colour/quality/tests/test_tm3018.py +++ b/colour/quality/tests/test_tm3018.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.quality.tm3018` module. +Define the unit tests for the :mod:`colour.quality.tm3018` module. Notes ----- diff --git a/colour/recovery/smits1999.py b/colour/recovery/smits1999.py index ac45ea17b2..32751850ee 100644 --- a/colour/recovery/smits1999.py +++ b/colour/recovery/smits1999.py @@ -147,41 +147,41 @@ def RGB_to_sd_Smits1999(RGB: ArrayLike) -> SpectralDistribution: array([ 0.1894770..., 0.1126470..., 0.0474420...]) """ - white_sd = SDS_SMITS1999["white"].copy() - cyan_sd = SDS_SMITS1999["cyan"].copy() - magenta_sd = SDS_SMITS1999["magenta"].copy() - yellow_sd = SDS_SMITS1999["yellow"].copy() - red_sd = SDS_SMITS1999["red"].copy() - green_sd = SDS_SMITS1999["green"].copy() - blue_sd = SDS_SMITS1999["blue"].copy() + sd_white = SDS_SMITS1999["white"].copy() + sd_cyan = SDS_SMITS1999["cyan"].copy() + sd_magenta = SDS_SMITS1999["magenta"].copy() + sd_yellow = SDS_SMITS1999["yellow"].copy() + sd_red = SDS_SMITS1999["red"].copy() + sd_green = SDS_SMITS1999["green"].copy() + sd_blue = SDS_SMITS1999["blue"].copy() R, G, B = to_domain_1(RGB) - sd = white_sd.copy() * 0 + sd = sd_white.copy() * 0 sd.name = f"Smits (1999) - {RGB!r}" if R <= G and R <= B: - sd += white_sd * R + sd += sd_white * R if G <= B: - sd += cyan_sd * (G - R) - sd += blue_sd * (B - G) + sd += sd_cyan * (G - R) + sd += sd_blue * (B - G) else: - sd += cyan_sd * (B - R) - sd += green_sd * (G - B) + sd += sd_cyan * (B - R) + sd += sd_green * (G - B) elif G <= R and G <= B: - sd += white_sd * G + sd += sd_white * G if R <= B: - sd += magenta_sd * (R - G) - sd += blue_sd * (B - R) + sd += sd_magenta * (R - G) + sd += sd_blue * (B - R) else: - sd += magenta_sd * (B - G) - sd += red_sd * (R - B) + sd += sd_magenta * (B - G) + sd += sd_red * (R - B) else: - sd += white_sd * B + sd += sd_white * B if R <= G: - sd += yellow_sd * (R - B) - sd += green_sd * (G - R) + sd += sd_yellow * (R - B) + sd += sd_green * (G - R) else: - sd += yellow_sd * (G - B) - sd += red_sd * (R - G) + sd += sd_yellow * (G - B) + sd += sd_red * (R - G) return sd diff --git a/colour/utilities/__init__.py b/colour/utilities/__init__.py index 22a0082902..6dcefd2e52 100644 --- a/colour/utilities/__init__.py +++ b/colour/utilities/__init__.py @@ -287,7 +287,7 @@ def __getattr__(self, attribute) -> Any: ], } """ -Defines the *colour.utilities* sub-package API changes. +Define the *colour.utilities* sub-package API changes. API_CHANGES """ diff --git a/colour/volume/tests/test_rgb.py b/colour/volume/tests/test_rgb.py index c19173abef..d157f9444d 100644 --- a/colour/volume/tests/test_rgb.py +++ b/colour/volume/tests/test_rgb.py @@ -1,5 +1,5 @@ """ -Defines the unit tests for the :mod:`colour.volume.rgb` module. +Define the unit tests for the :mod:`colour.volume.rgb` module. Notes -----