Skip to content

Commit

Permalink
Merge pull request #61 from licode/multi_headers
Browse files Browse the repository at this point in the history
DEV: _get_images can take header or list of headers as input
  • Loading branch information
licode committed Apr 3, 2018
2 parents 3727870 + 8a4e8ca commit eb3ab7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion csxtools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ def get_images_to_3D(images, dtype=None):

def _get_images(header, tag, roi=None):
t = ttime.time()
images = header.db.get_images(header, tag)
if isinstance(header, (list, tuple)):
images = [img for h in header for img in h.data(tag)]
else:
images = header.data(tag)
t = ttime.time() - t
logger.info("Took %.3f seconds to read data using get_images", t)

Expand Down

0 comments on commit eb3ab7f

Please sign in to comment.