test formula against many images in 1 run

master
michael 2022-10-18 13:23:28 -07:00
parent 7bb7860924
commit 5979eb575f
1 changed files with 37 additions and 17 deletions

View File

@ -1,18 +1,37 @@
import math import math
# R & G values taken from images rg_value_sets = {
# white_hot = (255, 255) "firebrand_test.png": [
# hi = (168, 55) (219, 7),
# med = (146, 26) (227, 14),
# low = (25, 4) (166, 14),
# custom = (156, 20) (197, 10),
(230, 25),
(228, 17),
(218, 17),
(221, 15),
(210, 22),
(229, 17),
],
# firebrand_test "streaktest.png": [
rg_values = [ (50, 11),
(219, 7), (51, 12),
(227, 14), (52, 10),
(166, 14), (240, 115),
] (254, 127),
],
"ember_orange.png": [
(240, 147),
(235, 102),
(223, 103),
(232, 103),
(103, 34),
(128, 47),
(92, 27),
]
}
# Settings # Settings
I_Darkcurrent = 7.7 I_Darkcurrent = 7.7
@ -56,17 +75,18 @@ def grtemp(px):
tprint( tprint(
px[0], px[0],
px[1], px[1],
round(px[0] / px[1], 2), # round(px[0] / px[1], 2),
round(r_norm, 2), round(r_norm, 2),
round(g_norm, 2), round(g_norm, 2),
round(g_norm / r_norm, 4), round(g_norm / r_norm, 4),
res, res,
) )
tprint('RED', 'GREEN', 'RATIO', 'RNORM', 'GNORM', 'NRATIO', 'RES TEMP') for (key, val) in rg_value_sets.items():
print(f"\n{key}\n")
for val in rg_values: tprint('RED', 'GREEN', 'RNORM', 'GNORM', 'G_n/R_n', 'RES TEMP')
grtemp(val) for rg in val:
grtemp(rg)
# grtemp(white_hot) # grtemp(white_hot)
# grtemp(hi) # grtemp(hi)