Skip to content

Commit

Permalink
Add additional test for u-cut
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-a-cox committed Nov 6, 2023
1 parent 02631f5 commit 35ad834
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions hera_cal/tests/test_nucal.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,17 @@ def test_compute_spatial_filters():
model = design_matrix @ (XTXinv @ Xy)
np.allclose(model, data, atol=1e-6)

# Show that filters with a u-max cutoff are set to zero
umax = 15
antpos = linear_array(6, sep=5)
radial_reds = nucal.RadialRedundancy(antpos)
spatial_filters = nucal.compute_spatial_filters(radial_reds, freqs, umax=umax)

for rdgrp in radial_reds:
for bl in rdgrp:
umodes = radial_reds.baseline_lengths[bl] * freqs / 2.998e8
assert np.allclose(spatial_filters[bl][umodes > umax], 0)

def test_build_nucal_wgts():
bls = [(0, 1, 'ee'), (0, 2, 'ee'), (1, 2, 'ee')]
auto_bls = [(0, 0, 'ee'), (1, 1, 'ee'), (2, 2, 'ee')]
Expand Down

0 comments on commit 35ad834

Please sign in to comment.