Skip to content

Commit

Permalink
fix(dayenu): check for flagged times when applying dayenu filter
Browse files Browse the repository at this point in the history
  • Loading branch information
ljgray committed Dec 24, 2024
1 parent 945187f commit eedceff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions draco/analysis/dayenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,9 +616,17 @@ def process(self, hv, source):
for tt in range(ntime):
t0 = time.time()

# Skip fully masked times
flag = weight[..., tt] > 0.0
flag = np.all(flag, axis=0, keepdims=True)
weight[..., tt] *= flag.astype(weight.dtype)

for xx in range(new):
self.log.debug(f"Filter time {tt} of {ntime}, baseline {xx} of {new}.")

if not np.any(flag[0, :, xx]):
continue

for pp in range(npol):
# Grab datasets for this pol and ew baseline
tvis = np.ascontiguousarray(vis[pp, :, xx, :, tt])
Expand Down

0 comments on commit eedceff

Please sign in to comment.