Skip to content

Commit

Permalink
Fix restoration of original flags
Browse files Browse the repository at this point in the history
  • Loading branch information
darafferty committed Nov 6, 2024
1 parent 06877e8 commit 1b6e7a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion losoto/operations/flagstation.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ def _fit_bandpass(freq, logamp, sigma, band, do_fit=True):
'flagged fraction ({2:.3f}) < minFlaggedFraction '
'({3:.3f})'.format(ants[s], pol, fraction_flagged, minFlaggedFraction))
weights[:, flagged[0], pol] = 1.0 # unset new flags
weights[:, flagged_orig[0], pol] = 0.0 # restore original flags
weights[flagged_orig[0], flagged_orig[1], pol] = 0.0 # restore original flags
else:
median_val = np.nanmedian(amps[np.where(weights[:, :, pol] > 0.0)])
if median_val < median_min or median_val > median_max:
Expand Down

0 comments on commit 1b6e7a7

Please sign in to comment.