From 7054cceb1331d29ededa36270385435144dd744e Mon Sep 17 00:00:00 2001 From: Thomas Mansencal Date: Sun, 9 Jun 2024 20:56:11 +1200 Subject: [PATCH] Update various docstrings. --- colour_hdri/calibration/absolute_luminance.py | 2 +- colour_hdri/calibration/debevec1997.py | 2 +- colour_hdri/distortion/vignette.py | 2 +- colour_hdri/exposure/common.py | 2 +- colour_hdri/exposure/dsc.py | 2 +- colour_hdri/generation/hdri.py | 2 +- colour_hdri/generation/weighting_functions.py | 2 +- colour_hdri/models/datasets/dng.py | 2 +- colour_hdri/models/dng.py | 13 ++++++------- colour_hdri/models/rgb.py | 6 +++--- colour_hdri/plotting/hdri.py | 2 +- colour_hdri/plotting/tonemapping.py | 2 +- colour_hdri/process/dng.py | 2 +- colour_hdri/recovery/highlights.py | 2 +- colour_hdri/sampling/grossberg2003.py | 2 +- colour_hdri/sampling/variance_minimization.py | 2 +- .../tonemapping/global_operators/operators.py | 2 +- colour_hdri/utilities/common.py | 2 +- colour_hdri/utilities/image.py | 2 +- 19 files changed, 26 insertions(+), 27 deletions(-) diff --git a/colour_hdri/calibration/absolute_luminance.py b/colour_hdri/calibration/absolute_luminance.py index 5281a57..884dde9 100644 --- a/colour_hdri/calibration/absolute_luminance.py +++ b/colour_hdri/calibration/absolute_luminance.py @@ -2,7 +2,7 @@ Absolute Luminance Calibration - Lagarde (2016) =============================================== -Defines the *Lagarde (2016)* panoramic images absolute *Luminance* calibration +Define the *Lagarde (2016)* panoramic images absolute *Luminance* calibration objects: - :func:`colour_hdri.absolute_luminance_calibration_Lagarde2016` diff --git a/colour_hdri/calibration/debevec1997.py b/colour_hdri/calibration/debevec1997.py index 660c21e..c460c18 100644 --- a/colour_hdri/calibration/debevec1997.py +++ b/colour_hdri/calibration/debevec1997.py @@ -2,7 +2,7 @@ Debevec (1997) Camera Response Function Computation =================================================== -Defines the *Debevec (1997)* camera responses computation objects: +Define the *Debevec (1997)* camera responses computation objects: - :func:`colour_hdri.g_solve` - :func:`colour_hdri.camera_response_functions_Debevec1997` diff --git a/colour_hdri/distortion/vignette.py b/colour_hdri/distortion/vignette.py index 000e5d7..aa254f9 100644 --- a/colour_hdri/distortion/vignette.py +++ b/colour_hdri/distortion/vignette.py @@ -2,7 +2,7 @@ Lens Vignette Characterisation & Correction =========================================== -Defines various objects to correct camera lens vignette: +Define various objects to correct camera lens vignette: - :func:`colour_hdri.distortion.apply_radial_gradient` - :func:`colour_hdri.distortion.parabolic_2D_function` diff --git a/colour_hdri/exposure/common.py b/colour_hdri/exposure/common.py index 2abfe1b..abe8e06 100644 --- a/colour_hdri/exposure/common.py +++ b/colour_hdri/exposure/common.py @@ -2,7 +2,7 @@ Exposure Value Computation ========================== -Defines the exposure value computation objects: +Define the exposure value computation objects: - :func:`colour_hdri.average_luminance` - :func:`colour_hdri.average_illuminance` diff --git a/colour_hdri/exposure/dsc.py b/colour_hdri/exposure/dsc.py index 1ea46db..39345ee 100644 --- a/colour_hdri/exposure/dsc.py +++ b/colour_hdri/exposure/dsc.py @@ -2,7 +2,7 @@ Digital Still Camera Exposure ============================= -Defines various objects for modeling Digital Still Camera (DSC) exposure: +Define various objects for modeling Digital Still Camera (DSC) exposure: - :func:`colour_hdri.focal_plane_exposure` - :func:`colour_hdri.arithmetic_mean_focal_plane_exposure` diff --git a/colour_hdri/generation/hdri.py b/colour_hdri/generation/hdri.py index c2a290b..01c74d6 100644 --- a/colour_hdri/generation/hdri.py +++ b/colour_hdri/generation/hdri.py @@ -2,7 +2,7 @@ HDRI Generation =============== -Defines the HDRI generation objects: +Define the HDRI generation objects: - :func:`colour_hdri.image_stack_to_HDRI` diff --git a/colour_hdri/generation/weighting_functions.py b/colour_hdri/generation/weighting_functions.py index 479e416..6f9d64a 100644 --- a/colour_hdri/generation/weighting_functions.py +++ b/colour_hdri/generation/weighting_functions.py @@ -2,7 +2,7 @@ Weighting Functions =================== -Defines the weighting function objects used when generating HDRIs: +Define the weighting function objects used when generating HDRIs: - :func:`colour_hdri.normal_distribution_function` - :func:`colour_hdri.hat_function` diff --git a/colour_hdri/models/datasets/dng.py b/colour_hdri/models/datasets/dng.py index 436e0b4..05a2dee 100644 --- a/colour_hdri/models/datasets/dng.py +++ b/colour_hdri/models/datasets/dng.py @@ -2,7 +2,7 @@ Adobe DNG SDK Dataset ===================== -Defines various datasets objects for *Adobe DNG SDK*: +Define various datasets objects for *Adobe DNG SDK*: - :attr:`colour_hdri.models.datasets.dng.CCS_ILLUMINANT_ADOBEDNG` - :attr:`colour_hdri.models.datasets.dng.\ diff --git a/colour_hdri/models/dng.py b/colour_hdri/models/dng.py index 5b881f0..e38c55c 100644 --- a/colour_hdri/models/dng.py +++ b/colour_hdri/models/dng.py @@ -2,7 +2,7 @@ Adobe DNG SDK Colour Processing =============================== -Defines various objects implementing *Adobe DNG SDK* colour processing: +Define various objects implementing *Adobe DNG SDK* colour processing: - :func:`colour_hdri.xy_to_camera_neutral` - :func:`colour_hdri.camera_neutral_to_xy` @@ -115,7 +115,6 @@ from colour.algebra import ( is_identity, linear_conversion, - matrix_dot, vector_dot, ) from colour.constants import EPSILON @@ -526,7 +525,7 @@ def matrix_XYZ_to_camera_space( M_camera_calibration_2, ) - M_XYZ_to_camera_space = matrix_dot(matrix_dot(M_AB, M_CC), M_CM) + M_XYZ_to_camera_space = np.matmul(np.matmul(M_AB, M_CC), M_CM) return M_XYZ_to_camera_space @@ -675,7 +674,7 @@ def matrix_camera_space_to_XYZ( xy_to_XYZ(CCS_ILLUMINANT_ADOBEDNG), chromatic_adaptation_transform, ) - M_camera_space_to_XYZ = matrix_dot(M_CAT, M_camera_to_XYZ) + M_camera_space_to_XYZ = np.matmul(M_CAT, M_camera_to_XYZ) else: uv = UCS_to_uv(XYZ_to_UCS(xy_to_XYZ(xy))) CCT, _D_uv = uv_to_CCT_Robertson1968(uv) @@ -711,7 +710,7 @@ def matrix_camera_space_to_XYZ( M_AB = np.diagflat(analog_balance) M_reference_neutral = vector_dot( - np.linalg.inv(matrix_dot(M_AB, M_CC)), camera_neutral + np.linalg.inv(np.matmul(M_AB, M_CC)), camera_neutral ) M_D = np.linalg.inv(np.diagflat(M_reference_neutral)) M_FM = matrix_interpolated( @@ -721,8 +720,8 @@ def matrix_camera_space_to_XYZ( M_forward_matrix_1, M_forward_matrix_2, ) - M_camera_space_to_XYZ = matrix_dot( - matrix_dot(M_FM, M_D), np.linalg.inv(matrix_dot(M_AB, M_CC)) + M_camera_space_to_XYZ = np.matmul( + np.matmul(M_FM, M_D), np.linalg.inv(np.matmul(M_AB, M_CC)) ) return M_camera_space_to_XYZ diff --git a/colour_hdri/models/rgb.py b/colour_hdri/models/rgb.py index 9bfe180..fe7ea9a 100644 --- a/colour_hdri/models/rgb.py +++ b/colour_hdri/models/rgb.py @@ -2,7 +2,7 @@ RGB Colourspace & Transformations ================================= -Defines the following *RGB* colourspace transformations: +Define the following *RGB* colourspace transformations: - :func:`colour_hdri.camera_space_to_RGB` - :func:`colour_hdri.camera_space_to_sRGB` @@ -11,7 +11,7 @@ from __future__ import annotations import numpy as np -from colour.algebra import matrix_dot, vector_dot +from colour.algebra import vector_dot from colour.hints import ArrayLike, NDArrayFloat from colour.models import RGB_COLOURSPACES @@ -74,7 +74,7 @@ def camera_space_to_RGB( array([ 0.7564180..., 0.8683192..., 0.6044589...]) """ - M_RGB_camera = matrix_dot(M_XYZ_to_camera_space, matrix_RGB_to_XYZ) + M_RGB_camera = np.matmul(M_XYZ_to_camera_space, matrix_RGB_to_XYZ) M_RGB_camera /= np.transpose(np.sum(M_RGB_camera, axis=1)[None]) diff --git a/colour_hdri/plotting/hdri.py b/colour_hdri/plotting/hdri.py index 41dc11a..c7d8c4e 100644 --- a/colour_hdri/plotting/hdri.py +++ b/colour_hdri/plotting/hdri.py @@ -2,7 +2,7 @@ HDRI Plotting ============= -Defines the HDRI plotting objects: +Define the HDRI plotting objects: - :func:`colour_hdri.plotting.plot_HDRI_strip` """ diff --git a/colour_hdri/plotting/tonemapping.py b/colour_hdri/plotting/tonemapping.py index f1c3845..de36fd3 100644 --- a/colour_hdri/plotting/tonemapping.py +++ b/colour_hdri/plotting/tonemapping.py @@ -2,7 +2,7 @@ Tonemapping Operators Plotting ============================== -Defines the tonemapping operators plotting objects: +Define the tonemapping operators plotting objects: - :func:`colour_hdri.plotting.plot_tonemapping_operator_image` """ diff --git a/colour_hdri/process/dng.py b/colour_hdri/process/dng.py index 234e7ce..37bdaa3 100644 --- a/colour_hdri/process/dng.py +++ b/colour_hdri/process/dng.py @@ -2,7 +2,7 @@ Adobe DNG SDK Conversion Process ================================ -Defines various objects implementing raw conversion based on *Adobe DNG SDK* +Define various objects implementing raw conversion based on *Adobe DNG SDK* and *dcraw*: - :func:`colour_hdri.convert_raw_files_to_dng_files` diff --git a/colour_hdri/recovery/highlights.py b/colour_hdri/recovery/highlights.py index f3a7948..5b557ae 100644 --- a/colour_hdri/recovery/highlights.py +++ b/colour_hdri/recovery/highlights.py @@ -2,7 +2,7 @@ Clipped Highlights Recovery =========================== -Defines the clipped highlights recovery objects: +Define the clipped highlights recovery objects: - :func:`colour_hdri.highlights_recovery_blend` - :func:`colour_hdri.highlights_recovery_LCHab` diff --git a/colour_hdri/sampling/grossberg2003.py b/colour_hdri/sampling/grossberg2003.py index f92394a..4b30f77 100644 --- a/colour_hdri/sampling/grossberg2003.py +++ b/colour_hdri/sampling/grossberg2003.py @@ -2,7 +2,7 @@ Grossberg (2003) Histogram Based Image Sampling =============================================== -Defines the *Grossberg (2003)* histogram based image sampling objects: +Define the *Grossberg (2003)* histogram based image sampling objects: - :func:`colour_hdri.samples_Grossberg2003` diff --git a/colour_hdri/sampling/variance_minimization.py b/colour_hdri/sampling/variance_minimization.py index 9f5cec8..1b37050 100644 --- a/colour_hdri/sampling/variance_minimization.py +++ b/colour_hdri/sampling/variance_minimization.py @@ -2,7 +2,7 @@ Viriyothai (2009) Variance Minimization Light Probe Sampling ============================================================ -Defines the *Viriyothai (2009)* variance minimization light probe sampling +Define the *Viriyothai (2009)* variance minimization light probe sampling objects: - :func:`colour_hdri.\ diff --git a/colour_hdri/tonemapping/global_operators/operators.py b/colour_hdri/tonemapping/global_operators/operators.py index dfa2578..433d892 100644 --- a/colour_hdri/tonemapping/global_operators/operators.py +++ b/colour_hdri/tonemapping/global_operators/operators.py @@ -2,7 +2,7 @@ Global Tonemapping Operators ============================ -Defines the global tonemapping operators objects: +Define the global tonemapping operators objects: - :func:`colour_hdri.tonemapping_operator_simple` - :func:`colour_hdri.tonemapping_operator_normalisation` diff --git a/colour_hdri/utilities/common.py b/colour_hdri/utilities/common.py index 32aa012..b2d9a0e 100644 --- a/colour_hdri/utilities/common.py +++ b/colour_hdri/utilities/common.py @@ -2,7 +2,7 @@ Common Utilities ================ -Defines the common utilities objects that don't fall in any specific category. +Define the common utilities objects that don't fall in any specific category. """ from __future__ import annotations diff --git a/colour_hdri/utilities/image.py b/colour_hdri/utilities/image.py index 800106a..bc449ad 100644 --- a/colour_hdri/utilities/image.py +++ b/colour_hdri/utilities/image.py @@ -2,7 +2,7 @@ Image Data & Metadata Utilities =============================== -Defines various image data and metadata utilities classes: +Define various image data and metadata utilities classes: - :class:`colour_hdri.Metadata` - :class:`colour_hdri.Image`