Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
Show the percentage of selected and discarded images
Browse files Browse the repository at this point in the history
  • Loading branch information
Víctor Terrón committed Sep 3, 2014
1 parent 2ea430f commit db4e756
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions photometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,14 @@ def get_date(img):
return 1

else:
msg = "%s%d images taken in the above filters, %d were discarded."
print msg % (style.prefix, len(files), discarded)
former_total = len(files) + discarded
msg = "%s%d images (%.2f %%) taken in the above filters,"
percentage = len(files) / former_total * 100
print msg % (style.prefix, len(files), percentage) ,

msg = "%d (%.2f %%) were discarded."
percentage = discarded / former_total * 100
print msg % (discarded, percentage)

# If a JSON file is specified with --annuli, it must list the photometric
# parameters for all the filters on which photometry is to be done.
Expand Down

0 comments on commit db4e756

Please sign in to comment.