Skip to content

Commit

Permalink
Update various docstrings.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Oct 10, 2024
1 parent 4436d26 commit a08157c
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion colour/appearance/cam16.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def CAM16_to_XYZ(
*CAM16* colour appearance model specification. Correlate of
*Lightness* :math:`J`, correlate of *chroma* :math:`C` or correlate of
*colourfulness* :math:`M` and *hue* angle :math:`h` in degrees must be
specified, e.g. :math:`JCh` or :math:`JMh`.
specified, e.g., :math:`JCh` or :math:`JMh`.
XYZ_w
*CIE XYZ* tristimulus values of reference white.
L_A
Expand Down
2 changes: 1 addition & 1 deletion colour/appearance/ciecam02.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def CIECAM02_to_XYZ(
*CIECAM02* colour appearance model specification. Correlate of
*Lightness* :math:`J`, correlate of *chroma* :math:`C` or correlate of
*colourfulness* :math:`M` and *hue* angle :math:`h` in degrees must be
specified, e.g. :math:`JCh` or :math:`JMh`.
specified, e.g., :math:`JCh` or :math:`JMh`.
XYZ_w
*CIE XYZ* tristimulus values of reference white.
L_A
Expand Down
2 changes: 1 addition & 1 deletion colour/appearance/ciecam16.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def CIECAM16_to_XYZ(
*CIECAM16* colour appearance model specification. Correlate of
*Lightness* :math:`J`, correlate of *chroma* :math:`C` or correlate of
*colourfulness* :math:`M` and *hue* angle :math:`h` in degrees must be
specified, e.g. :math:`JCh` or :math:`JMh`.
specified, e.g., :math:`JCh` or :math:`JMh`.
XYZ_w
*CIE XYZ* tristimulus values of reference white.
L_A
Expand Down
2 changes: 1 addition & 1 deletion colour/appearance/hellwig2022.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ def Hellwig2022_to_XYZ(
*Hellwig and Fairchild (2022)* colour appearance model specification.
Correlate of *Lightness* :math:`J`, correlate of *chroma* :math:`C` or
correlate of *colourfulness* :math:`M` and *hue* angle :math:`h` in
degrees must be specified, e.g. :math:`JCh` or :math:`JMh`.
degrees must be specified, e.g., :math:`JCh` or :math:`JMh`.
XYZ_w
*CIE XYZ* tristimulus values of reference white.
L_A
Expand Down
2 changes: 1 addition & 1 deletion colour/appearance/kim2009.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def Kim2009_to_XYZ(
*Kim, Weyrich and Kautz (2009)* colour appearance model specification.
Correlate of *Lightness* :math:`J`, correlate of *chroma* :math:`C` or
correlate of *colourfulness* :math:`M` and *hue* angle :math:`h` in
degrees must be specified, e.g. :math:`JCh` or :math:`JMh`.
degrees must be specified, e.g., :math:`JCh` or :math:`JMh`.
XYZ_w
*CIE XYZ* tristimulus values of reference white.
L_A
Expand Down
2 changes: 1 addition & 1 deletion colour/appearance/zcam.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def ZCAM_to_XYZ(
*ZCAM* colour appearance model specification.
Correlate of *Lightness* :math:`J`, correlate of *chroma* :math:`C` or
correlate of *colourfulness* :math:`M` and *hue* angle :math:`h` in
degrees must be specified, e.g. :math:`JCh` or :math:`JMh`.
degrees must be specified, e.g., :math:`JCh` or :math:`JMh`.
XYZ_w
Absolute *CIE XYZ* tristimulus values of the white under reference
illuminant.
Expand Down
8 changes: 4 additions & 4 deletions colour/colorimetry/tristimulus_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def sd_to_XYZ_integration(
----------
sd
Spectral distribution, if an `ArrayLike` the wavelengths are
expected to be in the last axis, e.g. for a spectral array with
expected to be in the last axis, e.g., for a spectral array with
77 bins, ``sd`` shape could be (77, ) or (1, 77).
cmfs
Standard observer colour matching functions, default to the
Expand Down Expand Up @@ -1111,7 +1111,7 @@ def sd_to_XYZ(
----------
sd
Spectral distribution, if an `ArrayLike` and ``method`` is
*Integration* the wavelengths are expected to be in the last axis, e.g.
*Integration* the wavelengths are expected to be in the last axis, e.g.,
for a spectral array with 77 bins, ``sd`` shape could be (77, ) or
(1, 77).
cmfs
Expand Down Expand Up @@ -1298,7 +1298,7 @@ def msds_to_XYZ_integration(
----------
msds
Multi-spectral distributions, if an `ArrayLike` the wavelengths are
expected to be in the last axis, e.g. for a 512x384 multi-spectral
expected to be in the last axis, e.g., for a 512x384 multi-spectral
image with 77 bins, ``msds`` shape should be (384, 512, 77).
cmfs
Standard observer colour matching functions, default to the
Expand Down Expand Up @@ -1785,7 +1785,7 @@ def msds_to_XYZ(
----------
msds
Multi-spectral distributions, if an `ArrayLike` the wavelengths are
expected to be in the last axis, e.g. for a 512x384 multi-spectral
expected to be in the last axis, e.g., for a 512x384 multi-spectral
image with 77 bins, ``msds`` shape should be (384, 512, 77).
cmfs
Standard observer colour matching functions, default to the
Expand Down
8 changes: 4 additions & 4 deletions colour/io/ctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def ctl_render(
Other Parameters
----------------
args
Arguments passed to *ctlrender*, e.g. ``-verbose``, ``-force``.
Arguments passed to *ctlrender*, e.g., ``-verbose``, ``-force``.
kwargs
Keywords arguments passed to the sub-process calling *ctlrender*, e.g.
Keywords arguments passed to the sub-process calling *ctlrender*, e.g.,
to define the environment variables such as ``CTL_MODULE_PATH``.
Notes
Expand Down Expand Up @@ -221,9 +221,9 @@ def process_image_ctl(
Other Parameters
----------------
args
Arguments passed to *ctlrender*, e.g. ``-verbose``, ``-force``.
Arguments passed to *ctlrender*, e.g., ``-verbose``, ``-force``.
kwargs
Keywords arguments passed to the sub-process calling *ctlrender*, e.g.
Keywords arguments passed to the sub-process calling *ctlrender*, e.g.,
to define the environment variables such as ``CTL_MODULE_PATH``.
Notes
Expand Down
2 changes: 1 addition & 1 deletion colour/notation/datasets/munsell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*experimental.dat* and *real.dat* files features *CIE xyY* colourspace
values that are scaled by a :math:`1 / 0.975 \\simeq 1.02568` factor. If
you are performing conversions using *Munsell* *Colorlab* specification,
e.g. *2.5R 9/2*, according to *ASTM D1535-08e1* method, you should not
e.g., *2.5R 9/2*, according to *ASTM D1535-08e1* method, you should not
scale the output :math:`Y` Luminance. However, if you use directly the
*CIE xyY* colourspace values from the Munsell Renotation data, you should
scale the :math:`Y` Luminance before conversions by a :math:`0.975` factor.
Expand Down
2 changes: 1 addition & 1 deletion colour/notation/datasets/munsell/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*experimental.dat* and *real.dat* files features *CIE xyY* colourspace
values that are scaled by a :math:`1 / 0.975 \\simeq 1.02568` factor. If
you are performing conversions using *Munsell* *Colorlab* specification,
e.g. *2.5R 9/2*, according to *ASTM D1535-08e1* method, you should not
e.g., *2.5R 9/2*, according to *ASTM D1535-08e1* method, you should not
scale the output :math:`Y` Luminance. However, if you use directly the
*CIE xyY* colourspace values from the Munsell Renotation data, you should
scale the :math:`Y` Luminance before conversions by a :math:`0.975` factor.
Expand Down
2 changes: 1 addition & 1 deletion colour/notation/datasets/munsell/experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*experimental.dat* and *real.dat* files features *CIE xyY* colourspace
values that are scaled by a :math:`1 / 0.975 \\simeq 1.02568` factor. If
you are performing conversions using *Munsell* *Colorlab* specification,
e.g. *2.5R 9/2*, according to *ASTM D1535-08e1* method, you should not
e.g., *2.5R 9/2*, according to *ASTM D1535-08e1* method, you should not
scale the output :math:`Y` Luminance. However, if you use directly the
*CIE xyY* colourspace values from the Munsell Renotation data, you should
scale the :math:`Y` Luminance before conversions by a :math:`0.975` factor.
Expand Down
2 changes: 1 addition & 1 deletion colour/notation/datasets/munsell/real.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*experimental.dat* and *real.dat* files features *CIE xyY* colourspace
values that are scaled by a :math:`1 / 0.975 \\simeq 1.02568` factor. If
you are performing conversions using *Munsell* *Colorlab* specification,
e.g. *2.5R 9/2*, according to *ASTM D1535-08e1* method, you should not
e.g., *2.5R 9/2*, according to *ASTM D1535-08e1* method, you should not
scale the output :math:`Y` Luminance. However, if you use directly the
*CIE xyY* colourspace values from the Munsell Renotation data, you should
scale the :math:`Y` Luminance before conversions by a :math:`0.975` factor.
Expand Down
2 changes: 1 addition & 1 deletion colour/notation/munsell.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*experimental.dat* and *real.dat* files features *CIE xyY* colourspace values
that are scaled by a :math:`1 / 0.975 \\simeq 1.02568` factor. If you are
performing conversions using *Munsell* *Colorlab* specification,
e.g. *2.5R 9/2*, according to *ASTM D1535-08e1* method, you should not
e.g., *2.5R 9/2*, according to *ASTM D1535-08e1* method, you should not
scale the output :math:`Y` Luminance. However, if you use directly the
*CIE xyY* colourspace values from the Munsell Renotation data, you should
scale the :math:`Y` Luminance before conversions by a :math:`0.975` factor.
Expand Down
6 changes: 3 additions & 3 deletions colour/utilities/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ def get_domain_range_scale() -> Literal["ignore", "reference", "1", "100"] | str
available:
- **'Reference'**, the default *Colour* domain-range scale which varies
depending on the referenced algorithm, e.g. [0, 1], [0, 10], [0, 100],
depending on the referenced algorithm, e.g., [0, 1], [0, 10], [0, 100],
[0, 255], etc...
- **'1'**, a domain-range scale normalised to [0, 1], it is important to
acknowledge that this is a soft normalisation and it is possible to
Expand Down Expand Up @@ -958,7 +958,7 @@ def set_domain_range_scale(
available:
- **'Reference'**, the default *Colour* domain-range scale which varies
depending on the referenced algorithm, e.g. [0, 1], [0, 10], [0, 100],
depending on the referenced algorithm, e.g., [0, 1], [0, 10], [0, 100],
[0, 255], etc...
- **'1'**, a domain-range scale normalised to [0, 1], it is important to
acknowledge that this is a soft normalisation and it is possible to
Expand Down Expand Up @@ -993,7 +993,7 @@ class domain_range_scale:
The following scales are available:
- **'Reference'**, the default *Colour* domain-range scale which varies
depending on the referenced algorithm, e.g. [0, 1], [0, 10], [0, 100],
depending on the referenced algorithm, e.g., [0, 1], [0, 10], [0, 100],
[0, 255], etc...
- **'1'**, a domain-range scale normalised to [0, 1], it is important to
acknowledge that this is a soft normalisation and it is possible to
Expand Down
2 changes: 1 addition & 1 deletion colour/utilities/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def get_attribute(attribute: str) -> Any:
Parameters
----------
attribute
Attribute to retrieve, ``attribute`` must have a namespace module, e.g.
Attribute to retrieve, ``attribute`` must have a namespace module, e.g.,
*colour.models.oetf_inverse_BT2020*.
Returns
Expand Down
2 changes: 1 addition & 1 deletion colour/utilities/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def is_networkx_installed(raise_exception: bool = False) -> bool:
except ImportError as error: # pragma: no cover
if raise_exception:
raise ImportError(
'"NetworkX" related API features, e.g. the automatic colour '
'"NetworkX" related API features, e.g., the automatic colour '
f'conversion graph, are not available: "{error}".\nPlease refer '
"to the installation guide for more information: "
"https://www.colour-science.org/installation-guide/"
Expand Down
14 changes: 7 additions & 7 deletions docs/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,10 @@ setting the values of the data.
Getting the value(s) for a single (or multiple wavelengths) is done by indexing
the :class:`colour.SpectralDistribution` (or
:class:`colour.MultiSpectralDistributions`) class with the a single numeric
or array of numeric wavelengths, e.g. ``sd[555.5]`` or
or array of numeric wavelengths, e.g., ``sd[555.5]`` or
``sd[555.25, 555.25, 555.75]``.

However, if getting the values using a :class:`slice` class instance, e.g.
However, if getting the values using a :class:`slice` class instance, e.g.,
``sd[0:3]``, the underlying discrete values for the indexes represented by the
:class:`slice` class instance are returned instead.

Expand Down Expand Up @@ -360,7 +360,7 @@ However, slices will return the values for the corresponding wavelength

Indexing a multi-spectral distribution is achieved similarly, it can
however be sliced along multiple axes because the data is2-dimensional,
e.g. `msds[0:3, 0:2]`.
e.g., `msds[0:3, 0:2]`.

A *copy* of the underlying :class:`colour.SpectralDistribution` and
:class:`colour.MultiSpectralDistributions` classes discretized data can be
Expand Down Expand Up @@ -445,9 +445,9 @@ Scale - Reference
**'Reference'** is the default domain-range scale of **Colour**, objects adopt
the implemented reference, i.e. paper, publication, etc.., domain-range scale.

The **'Reference'** domain-range scale is inconsistent, e.g. colour appearance
The **'Reference'** domain-range scale is inconsistent, e.g., colour appearance
models, spectral conversions are typically in domain-range ``[0, 100]`` while RGB
models will operate in domain-range ``[0, 1]``. Some objects, e.g.
models will operate in domain-range ``[0, 1]``. Some objects, e.g.,
:func:``colour.colorimetry.lightness_Fairchild2011`` definition have mismatched
domain-range: input domain ``[0, 1]`` and output range ``[0, 100]``.

Expand All @@ -470,8 +470,8 @@ Scale - 1

The conversion to **'1'** domain-range scale is a *soft* normalisation and
similarly to the **'Reference'** domain-range scale it is normal to
encounter values exceeding *1*, e.g. High Dynamic Range Imagery (HDRI) or
negative values, e.g. out-of-gamut RGB colourspace values. Some definitions
encounter values exceeding *1*, e.g., High Dynamic Range Imagery (HDRI) or
negative values, e.g., out-of-gamut RGB colourspace values. Some definitions
such as :func:`colour.models.eotf_ST2084` which decodes absolute luminance
values are not affected by any domain-range scales and are indicated with
`UN`.
Expand Down
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def clean(
docs
Whether to clean the *docs* directory.
bytecode
Whether to clean the bytecode files, e.g. *.pyc* files.
Whether to clean the bytecode files, e.g., *.pyc* files.
pytest
Whether to clean the *Pytest* cache directory.
"""
Expand Down

0 comments on commit a08157c

Please sign in to comment.