Skip to content

Commit

Permalink
Update calculation script to match what we do internally
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Nov 22, 2023
1 parent 92c3a08 commit 7f639b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/calc_cat_matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def pre_calculate_cat(src_white, dest_white, m):
src = alg.dot(m, src_white)
dest = alg.dot(m, dest_white)
m2 = alg.diag(alg.divide(dest, src))
to_d50 = alg.solve(m, alg.dot(m2, m))
to_d65 = alg.inv(to_d50)
to_d65 = alg.dot(alg.solve(m, m2), m)
to_d50 = alg.inv(to_d65)
return to_d65, to_d50


Expand All @@ -78,7 +78,7 @@ def pre_calculate_cat(src_white, dest_white, m):
# afterwards, we just retrieve the previously calculated matrices from the cache.
# This allows us to check what the actual values we are using.

to_d65, to_d50 = pre_calculate_cat(white_d65, white_d50, bradford_m)
to_d65, to_d50 = pre_calculate_cat(white_d50, white_d65, bradford_m)
print('===== Bradford To D65 =====')
alg.pprint(to_d65)
print('===== Bradford To D50 =====')
Expand Down

0 comments on commit 7f639b6

Please sign in to comment.