Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96644439
g_dpl.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Dec 29, 10:26
Size
1 KB
Mime Type
text/x-c
Expires
Tue, Dec 31, 10:26 (2 d)
Engine
blob
Format
Raw Data
Handle
23221250
Attached To
R1448 Lenstool-HPC
g_dpl.c
View Options
#include<stdio.h>
#include<math.h>
#include<fonction.h>
#include<constant.h>
#include<dimension.h>
#include<structure.h>
#include<lt.h>
/****************************************************************/
/* nom: g_dpl */
/* auteur: Jean-Paul Kneib */
/* date: 10/02/92 */
/* place: Toulouse */
/****************************************************************/
void
g_dpl
(
int
idpl
,
int
np
,
double
z
,
char
*
filex
,
char
*
filey
)
{
const
extern
struct
g_mode
M
;
const
extern
struct
g_frame
F
;
const
extern
struct
pot
lens
[];
register
int
i
,
j
;
double
dx
,
dy
;
double
dlsds
;
struct
point
pi
;
struct
point
dpl
;
double
**
dplx
,
**
dply
;
NPRINTF
(
stderr
,
"COMP: displacment map for z_s=%.3lf =>%s %s
\n
"
,
z
,
filex
,
filey
);
dlsds
=
dratio
(
lens
[
0
].
z
,
z
);
dx
=
(
F
.
xmax
-
F
.
xmin
)
/
(
np
-
1
);
dy
=
(
F
.
ymax
-
F
.
ymin
)
/
(
np
-
1
);
dplx
=
(
double
**
)
alloc_square_double
(
np
,
np
);
dply
=
(
double
**
)
alloc_square_double
(
np
,
np
);
for
(
j
=
0
;
j
<
np
;
j
++
)
{
pi
.
y
=
j
*
dy
+
F
.
ymin
;
for
(
i
=
0
;
i
<
np
;
i
++
)
{
pi
.
x
=
i
*
dx
+
F
.
xmin
;
dpl
=
e_grad
(
&
pi
);
dpl
.
x
*=
dlsds
;
dpl
.
y
*=
dlsds
;
dplx
[
j
][
i
]
=
dpl
.
x
;
dply
[
j
][
i
]
=
dpl
.
y
;
};
};
if
(
M
.
iref
>
0
)
{
wrf_fits_abs
(
filex
,
dplx
,
np
,
np
,
F
.
xmin
,
F
.
xmax
,
F
.
ymin
,
F
.
ymax
,
M
.
ref_ra
,
M
.
ref_dec
);
wrf_fits_abs
(
filey
,
dply
,
np
,
np
,
F
.
xmin
,
F
.
xmax
,
F
.
ymin
,
F
.
ymax
,
M
.
ref_ra
,
M
.
ref_dec
);
}
else
{
wrf_fits
(
filex
,
dplx
,
np
,
np
,
F
.
xmin
,
F
.
xmax
,
F
.
ymin
,
F
.
ymax
);
wrf_fits
(
filey
,
dply
,
np
,
np
,
F
.
xmin
,
F
.
xmax
,
F
.
ymin
,
F
.
ymax
);
}
free_square_double
(
dplx
,
np
);
free_square_double
(
dply
,
np
);
}
Event Timeline
Log In to Comment