From 7c0687916f99929df473ecd9ad24a134b75a2b95 Mon Sep 17 00:00:00 2001 From: Alexandre Gobbo Date: Fri, 16 Aug 2019 11:20:03 +0200 Subject: [PATCH] Script execution --- script/ms/test.py | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/script/ms/test.py b/script/ms/test.py index acdcfc3..d10a012 100644 --- a/script/ms/test.py +++ b/script/ms/test.py @@ -1,3 +1,26 @@ +tmp_file = get_context().setup.expandPath("{images}/px.img") +threshold1, threshold2, threshold3, threshold4 = 40, 500, 8000, 100000 +PIX_COLOR_DEPTH = 32 +PIX_XDIM = 487 +PIX_YDIM = 195 +image_header_length = 0 +roi = [0, 0, 486, 194] +bkroi = [0, 0, 486, 194] +filter_median = True +filter_nsigma = 30 + ret = img_get_int(tmp_file, threshold1, threshold2, threshold3, threshold4, \ - self.pixel.image_header_length, self.pixel.PIX_XDIM, self.pixel.PIX_YDIM,self.pixel.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) + 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) + +(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