Skip to content
GitLab
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
46487e0f
Commit
46487e0f
authored
Aug 30, 2019
by
Martin Reinecke
Browse files
formatting
parent
5db3a4b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
demo_wstack_realdata.py
View file @
46487e0f
...
...
@@ -66,11 +66,9 @@ wgt = np.repeat(wgt[:, None], len(freq), axis=1)
wgt
[
flags
]
=
0
# flip visibilities with w<0
mask
=
uvw
[:,
2
]
<
0
uvw
[
mask
]
*=-
1
uvw
[
mask
]
*=-
1
uvw
[
mask
]
*=-
1
vis
=
np
.
conj
(
vis
)
*
mask
.
reshape
(
-
1
,
1
)
+
vis
*
(
1
-
mask
.
reshape
(
-
1
,
1
))
mask
=
uvw
[:,
2
]
<
0
uvw
[
mask
]
*=
-
1
vis
=
np
.
conj
(
vis
)
*
mask
.
reshape
(
-
1
,
1
)
+
vis
*
(
1
-
mask
.
reshape
(
-
1
,
1
))
npixdirty
=
756
DEG2RAD
=
np
.
pi
/
180
...
...
@@ -79,15 +77,15 @@ nthreads = 4
epsilon
=
6e-6
t0
=
time
()
print
(
'Start gridding...'
)
if
(
epsilon
>
5e-6
):
if
(
epsilon
>
5e-6
):
dirty
=
ng
.
full_gridding_f
(
uvw
.
astype
(
"f4"
),
freq
.
astype
(
"f4"
),
vis
.
astype
(
"c8"
),
wgt
.
astype
(
"f4"
),
npixdirty
,
npixdirty
,
pixsize
,
pixsize
,
epsilon
,
nthreads
,
verbosity
=
2
)
nthreads
,
verbosity
=
2
)
else
:
dirty
=
ng
.
full_gridding
(
uvw
,
freq
,
vis
,
wgt
,
npixdirty
,
npixdirty
,
pixsize
,
pixsize
,
epsilon
,
nthreads
,
verbosity
=
2
)
nthreads
,
verbosity
=
2
)
print
(
'Done'
)
t
=
time
()
-
t0
print
(
"{} s"
.
format
(
t
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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