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
Lenstool
Lenstool
Commits
0eacb7ab
Commit
0eacb7ab
authored
Dec 13, 2020
by
Johan Richard
Browse files
Multiprocessing ok
parent
8383e963
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/do_itos.c
View file @
0eacb7ab
...
...
@@ -142,11 +142,9 @@ void newdo_itos(double **im, double dlsds, double zs,
{
extern
struct
g_pixel
imFrame
;
extern
struct
point
gsource_global
[
NGGMAX
][
NGGMAX
];
register
int
ii
,
jj
,
k
,
is
,
js
;
const
extern
struct
g_mode
M
;
const
extern
struct
g_pixel
ps
;
int
offscl
=
0
;
// 0 if OK, 1 if offscale
double
xpix
,
ypix
;
register
int
is
,
k
;
double
ech
=
1
.
0
;
...
...
@@ -174,9 +172,10 @@ void newdo_itos(double **im, double dlsds, double zs,
* For each pixel in the source plane
*/
#pragma omp parallel for schedule(
dynam
ic,1)
#pragma omp parallel for schedule(
stat
ic,1)
for
(
is
=
0
;
is
<
ps
.
nx
;
is
++
)
{
register
int
js
;
for
(
js
=
0
;
js
<
ps
.
ny
;
js
++
)
{
source
[
js
][
is
]
=
0
.
0
;
...
...
@@ -195,7 +194,8 @@ void newdo_itos(double **im, double dlsds, double zs,
/*
* Loop over all images
*/
for
(
k
=
0
;
k
<
ni
;
k
++
)
register
int
kk
;
for
(
kk
=
0
;
kk
<
ni
;
kk
++
)
{
/*
* If the image is within one contour then put flux of closest pixel.
...
...
@@ -203,10 +203,12 @@ void newdo_itos(double **im, double dlsds, double zs,
int
kcont
;
for
(
kcont
=
0
;
kcont
<
imFrame
.
ncont
;
kcont
++
)
{
if
(
inconvexe
(
pImage
[
k
],
npcont
[
kcont
],
I
[
kcont
])
>
0
)
if
(
inconvexe
(
pImage
[
k
k
],
npcont
[
kcont
],
I
[
kcont
])
>
0
)
{
double
xw
=
pImage
[
k
].
x
/
(
-
3600
.)
/
cos
(
M
.
ref_dec
*
DTR
)
+
M
.
ref_ra
;
double
yw
=
pImage
[
k
].
y
/
3600
.
+
M
.
ref_dec
;
double
xw
=
pImage
[
kk
].
x
/
(
-
3600
.)
/
cos
(
M
.
ref_dec
*
DTR
)
+
M
.
ref_ra
;
double
yw
=
pImage
[
kk
].
y
/
3600
.
+
M
.
ref_dec
;
double
xpix
,
ypix
;
int
offscl
=
0
;
// 0 if OK, 1 if offscale
#pragma omp critical
{
wcs2pix
(
imFrame
.
wcsinfo
,
xw
,
yw
,
&
xpix
,
&
ypix
,
&
offscl
);
...
...
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