Skip to content

Commit 12c3eb9

Browse files
author
Joel Bernier
committed
more omega_stop whack-a-mole
1 parent c637105 commit 12c3eb9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

hexrd/cacheframes.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,12 @@ def get_frames(reader, cfg, show_progress=False, force=False, clean=False):
134134
n_frames = reader.getNFrames()
135135
else:
136136
# still need a fix here for when you have cache only...
137-
n_frames = int( (cfg.image_series.omega.stop \
138-
- cfg.image_series.omega.start) \
139-
/ float(cfg.image_series.omega.step) )
137+
if cfg.image_series.images.stop is not None:
138+
n_frames = cfg.image_series.images.stop
139+
else:
140+
n_frames = int( (cfg.image_series.omega.stop \
141+
- cfg.image_series.omega.start) \
142+
/ float(cfg.image_series.omega.step) )
140143
logger.info("reading %d frames from cache", n_frames)
141144

142145
with np.load(cache_file) as npz:

0 commit comments

Comments
 (0)