diff options
author | Thomas White <taw@physics.org> | 2019-03-01 14:07:54 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-03-01 14:08:28 +0100 |
commit | b5f0141aa339b3af4761f155ccd05308b6db05b5 (patch) | |
tree | 2373e3f0aece18dff62d1d37bdb50391cddb295c | |
parent | aa7ca6edfe2203692aced574294d03f51dcd1feb (diff) |
Don't mask out entire image if bad pixel map can't be loaded
-rw-r--r-- | libcrystfel/src/hdf5-file.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c index 3d9ea0b2..9c8038ea 100644 --- a/libcrystfel/src/hdf5-file.c +++ b/libcrystfel/src/hdf5-file.c @@ -1901,8 +1901,11 @@ int hdf5_read2(struct hdfile *f, struct image *image, struct event *ev, if ( p->mask != NULL ) { int *flags = malloc(p->w*p->h*sizeof(int)); - load_mask(f, ev, p, flags, f_offset, f_count, hsd); - image->bad[pi] = make_badmask(flags, p, image->det); + if ( !load_mask(f, ev, p, flags, f_offset, f_count, hsd) ) { + image->bad[pi] = make_badmask(flags, p, image->det); + } else { + image->bad[pi] = make_badmask(NULL, p, image->det); + } free(flags); } else { image->bad[pi] = make_badmask(NULL, p, image->det); |