Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
nifty_gridder
Commits
fa6e1364
Commit
fa6e1364
authored
Aug 27, 2019
by
Landman Bester
Browse files
Set cell size in test_holo_from_correlations based on maximum frequency
parent
1319991a
Changes
1
Hide whitespace changes
Inline
Side-by-side
test.py
View file @
fa6e1364
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment