From 66169cd629764226e43f9ee1012dcf6b9994c8e6 Mon Sep 17 00:00:00 2001 From: turtlebasket Date: Wed, 12 Oct 2022 17:35:56 -0700 Subject: [PATCH] clean up & fix math --- examples/ratio_pyrometry.py | 4 ++-- ratio_pyrometry.py | 19 ++++--------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/examples/ratio_pyrometry.py b/examples/ratio_pyrometry.py index 66d3039..a5ecb24 100644 --- a/examples/ratio_pyrometry.py +++ b/examples/ratio_pyrometry.py @@ -79,9 +79,9 @@ def pyrometry_calibration_formula(i_ng, i_nr): return 362.73 * math.log10( (i_ng/i_nr) ** 3 ) + 2186.7 * math.log10( - (i_ng/i_nr) ** 3 + (i_ng/i_nr) ** 2 ) + 4466.5 * math.log10( - (i_ng / i_nr) ** 3 + (i_ng / i_nr) ) + 3753.5 diff --git a/ratio_pyrometry.py b/ratio_pyrometry.py index efa242a..215d490 100644 --- a/ratio_pyrometry.py +++ b/ratio_pyrometry.py @@ -4,19 +4,6 @@ import numpy as np from numba import jit import json -# Cropping config -# x1 = 420 -# x2 = 1200 -# y1 = 400 -# y2 = -1 - -# post-processing -smoothing_radius = 2 - -# temperature key generation -key_entries = 6 - - @jit(nopython=True) def rg_ratio_normalize( imgarr, @@ -54,6 +41,8 @@ def rg_ratio_normalize( if temp_C > tmax: tmax = temp_C + temp_C -= MIN_TEMP + imgnew[i][j] = [temp_C, temp_C, temp_C] return imgnew, tmin, tmax @@ -67,9 +56,9 @@ def pyrometry_calibration_formula(i_ng, i_nr): return 362.73 * math.log10( (i_ng/i_nr) ** 3 ) + 2186.7 * math.log10( - (i_ng/i_nr) ** 3 + (i_ng/i_nr) ** 2 ) + 4466.5 * math.log10( - (i_ng / i_nr) ** 3 + (i_ng / i_nr) ) + 3753.5 def ratio_pyrometry_pipeline(