diff --git a/hexrd/instrument/detector.py b/hexrd/instrument/detector.py index 7b58c0e30..1b9afa345 100644 --- a/hexrd/instrument/detector.py +++ b/hexrd/instrument/detector.py @@ -637,10 +637,13 @@ def config_dict(self, chi=0, tvec=ct.zeros_3, columns=int(self.cols), size=[float(self.pixel_size_row), float(self.pixel_size_col)], - roi=roi ) ) + if roi is not None: + # Only add roi if it is not None + det_dict['pixels']['roi'] = roi + # distortion if self.distortion is not None: dparams = self.distortion.params