Skip to content

Commit

Permalink
Merge pull request #579 from HEXRD/remove-roi-if-none
Browse files Browse the repository at this point in the history
Only include "roi" in the config if it is not None
  • Loading branch information
psavery authored Nov 15, 2023
2 parents f6c819d + f83b663 commit 540768b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hexrd/instrument/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 540768b

Please sign in to comment.