diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2020-06-19 23:42:16 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2020-06-19 23:42:16 +0200 |
commit | 77221e174cdab64de60450646de77f849b043062 (patch) | |
tree | 313032eb10ba2aeb2ceda2de8a141d0f8caeb8c4 /test_bad_convergence.py | |
parent | 79d22b12c8c69962090ecc893aedf7195450737c (diff) |
Major cleanup
- The interpolator code is no longer here (but in the Colour fork)
- Refactoring made the code shorter and cleaner
- All tests work properly again
Diffstat (limited to 'test_bad_convergence.py')
-rw-r--r-- | test_bad_convergence.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/test_bad_convergence.py b/test_bad_convergence.py index dadb21e..a47af5a 100644 --- a/test_bad_convergence.py +++ b/test_bad_convergence.py @@ -1,15 +1,6 @@ import numpy as np from colour import * -from jakob_hanika import jakob_hanika, model_sd -from test_colorchecker import plot_comparison - - - -illuminant = "D65" -ill_xy = ILLUMINANTS["CIE 1931 2 Degree Standard Observer"][illuminant] -ill_sd = SpectralDistribution(ILLUMINANT_SDS[illuminant]) - - +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 @@ -19,6 +10,5 @@ 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, ill_sd, ill_xy, ccp0) - if error > 0.1: - plot_comparison(XYZ, model_sd(ccp), "Target", error, ill_sd) + ccp, error = jakob_hanika(XYZ, D65, D65_xy, ccp0) + plot_comparison(XYZ, model_sd(ccp), "Target", error, D65) |