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
Commits
a9b8d316
Commit
a9b8d316
authored
May 27, 2019
by
Martin Reinecke
Browse files
fixes
parent
3b88ba48
Pipeline
#50078
failed with stages
in 5 minutes
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty5/library/gridder.py
View file @
a9b8d316
...
...
@@ -90,9 +90,12 @@ class RadioGridder(LinearOperator):
import
nifty_gridder
self
.
_check_input
(
x
,
mode
)
if
mode
==
self
.
TIMES
:
x
=
x
.
to_global_data
().
reshape
((
-
1
,
1
))
x
=
self
.
_bl
.
ms2vis
(
x
,
self
.
_idx
)
res
=
nifty_gridder
.
vis2grid
(
self
.
_bl
,
self
.
_gconf
,
self
.
_idx
,
x
.
to_global_data
()
)
self
.
_bl
,
self
.
_gconf
,
self
.
_idx
,
x
)
else
:
res
=
nifty_gridder
.
grid2vis
(
self
.
_bl
,
self
.
_gconf
,
self
.
_idx
,
x
.
to_global_data
())
res
=
self
.
_bl
.
vis2ms
(
res
,
self
.
_idx
).
reshape
((
-
1
,))
return
from_global_data
(
self
.
_tgt
(
mode
),
res
)
test/test_operators/test_nft.py
View file @
a9b8d316
...
...
@@ -36,9 +36,7 @@ def _l2error(a, b):
@
pmp
(
'N'
,
[
1
,
10
,
100
])
def
test_gridding
(
nu
,
nv
,
N
,
eps
):
uvw
=
np
.
random
.
rand
(
N
,
3
)
-
0.5
ms
=
(
np
.
random
.
randn
(
N
)
+
1j
*
np
.
random
.
randn
(
N
)).
reshape
((
-
1
,
1
))
# FIXME temporary!
vis
=
np
.
ones
((
N
,))
+
1j
*
np
.
ones
((
N
,))
vis
=
(
np
.
random
.
randn
(
N
)
+
1j
*
np
.
random
.
randn
(
N
))
# Nifty
GM
=
ift
.
GridderMaker
(
ift
.
RGSpace
((
nu
,
nv
)),
uvw
=
uvw
,
channel_fact
=
np
.
array
([
1.
]),
eps
=
eps
)
...
...
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