Skip to content

Commit

Permalink
Merge pull request #77 from ska-sa/issue-62
Browse files Browse the repository at this point in the history
add flag percentage, plus version bump
  • Loading branch information
o-smirnov authored Jan 8, 2021
2 parents 5382021 + db2e4af commit 2e40b50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Owlcat/bin/flag-ms.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,13 @@ def parse_subset_options(options):
ftab.close()
ms.putcol("FLAG_ROW", flag_row)
ms.putcol("FLAG", flag_col)
flag_col[flag_row,...] = True
ms.close()
ratio = flag_col.sum() / float(flag_col.size)
print(f"Flag version '{options.restore}' restored: {ratio:.2%} flagged.")
except:
traceback.print_exc()
error(f"Error restoring flags from {options.restore}, exiting")
print(f"Flag version '{options.restore}' restored.")

# if no other actions supplied, enable stats (unless flags were imported, in which case just exit)
if not (options.flag or options.unflag or options.copy or options.fill_legacy):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
]

setup(name='owlcat',
version='1.6.4',
version='1.7.1',
description='miscellaneous utility scripts for manipulating radio interferometry data',
author='Oleg Smirnov',
author_email='Oleg Smirnov <[email protected]>',
Expand Down

0 comments on commit 2e40b50

Please sign in to comment.