Skip to content

Commit

Permalink
fix preload bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schwab PI Sjors Scheres added 22022021 committed Oct 18, 2023
1 parent 4cb7696 commit 9b4ad60
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
Binary file not shown.
5 changes: 4 additions & 1 deletion dynamight/data/handlers/particle_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ def preload_images(self):
this_file_mask = unique_reverse == file_idx
this_file_stack_indices = self.part_stack_idx[this_file_mask]
# Take slices of images for this data set
this_file_images = mrc.data[this_file_stack_indices]
if len(mrc.data.shape) > 2:
this_file_images = mrc.data[this_file_stack_indices]
else:
this_file_images = np.expand_dims(mrc.data, 0)
# Particles indices with images in this file
this_file_index_list = part_index_list[this_file_mask]

Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 9b4ad60

Please sign in to comment.