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
90e57542
Commit
90e57542
authored
Aug 25, 2019
by
Philipp Arras
Browse files
Add another test
parent
d0685c95
Changes
1
Hide whitespace changes
Inline
Side-by-side
test.py
View file @
90e57542
...
...
@@ -238,6 +238,24 @@ def test_correlations(nxdirty, nydirty, nrow, nchan, epsilon, du, dv, weight):
assert_allclose
(
np
.
zeros_like
(
y1
),
y1
.
imag
)
@
pmp
(
"nrow"
,
(
1
,
1000
))
@
pmp
(
"nchan"
,
(
1
,
10
))
@
pmp
(
"epsilon"
,
(
1e-2
,
1e-7
,
2e-12
))
@
pmp
(
"weight"
,
(
True
,
False
))
def
test_no_correlation
(
nrow
,
nchan
,
epsilon
,
weight
):
np
.
random
.
seed
(
42
)
bl
,
conf
,
idx
=
_init_gridder
(
128
,
128
,
epsilon
,
nchan
,
nrow
)
wgt
=
np
.
random
.
rand
(
*
idx
.
shape
)
if
weight
else
None
w
=
conf
.
W
()
for
uu
in
range
(
-
2
*
w
,
2
*
w
):
for
vv
in
range
(
-
2
*
w
,
2
*
w
):
if
abs
(
uu
)
>=
w
or
abs
(
vv
)
>=
w
:
with
pytest
.
raises
(
RuntimeError
):
ng
.
get_correlations
(
bl
,
conf
,
idx
,
uu
,
vv
,
wgt
)
else
:
ng
.
get_correlations
(
bl
,
conf
,
idx
,
uu
,
vv
,
wgt
)
@
pmp
(
'epsilon'
,
[
1e-2
,
1e-4
,
1e-7
,
1e-10
,
1e-11
,
1e-12
,
2e-13
])
@
pmp
(
'nxdirty'
,
[
12
,
128
])
@
pmp
(
'nydirty'
,
[
4
,
12
,
128
])
...
...
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