Commit fa6e1364 authored by Landman Bester's avatar Landman Bester
Browse files

Set cell size in test_holo_from_correlations based on maximum frequency

parent 1319991a
......@@ -348,20 +348,23 @@ def test_against_wdft(nxdirty, nydirty, nchan, nrow, fov):
@pmp('nxdirty', (32,16))
@pmp('nydirty', (32,64))
@pmp("nrow", (100,1000))
@pmp("nchan", (1,))
@pmp("nchan", (1,5))
@pmp('epsilon', (1e-3,1e-6))
def test_holo_from_correlations(nxdirty, nydirty, nchan, nrow, epsilon):
np.random.seed(420)
uvw = np.random.randn(nrow, 3)
uvw[:, 2] = 0
cell = 0.75/(2*np.abs(uvw).max())
lightspeed, f0 = 3e8, 1e9
freq = f0 + np.arange(nchan)*(f0/nchan)
fmax = freq.max()
# Nyquist sampling
uv_max = np.abs(uvw * fmax/lightspeed).max()
cell = 0.75/(2*uv_max)
conf = ng.GridderConfig(nxdirty=nxdirty,
nydirty=nydirty,
epsilon=epsilon,
pixsize_x=cell,
pixsize_y=cell)
f0 = 3e8
freq = f0 + np.arange(nchan)*(f0/nchan)
bl = ng.Baselines(coord=uvw, freq=freq)
flags = np.zeros((nrow, nchan), dtype=np.bool)
idx = ng.getIndices(bl, conf, flags)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment