summaryrefslogtreecommitdiff
path: root/test_example.py
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-06-11 12:10:21 +0200
committerPaweł Redman <pawel.redman@gmail.com>2020-06-11 12:10:21 +0200
commit552877042007a18128db4313e35221a8faf1b5c0 (patch)
treef7021f96b29f78a71df9c9f0ca8d3c1a9ed438dc /test_example.py
parentcb3024229b71349753bcf9f1f30187bc8087fd6c (diff)
Refactoring; use primed c's everywhere
Diffstat (limited to 'test_example.py')
-rw-r--r--test_example.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test_example.py b/test_example.py
index 412cece..f497bbf 100644
--- a/test_example.py
+++ b/test_example.py
@@ -3,7 +3,7 @@ from colour import *
from colour.plotting import *
from colour.difference import *
from matplotlib import pyplot as plt
-from jakob_hanika import jakob_hanika, model, remap, wvl
+from jakob_hanika import jakob_hanika, model_sd
from test_colorchecker import plot_comparison
@@ -23,12 +23,13 @@ if __name__ == "__main__":
target = XYZ_to_Lab(XYZ, ill_xy)
print("Target: X=%g, Y=%g, Z=%g, L=%g, a=%g, b=%g" % (*XYZ, *target))
- cc, found_sd, error = jakob_hanika(target, ill_sd, ill_xy)
+ ccp, error = jakob_hanika(target, ill_sd, ill_xy)
- reference_sd = SpectralDistribution(model(remap(wvl), cc_ref), wvl)
+ reference_sd = model_sd(cc_ref)
reference_XYZ = sd_to_XYZ(reference_sd, illuminant=ill_sd)
reference_Lab = XYZ_to_Lab(reference_XYZ, ill_xy)
+ found_sd = model_sd(ccp)
found_XYZ = sd_to_XYZ(found_sd, illuminant=ill_sd)
found_Lab = XYZ_to_Lab(found_XYZ, ill_xy)