summaryrefslogtreecommitdiff
path: root/test_bad_convergence.py
blob: a47af5a1b7e6361641d5e92656282993596b186a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import numpy as np
from colour import *
from gsoc_common import D65, D65_xy, jakob_hanika, model_sd, plot_comparison

# A set of inputs that make the Nelder-Mead solver work really hard.
# This might not be interesting in future versions of jakob_hanika.py, once
# the solver is more reliable. Make sure you've checked out the latest commit
# that updates *this* file.
if __name__ == "__main__":
	XYZ = np.array([0.00263241, 0.00174905, 0.00092602])
	ccp0 = np.array([5.11263599, -2.65344447, -2.37301856])

	ccp, error = jakob_hanika(XYZ, D65, D65_xy, ccp0)
	plot_comparison(XYZ, model_sd(ccp), "Target", error, D65)