Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pnuu/halostack
Browse files Browse the repository at this point in the history
  • Loading branch information
pnuu committed Jan 8, 2016
2 parents 9e95738 + 8bee506 commit 3ffdc36
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bin/halostack_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def halostack_cli(args):
del base_img
base_img = None

skipped_images = []
for img_fname in images:
# Read image
img = Image(fname=img_fname, nprocs=args['nprocs'])
Expand All @@ -152,6 +153,7 @@ def halostack_cli(args):

if img is None:
LOGGER.warning("Skipping image.")
skipped_images.append(img_fname)
continue

if args['save_prefix'] is not None:
Expand All @@ -177,6 +179,14 @@ def halostack_cli(args):
img.save(args['stack_fnames'][i],
enhancements=args['enhance_stacks'])

if len(images) > 1:
LOGGER.info("Stacked %d/%d images.", len(images)-len(skipped_images),
len(images))
if len(skipped_images) > 0:
LOGGER.warning("Images that were not used: %s",
'\n\t' + '\n\t'.join(skipped_images))


def main():
'''Main. Only commandline and config file parsing is done here.'''
parser = argparse.ArgumentParser()
Expand Down

0 comments on commit 3ffdc36

Please sign in to comment.