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
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
nifty_gridder
Commits
847c9606
Commit
847c9606
authored
Aug 27, 2019
by
Philipp Arras
Browse files
Add adjointness test for wgridder
parent
a4977523
Changes
1
Hide whitespace changes
Inline
Side-by-side
test.py
View file @
847c9606
...
...
@@ -64,6 +64,21 @@ def test_adjointness(nxdirty, nydirty, nrow, nchan, epsilon):
assert_allclose
(
np
.
vdot
(
ms
,
ms2
).
real
,
np
.
vdot
(
dirty
.
real
,
dirty2
.
real
))
@
pmp
(
"nxdirty"
,
(
128
,
300
))
@
pmp
(
"nydirty"
,
(
128
,
250
))
@
pmp
(
"nrow"
,
(
1
,
10
,
10000
))
@
pmp
(
"nchan"
,
(
1
,
10
,
100
))
@
pmp
(
"epsilon"
,
(
1e-2
,
1e-7
,
2e-13
))
def
test_adjointness_wgridding
(
nxdirty
,
nydirty
,
nrow
,
nchan
,
epsilon
):
np
.
random
.
seed
(
42
)
bl
,
conf
,
idx
=
_init_gridder
(
nxdirty
,
nydirty
,
epsilon
,
nchan
,
nrow
)
vis
=
np
.
random
.
rand
(
*
idx
.
shape
)
-
0.5
dirty
=
np
.
random
.
rand
(
conf
.
Nxdirty
(),
conf
.
Nydirty
())
-
0.5
dirty2
=
ng
.
vis2dirty_wstack
(
bl
,
conf
,
idx
,
vis
)
vis2
=
ng
.
dirty2vis_wstack
(
bl
,
conf
,
idx
,
dirty
)
assert_allclose
(
np
.
vdot
(
vis
,
vis2
),
np
.
vdot
(
dirty2
,
dirty
),
rtol
=
epsilon
)
@
pmp
(
"nxdirty"
,
(
128
,))
@
pmp
(
"nydirty"
,
(
128
,))
@
pmp
(
"nrow"
,
(
10000
,))
...
...
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