From 7fb94888dc081749e004aeef9b2742909e1cbc8e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 14 Jan 2021 17:08:25 +0100 Subject: Avoid very slow loop over pixels to create bad pixel map Bad regions specified in terms of x/y still require an iteration over all pixels of the detector, but I don't see an easy way around that. Avoiding x/y bad regions will give best performance. --- src/make_pixelmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/make_pixelmap.c b/src/make_pixelmap.c index 099ba79f..577c1a1a 100644 --- a/src/make_pixelmap.c +++ b/src/make_pixelmap.c @@ -330,7 +330,7 @@ int main(int argc, char *argv[]) y[fs + w*ss] = ry; z[fs + w*ss] = 0.0; /* 2D part only */ - if ( data_template_in_bad_region(dtempl, pn, cfs, css) ) { + if ( image->bad[pn][fs + w*ss] ) { b[fs + w*ss] = bad_pixel_val; } else { b[fs + w*ss] = good_pixel_val; -- cgit v1.2.3