Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Ohno (2013) Correlated Colour Temperature Performance Improvements #951

Merged
merged 7 commits into from
Mar 2, 2022

Conversation

KelSolaar
Copy link
Member

@KelSolaar KelSolaar commented Mar 1, 2022

Summary

This PR dramatically improves the performance of the Ohno (2013) CCT computations by use of caching and vectorised spectral conversion:

  • colour.uv_to_CCT_Ohno2013 is ~100x faster
  • colour.CCT_to_uv_Ohno2013 is ~425x faster

A definition that converts from CCT to CIE UCS colourspace uv chromaticity coordinates using Planck's Law has also been added:

  • colour.CCT_to_uv_Planck1900

Preflight

Code Style and Quality

  • Unit tests have been implemented and passed.
  • Mypy static checking has been run and passed.
  • Pre-commit hooks have been run and passed.
  • [N/A] New transformations have been added to the Automatic Colour Conversion Graph.
  • New transformations have been exported to the relevant namespaces, e.g. colour, colour.models.

Documentation

  • New features are documented along with examples if relevant.
  • The documentation is Sphinx and numpydoc compliant.

@KelSolaar KelSolaar added this to the v0.4.2 milestone Mar 1, 2022
@KelSolaar KelSolaar requested a review from a team March 1, 2022 08:10
@KelSolaar KelSolaar force-pushed the feature/cct_optimisation branch from 2534931 to 5acfcae Compare March 1, 2022 09:32
@KelSolaar KelSolaar force-pushed the feature/cct_optimisation branch from 5acfcae to f09af99 Compare March 2, 2022 00:12
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.005%) to 99.891% when pulling f09af99 on feature/cct_optimisation into 7e4300a on develop.

@KelSolaar KelSolaar merged commit f2daff2 into develop Mar 2, 2022
@KelSolaar KelSolaar deleted the feature/cct_optimisation branch May 29, 2022 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants