From e8ad93e546895926b2e4c091ffa022c01e4742ed Mon Sep 17 00:00:00 2001 From: Brianna Major Date: Tue, 8 Aug 2023 09:14:08 -0400 Subject: [PATCH] Mask with NaNs in the raw view as well Signed-off-by: Brianna Major --- hexrd/ui/hexrd_config.py | 2 +- hexrd/ui/image_file_manager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hexrd/ui/hexrd_config.py b/hexrd/ui/hexrd_config.py index 381797aee..c296e41aa 100644 --- a/hexrd/ui/hexrd_config.py +++ b/hexrd/ui/hexrd_config.py @@ -889,7 +889,7 @@ def masked_images_dict(self): for det, mask in self.raw_masks_dict.items(): for name, img in images_dict.items(): if det == name: - img[~mask] = 0 + img[~mask] = np.nan return images_dict diff --git a/hexrd/ui/image_file_manager.py b/hexrd/ui/image_file_manager.py index b0326948c..0505283c2 100644 --- a/hexrd/ui/image_file_manager.py +++ b/hexrd/ui/image_file_manager.py @@ -36,7 +36,7 @@ def load_dummy_images(self, initial=False): cols = iconfig['detectors'][det]['pixels']['columns'] rows = iconfig['detectors'][det]['pixels']['rows'] shape = (rows, cols) - data = np.ones(shape, dtype=np.uint8) + data = np.ones(shape, dtype=np.float16) ims = imageseries.open(None, 'array', data=data) # Set a flag on these image series indicating that they are