-
-
Notifications
You must be signed in to change notification settings - Fork 263
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: Implement Support for Executing CLF Workflows #1310
base: develop
Are you sure you want to change the base?
Conversation
249fa6a
to
fe57049
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Michael for the work! This is just a first batch of important notes WRT to the implementation, core idea is that we try as much as possible to use our existing code.
@@ -49,8 +49,12 @@ dependencies = [ | |||
"numpy>=1.24,<3", | |||
"scipy>=1.10,<2", | |||
"typing-extensions>=4,<5", | |||
"colour-clf-io" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Major
This should be an optional dependency as we do not want to hard-depend on CLF.
We will thus need a new requirement entry and callable here: https://github.com/colour-science/colour/blob/develop/colour/utilities/requirements.py
We will also want to track its version in colour.utilities.describe_environment
] | ||
|
||
[tool.uv.sources] | ||
colour-clf-io = {git = 'https://github.com/colour-science/colour-clf-io.git'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor
This is fine for now but we will need to release it on Pypi.
|
||
import numpy.typing as npt | ||
from colour_clf_io import ExponentStyle | ||
from colour_clf_io.values import Channel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor
Do you have the precommit hooks running, it looks like isort
is not really running.
FLT_MIN = 1.175494e-38 | ||
|
||
|
||
def apply_log_internal(value: NDArrayFloat, params, extra_args) -> NDArrayFloat: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Major
We wrote the functions for this during GSoc, let's please use those:
def logarithmic_function_basic( |
def logarithmic_function_quasilog( |
def logarithmic_function_camera( |
|
||
|
||
def apply_exponent_internal( | ||
value: NDArrayFloat, params: clf.ExponentParams, extra_args |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Major
We also wrote the functions for this during GSoc, let's please use those:
def exponent_function_basic( |
def exponent_function_monitor_curve( |
|
||
|
||
def asc_cdl_luma(value): | ||
R, G, B = tsplit(value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor
We should be able to do something along the line of np.sum(weights * value, axis=-1)
to avoid the tsplit
.
return result | ||
|
||
|
||
def apply( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Major
We should try to use colour.io.LUTSequence
here.
Summary
Add support for executing CLF workflows defined as per https://docs.acescentral.com/specifications/clf/#common-lut-format-clf-a-common-file-format-for-look-up-tables
Closes #636
TODO
pyproject.toml
to use that instead of directly referring to the repo.Preflight
Code Style and Quality
colour
,colour.models
.Documentation