From e9998c28da312e947f58b532e3f01cdc5ba08fc3 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Sat, 11 Jun 2011 23:39:51 -0400 Subject: [PATCH] Re-add a hard clamp for an estimator minimum. The value 0.4 is above what it should be (0.3 is the theoretical minimum), and having the harder clamp threshold causes some problems, but fixes others. There's a deeper bug here. --- cuburn/code/filtering.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuburn/code/filtering.py b/cuburn/code/filtering.py index f1fddf1..1b7217f 100644 --- a/cuburn/code/filtering.py +++ b/cuburn/code/filtering.py @@ -262,7 +262,7 @@ void density_est(float4 *pixbuf, float4 *outbuf, float *denbuf, # (0.5/1.5)=1/3. est_sd = np.float32(cp.estimator / 3.) neg_est_curve = np.float32(-cp.estimator_curve) - est_min = np.float32(cp.estimator_minimum) + est_min = np.float32(max(cp.estimator_minimum / 3., 0.4)) fun = mod.get_function("density_est") fun(abufd, obufd, dbufd, est_sd, neg_est_curve, est_min, k1, k2, block=(32, 32, 1), grid=(self.features.acc_width/32, 1),