Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
nifty_gridder
Commits
3e52d27a
Commit
3e52d27a
authored
Aug 27, 2019
by
Martin Reinecke
Browse files
make wstacker dirty images real-only
parent
99592f45
Changes
2
Hide whitespace changes
Inline
Side-by-side
gridder_cxx.h
View file @
3e52d27a
...
...
@@ -965,8 +965,8 @@ template<typename T> void get_correlations
}
template
<
typename
T
>
void
apply_wcorr
(
const
GridderConfig
<
T
>
&
gconf
,
mav
<
complex
<
T
>
,
2
>
&
dirty
,
const
EC_Kernel_with_correction
<
T
>
&
kernel
,
double
dw
)
template
<
typename
T
,
typename
T2
>
void
apply_wcorr
(
const
GridderConfig
<
T
>
&
gconf
,
mav
<
T2
,
2
>
&
dirty
,
const
EC_Kernel_with_correction
<
T
>
&
kernel
,
double
dw
)
{
auto
nx_dirty
=
gconf
.
Nxdirty
();
auto
ny_dirty
=
gconf
.
Nydirty
();
...
...
@@ -1001,7 +1001,7 @@ template<typename T> void apply_wcorr(const GridderConfig<T> &gconf,
template
<
typename
T
>
void
vis2dirty_wstack
(
const
Baselines
<
T
>
&
baselines
,
const
GridderConfig
<
T
>
&
gconf
,
const
const_mav
<
uint32_t
,
1
>
&
idx
,
const
const_mav
<
complex
<
T
>
,
1
>
&
vis
,
mav
<
complex
<
T
>
,
2
>
&
dirty
)
const
const_mav
<
complex
<
T
>
,
1
>
&
vis
,
mav
<
T
,
2
>
&
dirty
)
{
auto
nx_dirty
=
gconf
.
Nxdirty
();
auto
ny_dirty
=
gconf
.
Nydirty
();
...
...
@@ -1086,7 +1086,7 @@ cout << "blip3" << endl;
cout
<<
"blip4"
<<
endl
;
for
(
size_t
i
=
0
;
i
<
nx_dirty
;
++
i
)
for
(
size_t
j
=
0
;
j
<
ny_dirty
;
++
j
)
dirty
(
i
,
j
)
+=
tdirty
(
i
,
j
);
dirty
(
i
,
j
)
+=
tdirty
(
i
,
j
)
.
real
()
;
}
}
// correct for w gridding
...
...
@@ -1097,7 +1097,7 @@ cout << "applying correction for gridding in w direction" << endl;
template
<
typename
T
>
void
dirty2vis_wstack
(
const
Baselines
<
T
>
&
baselines
,
const
GridderConfig
<
T
>
&
gconf
,
const
const_mav
<
uint32_t
,
1
>
&
idx
,
const
const_mav
<
complex
<
T
>
,
2
>
&
dirty
,
mav
<
complex
<
T
>
,
1
>
&
vis
)
const
const_mav
<
T
,
2
>
&
dirty
,
mav
<
complex
<
T
>
,
1
>
&
vis
)
{
auto
nx_dirty
=
gconf
.
Nxdirty
();
auto
ny_dirty
=
gconf
.
Nydirty
();
...
...
nifty_gridder.cc
View file @
3e52d27a
...
...
@@ -681,7 +681,7 @@ template<typename T> pyarr<uint32_t> getIndices(const PyBaselines<T> &baselines,
return
res
;
}
template
<
typename
T
>
pyarr
<
complex
<
T
>
>
Pyvis2dirty_wstack
(
const
PyBaselines
<
T
>
&
baselines
,
template
<
typename
T
>
pyarr
<
T
>
Pyvis2dirty_wstack
(
const
PyBaselines
<
T
>
&
baselines
,
const
PyGridderConfig
<
T
>
&
gconf
,
const
pyarr
<
uint32_t
>
&
idx_
,
const
pyarr
<
complex
<
T
>>
&
vis_
)
{
...
...
@@ -689,7 +689,7 @@ template<typename T> pyarr<complex<T>> Pyvis2dirty_wstack(const PyBaselines<T> &
auto
ny_dirty
=
gconf
.
Nydirty
();
auto
idx2
=
make_const_mav
<
1
>
(
idx_
);
auto
vis2
=
make_const_mav
<
1
>
(
vis_
);
auto
dirty
=
makeArray
<
complex
<
T
>
>
({
nx_dirty
,
ny_dirty
});
auto
dirty
=
makeArray
<
T
>
({
nx_dirty
,
ny_dirty
});
auto
dirty2
=
make_mav
<
2
>
(
dirty
);
{
py
::
gil_scoped_release
release
;
...
...
@@ -700,7 +700,7 @@ template<typename T> pyarr<complex<T>> Pyvis2dirty_wstack(const PyBaselines<T> &
template
<
typename
T
>
pyarr
<
complex
<
T
>>
Pydirty2vis_wstack
(
const
PyBaselines
<
T
>
&
baselines
,
const
PyGridderConfig
<
T
>
&
gconf
,
const
pyarr
<
uint32_t
>
&
idx_
,
const
pyarr
<
complex
<
T
>
>
&
dirty_
)
const
pyarr
<
T
>
&
dirty_
)
{
auto
idx2
=
make_const_mav
<
1
>
(
idx_
);
auto
nvis
=
idx2
.
shape
(
0
);
...
...
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