Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only include "roi" in the config if it is not None #579

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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