diff --git a/script/cpython/image_functions.py b/script/cpython/image_functions.py index dab5206..bfc2ba4 100644 --- a/script/cpython/image_functions.py +++ b/script/cpython/image_functions.py @@ -1,4 +1,5 @@ import numpy +import time def img_get_int(fname, thres1, thres2, thres3, thres4, header, width, height, depth, x1,y1,x2,y2, bx1,by1,bx2,by2 , filter_median = False, filter_nsigma = 0): # read actual image file @@ -11,10 +12,11 @@ def img_get_int(fname, thres1, thres2, thres3, thres4, header, width, height, d thresh2_count = len(numpy.where(img>thres2)[0]) thresh3_count = len(numpy.where(img>thres3)[0]) thresh4_count = len(numpy.where(img>thres4)[0]) - + #time.sleep(1.0) # background roi I_sum_bgr = img[by1:by2, bx1:bx2].sum() area_bgr= (bx2 - bx1 + 1) * (by2 - by1 + 1) + return (I_sum, area_I, thresh1_count, thresh2_count, thresh3_count, thresh4_count, I_sum_bgr, area_bgr) diff --git a/script/cpython/wrapper.py b/script/cpython/wrapper.py index 18044b3..a8be428 100755 --- a/script/cpython/wrapper.py +++ b/script/cpython/wrapper.py @@ -4,10 +4,6 @@ def gfitoff(x, y, off=None, amp=None, com=None, sigma=None): ret = call_jep("cpython/GaussFit", "gfitoff", [to_npa(x), to_npa(y), off, amp, com, sigma]) return ret if ret is None or is_list(ret) else ret.data - - - -from jeputils import * MODULE = "cpython/SimulatedCamera" diff --git a/script/ms/test.py b/script/ms/test.py index c5a5f82..afac93d 100644 --- a/script/ms/test.py +++ b/script/ms/test.py @@ -1,3 +1,5 @@ +from jeputils import * + def img_get_int(fname, thres1, thres2, thres3, thres4, header, width, height, depth, x1,y1,x2,y2, bx1,by1,bx2,by2 , filter_median = False, filter_nsigma = 0): reload=True ret = call_jep("cpython/image_functions", "img_get_int", [fname, thres1, thres2, thres3, thres4, header, width, height, depth, x1,y1,x2,y2, bx1,by1,bx2,by2, filter_median, filter_nsigma], reload)