def test_read_layout(): """Check read values match data.""" layout = read_layout(layout_path=f"{test_data}/test_mwa.txt") assert layout.shape[0] == 3 assert layout[0][0] == -1.497849999999999966e02 assert layout[1][0] == 2.658140000000000214e02 assert layout[2][0] == 3.770110000000000241e02
def test_uv_degrid(): """Check output values and shape.""" layout = read_layout(layout_path=f"{test_data}/test_mwa.txt") xyz = enh_xyz(layout=layout, latitude=mwa_geo.latitude.radians) uvw = xyz_uvw(xyz=xyz, freq=freq, dec0=mwa_geo.latitude.radians, ha0=0) uv = uv_degrid(max_lambda=1400, nside=20, uvw=uvw, sigma=3, kersize=21, kernel=None) assert uv.shape == (20, 20) assert uv[0, 0] == 0.0
def test_enh_xyz(): """Check output values and shape.""" layout = read_layout(layout_path=f"{test_data}/test_mwa.txt") xyz = enh_xyz(layout=layout, latitude=mwa_geo.latitude.radians) assert xyz.shape[0] == 3 assert xyz.shape[1] == 3 assert xyz[0, 0] == 456.25006328090495 assert xyz[1, 0] == -149.785 assert xyz[2, 0] == 68.04598792853452
def test_xyz_uvw(): """Check output values and shape.""" layout = read_layout(layout_path=f"{test_data}/test_mwa.txt") xyz = enh_xyz(layout=layout, latitude=mwa_geo.latitude.radians) uvw = xyz_uvw(xyz=xyz, freq=freq, dec0=mwa_geo.latitude.radians, ha0=0) assert uvw.shape == (3, 9) assert uvw[0][0] == 0.0 assert uvw[1][0] == 0.0 assert uvw[2][0] == 0.0