summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-06-19 22:17:47 +0200
committerPaweł Redman <pawel.redman@gmail.com>2020-06-19 22:17:47 +0200
commit79d22b12c8c69962090ecc893aedf7195450737c (patch)
treec7e3f9ce6bc2124cb266a8ea78a1915be57489d7
parenta4c0842fe7b5e368fc741d5b71017980d94df8f9 (diff)
A quick to see if my Colour fork even works
See https://github.com/enneract/colour/tree/feature/jakob2019
-rw-r--r--test_integration.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/test_integration.py b/test_integration.py
new file mode 100644
index 0000000..35c19ed
--- /dev/null
+++ b/test_integration.py
@@ -0,0 +1,23 @@
+import numpy as np
+from colour import *
+from colour.recovery import Jakob2019Interpolator
+from colour.plotting import plot_multi_sds
+
+
+
+illuminant = "D65"
+ill_xy = ILLUMINANTS["CIE 1931 2 Degree Standard Observer"][illuminant]
+ill_sd = SpectralDistribution(ILLUMINANT_SDS[illuminant])
+
+
+
+if __name__ == "__main__":
+ RGB = np.array([0.79264853, 0.4, 0.63703843])
+ XYZ = sRGB_to_XYZ(1.055 * RGB ** (1/2.4) - 0.055, ill_xy)
+ sd = XYZ_to_sd(XYZ, method="Jakob 2019", verbose=True)
+
+ interp = Jakob2019Interpolator()
+ interp.read_file("data/srgb.coeff")
+ sdi = interp(RGB)
+
+ plot_multi_sds([sd, sdi])