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
9c72632c
Commit
9c72632c
authored
Aug 22, 2019
by
Philipp Arras
Browse files
Cosmetics
parent
4e97d7e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
test.py
View file @
9c72632c
...
...
@@ -291,15 +291,13 @@ def test_against_wdft(nxdirty, nydirty, nchan, nrow, fov):
nplanes
=
10000
ws
=
mi
+
np
.
arange
(
nplanes
)
*
(
ma
-
mi
)
/
(
nplanes
-
1
)
for
ii
in
range
(
len
(
ws
)
-
1
):
wkp1
=
ws
[
ii
+
1
]
if
ii
==
nplanes
-
2
:
wkp1
+=
abs
(
wkp1
)
jj
=
ng
.
getIndices
(
bl
,
conf
,
flags
,
wmin
=
ws
[
ii
],
wmax
=
wkp1
)
if
len
(
jj
)
==
0
:
wmax
=
ws
[
ii
+
1
]
if
ii
!=
nplanes
-
2
else
ws
[
ii
+
1
]
+
abs
(
ws
[
ii
+
1
])
wmax
=
ws
[
ii
+
1
]
if
ii
!=
nplanes
-
2
else
np
.
inf
iind
=
ng
.
getIndices
(
bl
,
conf
,
flags
,
wmin
=
ws
[
ii
],
wmax
=
wmax
)
if
len
(
iind
)
==
0
:
continue
dd
=
conf
.
grid2dirty_c
(
ng
.
vis2grid_c
(
bl
,
conf
,
jj
,
bl
.
ms2vis
(
ms
,
jj
)))
wforplane
=
0.5
*
(
ws
[
ii
+
1
]
+
ws
[
ii
])
res0
+=
conf
.
apply_wscreen
(
dd
,
wforplane
,
adjoint
=
False
).
real
dd
=
conf
.
grid2dirty_c
(
ng
.
vis2grid_c
(
bl
,
conf
,
iind
,
bl
.
ms2vis
(
ms
,
iind
)))
res0
+=
conf
.
apply_wscreen
(
dd
,
0.5
*
(
ws
[
ii
+
1
]
+
ws
[
ii
]),
adjoint
=
False
).
real
# Compute dft with w term
x
,
y
=
np
.
meshgrid
(
*
[
-
ss
/
2
+
np
.
arange
(
ss
)
for
ss
in
[
nxdirty
,
nydirty
]],
...
...
Write
Preview
Supports
Markdown
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