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
f0ec58c2
Commit
f0ec58c2
authored
Sep 01, 2019
by
Martin Reinecke
Browse files
simplify
parent
2b4d3adf
Changes
1
Hide whitespace changes
Inline
Side-by-side
gridder_cxx.h
View file @
f0ec58c2
...
...
@@ -653,10 +653,10 @@ template<typename T, typename T2=complex<T>> class Helper
int
lineJump
()
const
{
return
sv
;
}
T
Wfac
()
const
{
return
kernel
[
2
*
supp
];
}
void
prep
(
T
u_in
,
T
v_in
,
T
w_
in
)
void
prep
(
const
UVW
<
T
>
&
in
)
{
T
u
,
v
;
gconf
.
getpix
(
u_in
,
v_in
,
u
,
v
,
iu0
,
iv0
);
gconf
.
getpix
(
in
.
u
,
in
.
v
,
u
,
v
,
iu0
,
iv0
);
T
xsupp
=
T
(
2
)
/
supp
;
auto
x0
=
xsupp
*
(
iu0
-
u
);
auto
y0
=
xsupp
*
(
iv0
-
v
);
...
...
@@ -666,7 +666,7 @@ template<typename T, typename T2=complex<T>> class Helper
kernel
[
i
+
supp
]
=
y0
+
i
*
xsupp
;
}
if
(
do_w_gridding
)
kernel
[
2
*
supp
]
=
min
(
T
(
1
),
xdw
*
xsupp
*
abs
(
w0
-
w_
in
));
kernel
[
2
*
supp
]
=
min
(
T
(
1
),
xdw
*
xsupp
*
abs
(
w0
-
in
.
w
));
for
(
size_t
i
=
nexp
;
i
<
nvecs
;
++
i
)
kernel
[
i
]
=
0
;
for
(
size_t
i
=
0
;
i
<
nvecs
;
++
i
)
...
...
@@ -788,7 +788,7 @@ template<typename T, typename Serv> void x2grid_c
{
UVW
<
T
>
coord
=
srv
.
getCoord
(
ipart
);
auto
flip
=
coord
.
FixW
();
hlp
.
prep
(
coord
.
u
,
coord
.
v
,
coord
.
w
);
hlp
.
prep
(
coord
);
auto
*
ptr
=
hlp
.
p0w
;
auto
v
(
srv
.
getVis
(
ipart
));
if
(
do_w_gridding
)
v
*=
hlp
.
Wfac
();
...
...
@@ -845,7 +845,7 @@ template<typename T, typename Serv> void grid2x_c
{
UVW
<
T
>
coord
=
srv
.
getCoord
(
ipart
);
auto
flip
=
coord
.
FixW
();
hlp
.
prep
(
coord
.
u
,
coord
.
v
,
coord
.
w
);
hlp
.
prep
(
coord
);
complex
<
T
>
r
=
0
;
const
auto
*
ptr
=
hlp
.
p0r
;
for
(
size_t
cu
=
0
;
cu
<
supp
;
++
cu
)
...
...
@@ -908,7 +908,7 @@ template<typename T> void apply_holo
{
UVW
<
T
>
coord
=
baselines
.
effectiveCoord
(
idx
(
ipart
));
coord
.
FixW
();
hlp
.
prep
(
coord
.
u
,
coord
.
v
,
0
);
hlp
.
prep
(
coord
);
complex
<
T
>
r
=
0
;
const
auto
*
ptr
=
hlp
.
p0r
;
for
(
size_t
cu
=
0
;
cu
<
supp
;
++
cu
)
...
...
@@ -976,7 +976,7 @@ template<typename T> void get_correlations
{
UVW
<
T
>
coord
=
baselines
.
effectiveCoord
(
idx
(
ipart
));
coord
.
FixW
();
hlp
.
prep
(
coord
.
u
,
coord
.
v
,
0
);
hlp
.
prep
(
coord
);
auto
*
wptr
=
hlp
.
p0w
+
u0
*
jump
;
auto
f0
=
T
(
1
);
if
(
have_wgt
)
...
...
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