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
9cc7b673
Commit
9cc7b673
authored
Jun 08, 2020
by
Johan Richard
Browse files
adjusted eps in setBayesModel and keep const in dprofile
parent
330c7c96
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/fonction.h
View file @
9cc7b673
...
...
@@ -109,7 +109,7 @@ double dist(struct point A, struct point B);
double
dlumcosmo1
(
double
z
);
void
do_itos
(
double
**
im
,
struct
pixlist
*
pl
,
int
npl
,
double
dlsds
,
double
zs
,
double
**
source
,
double
**
erreur
,
int
**
imult
);
double
d_poisson
(
double
xm
,
int
*
idum
);
double
d_profil
(
double
x
,
double
y
,
struct
galaxie
*
gal
);
double
d_profil
(
double
x
,
double
y
,
const
struct
galaxie
*
gal
);
double
d_random
(
int
*
idum
);
double
dratio
(
double
zl
,
double
zs
);
void
dratio_gal
(
struct
galaxie
*
arclet
,
double
zl
);
...
...
src/d_profil.c
View file @
9cc7b673
...
...
@@ -23,7 +23,7 @@
* alpha=1/(e*l)
*/
double
d_profil
(
double
x
,
double
y
,
struct
galaxie
*
gal
)
double
d_profil
(
double
x
,
double
y
,
const
struct
galaxie
*
gal
)
{
double
xx
,
yy
,
xxx
,
yyy
;
double
res
;
...
...
@@ -33,8 +33,8 @@ double d_profil(double x, double y, struct galaxie *gal)
res
=
0
;
//jrichard
//
Recompute
E.b according to E.a and eps
gal
->
E
.
b
=
gal
->
E
.
a
*
(
1
-
gal
->
eps
)
/
(
1
+
gal
->
eps
);
//
Test
E.b according to E.a and eps
//fprintf(stderr,"%f\n",
gal->E.a*(1-gal->eps)/(1+gal->eps)
-gal->E.b)
;
if
(
gal
->
c
==
's'
)
{
...
...
src/readBayesModels.c
View file @
9cc7b673
...
...
@@ -294,6 +294,9 @@ void setBayesModel( long int iVal, long int nVal, double **array)
if
(
sblock
[
i
][
ipx
]
!=
0
)
o_set_source
(
&
source
[
i
],
ipx
,
method
(
nVal
,
iParam
++
,
array
));
if
((
sblock
[
i
][
SEPS
]
!=
0
)
||
(
sblock
[
i
][
SA
]
!=
0
))
source
[
i
].
E
.
b
=
source
[
i
].
E
.
a
*
(
1
.
-
source
[
i
].
eps
)
/
(
1
.
+
source
[
i
].
eps
);
}
}
...
...
@@ -845,7 +848,6 @@ static void convertArray(long int nVal, double **array )
{
if
(
ipx
==
STHETA
)
array
[
nParam
][
iVal
]
=
array
[
nParam
][
iVal
]
*
DTR
;
nParam
++
;
}
}
...
...
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