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

When file indices are provided, only read models for the specified im… #210

Merged
merged 11 commits into from
Nov 18, 2020
21 changes: 16 additions & 5 deletions format/FormatMultiImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,22 @@ def get_imageset(
detector = []
goniometer = []
scan = []
for i in range(format_instance.get_num_images()):
beam.append(format_instance.get_beam(i))
detector.append(format_instance.get_detector(i))
goniometer.append(format_instance.get_goniometer(i))
scan.append(format_instance.get_scan(i))
num_images = format_instance.get_num_images()
for i in range(num_images):
if (
single_file_indices is None
or len(single_file_indices) == num_images
or i in single_file_indices
):
beam.append(format_instance.get_beam(i))
detector.append(format_instance.get_detector(i))
goniometer.append(format_instance.get_goniometer(i))
scan.append(format_instance.get_scan(i))
else:
beam.append(None)
detector.append(None)
goniometer.append(None)
scan.append(None)

if single_file_indices is None:
single_file_indices = list(range(format_instance.get_num_images()))
Expand Down