summaryrefslogtreecommitdiff
path: root/test_integration.py
blob: d1b564fbdfe388fc3c1d6a33cd56b9a82957ba8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import numpy as np
from colour import *
from colour.models import eotf_inverse_sRGB
from colour.recovery import Jakob2019Interpolator
from colour.plotting import plot_multi_sds
from gsoc_common import D65_xy



# This is a basic test of the feature/jakob2019 branch
if __name__ == "__main__":
	RGB = np.array([0.79264853,  0.4, 0.63703843])
	XYZ = sRGB_to_XYZ(eotf_inverse_sRGB(RGB), D65_xy)
	sd = XYZ_to_sd(XYZ, method="Jakob 2019", verbose=True)

	interp = Jakob2019Interpolator()
	interp.from_file("data/srgb.coeff")
	sdi = interp.RGB_to_sd(RGB)

	plot_multi_sds([sd, sdi])