From 9f337c3ded168e8fa7b14331011634b44afac8fb Mon Sep 17 00:00:00 2001 From: Alexandre Gobbo Date: Fri, 16 Aug 2019 11:22:41 +0200 Subject: [PATCH] Script execution --- script/ms/test.py | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/script/ms/test.py b/script/ms/test.py index d10a012..ce5c93e 100644 --- a/script/ms/test.py +++ b/script/ms/test.py @@ -6,21 +6,28 @@ PIX_YDIM = 195 image_header_length = 0 roi = [0, 0, 486, 194] bkroi = [0, 0, 486, 194] -filter_median = True -filter_nsigma = 30 +def print_output(ret); + (I_sum, area_I, thresh1_count, thresh2_count, thresh3_count, thresh4_count, I_sum_bgr, area_bgr) = ret + print "Time=",time.time()-start + print "I_sum=",I_sum + print "area_I=",area_I + print "thresh1_count=",thresh1_count + print "thresh2_count=",thresh2_count + print "thresh3_count=",thresh3_count + print "thresh4_count=",thresh4_count + print "I_sum_bgr=",I_sum_bgr + print "area_bgr=",area_bgr + + +start = time.time() ret = img_get_int(tmp_file, threshold1, threshold2, threshold3, threshold4, \ image_header_length, PIX_XDIM, PIX_YDIM,PIX_COLOR_DEPTH, \ - roi[0], roi[1], roi[2], roi[3], bkroi[0], bkroi[1], bkroi[2], bkroi[3], filter_median = filter_median, filter_nsigma = filter_nsigma) + roi[0], roi[1], roi[2], roi[3], bkroi[0], bkroi[1], bkroi[2], bkroi[3], \ + filter_median = False, filter_nsigma = 0) -(I_sum, area_I, thresh1_count, thresh2_count, thresh3_count, thresh4_count, I_sum_bgr, area_bgr) = ret - - -print "I_sum=",I_sum -print "area_I=",area_I -print "thresh1_count=",thresh1_count -print "thresh2_count=",thresh2_count -print "thresh3_count=",thresh3_count -print "thresh4_count=",thresh4_count -print "I_sum_bgr=",I_sum_bgr -print "area_bgr=",area_bgr +start = time.time() +ret = img_get_int(tmp_file, threshold1, threshold2, threshold3, threshold4, \ + image_header_length, PIX_XDIM, PIX_YDIM,PIX_COLOR_DEPTH, \ + roi[0], roi[1], roi[2], roi[3], bkroi[0], bkroi[1], bkroi[2], bkroi[3], \ + filter_median = True, filter_nsigma = 30)