diff options
author | Thomas White <taw@physics.org> | 2021-01-14 17:08:25 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-01-14 17:09:35 +0100 |
commit | 7fb94888dc081749e004aeef9b2742909e1cbc8e (patch) | |
tree | e6be5cd7e784859b5bef86c1c0db3304a32fa7f3 /src | |
parent | 0adf5fd72e96e5772288088cac71451a5f898c2e (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/make_pixelmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |