Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96629397
g_profil.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, 05:47
Size
1 KB
Mime Type
text/x-c
Expires
Tue, Dec 31, 05:47 (7 h, 15 m)
Engine
blob
Format
Raw Data
Handle
23218901
Attached To
R1448 Lenstool-HPC
g_profil.c
View Options
#include<stdio.h>
#include<math.h>
#include<fonction.h>
#include<constant.h>
#include<dimension.h>
#include<structure.h>
/****************************************************************/
/* g_profil(x,y,k) */
/* double x,y,k; */
/* */
/* evalue, en (x,y), la fonction: */
/* f(x,y)=Io/(1+alpha**2*(e**2*(x-C.x)**2+(y-C.y)**2)) */
/* k est l'indice de l'objet qu'on integre */
/* */
/* les parametres sont definis dans "para" */
/* alpha=1/(e*l) */
/****************************************************************/
double
g_profil
(
double
x
,
double
y
,
struct
galaxie
gal
)
{
double
xx
,
yy
,
xxx
,
yyy
;
double
res
;
xx
=
((
x
-
gal
.
C
.
x
)
*
sin
(
gal
.
E
.
theta
)
-
(
y
-
gal
.
C
.
y
)
*
cos
(
gal
.
E
.
theta
))
/
gal
.
E
.
b
;
yy
=
((
x
-
gal
.
C
.
x
)
*
cos
(
gal
.
E
.
theta
)
+
(
y
-
gal
.
C
.
y
)
*
sin
(
gal
.
E
.
theta
))
/
gal
.
E
.
a
;
xxx
=
xx
*
xx
;
yyy
=
yy
*
yy
;
/*
res=gal.I0*exp(-(xxx+yyy));
*/
res
=
gal
.
I0
/
(
1.
+
(
xxx
+
yyy
));
return
(
res
);
}
Event Timeline
Log In to Comment