@ -8,10 +8,12 @@ Options:
@@ -8,10 +8,12 @@ Options:
threshold : float Visibilities with a weight below the specified
value will be flagged . Must be positive .
Version : 3.1
Date : Mar 2020
Version : 3.2
Date : Mar 2021
Written by Benito Marcote ( marcote @jive . eu )
version 3.2 changes ( Mar 2021 )
- w > 0 condiction moved to > 0.001 to include possible weights at the ~ 1e-5 level .
version 3.1 changes ( Mar 2020 )
- Progress bar added .
version 3.0 changes ( Apr 2019 )
@ -117,11 +119,11 @@ with pt.table(msdata, readonly=False, ack=False) as ms:
@@ -117,11 +119,11 @@ with pt.table(msdata, readonly=False, ack=False) as ms:
# extract weights and compute new flags based on threshold
weights = ms . getcol ( weightcol , startrow = start , nrow = nrow )
# how many non-zero did we flag
flagged_nonzero_before = np . logical_and ( flags , weights > 0 )
flagged_nonzero_before = np . logical_and ( flags , weights > 0.001 )
# join with existing flags and count again
flags = np . logical_or ( flags , weights < threshold )
flagged_after + = np . sum ( flags )
flagged_nonzero_after = np . logical_and ( flags , weights > 0 )
flagged_nonzero_after = np . logical_and ( flags , weights > 0.001 )
# Saving the total of nonzero flags (in this and previous runs)
# flagged_nonzero += np.sum(np.logical_xor(flagged_nonzero_before, flagged_nonzero_after))
flagged_nonzero + = np . sum ( flagged_nonzero_after )