Skip to content

Commit

Permalink
Update various docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Jun 9, 2024
1 parent 2f6f20f commit 7054cce
Show file tree
Hide file tree
Showing 19 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion colour_hdri/calibration/absolute_luminance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/calibration/debevec1997.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/distortion/vignette.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/exposure/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/exposure/dsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/generation/hdri.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
HDRI Generation
===============
Defines the HDRI generation objects:
Define the HDRI generation objects:
- :func:`colour_hdri.image_stack_to_HDRI`
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/generation/weighting_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/models/datasets/dng.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.\
Expand Down
13 changes: 6 additions & 7 deletions colour_hdri/models/dng.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -115,7 +115,6 @@
from colour.algebra import (
is_identity,
linear_conversion,
matrix_dot,
vector_dot,
)
from colour.constants import EPSILON
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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(
Expand All @@ -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
6 changes: 3 additions & 3 deletions colour_hdri/models/rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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

Expand Down Expand Up @@ -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])

Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/plotting/hdri.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
HDRI Plotting
=============
Defines the HDRI plotting objects:
Define the HDRI plotting objects:
- :func:`colour_hdri.plotting.plot_HDRI_strip`
"""
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/plotting/tonemapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
"""
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/process/dng.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/recovery/highlights.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/sampling/grossberg2003.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/sampling/variance_minimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.\
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/tonemapping/global_operators/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/utilities/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion colour_hdri/utilities/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 7054cce

Please sign in to comment.