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
42cc33d7
Commit
42cc33d7
authored
Apr 28, 2020
by
Johan Richard
Browse files
Corrected ellipticity in shapemodel optimisation: rescale
parent
83060a1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/o_rescale.c
View file @
42cc33d7
...
...
@@ -508,6 +508,7 @@ int rescaleCube_1Atom(double *cube, int npar)
extern
int
block
[][
NPAMAX
];
extern
int
cblock
[
NPAMAX
];
extern
int
sblock
[
NFMAX
][
NPAMAX
];
extern
struct
galaxie
source
[
NFMAX
];
extern
int
vfblock
[
NPAMAX
];
extern
double
*
np_b0
;
// non parametric accelerator (o_global.c)
...
...
@@ -548,9 +549,13 @@ int rescaleCube_1Atom(double *cube, int npar)
// Rescale the source parameters
if
(
M
.
iclean
==
2
)
for
(
k
=
0
;
k
<
S
.
ns
;
k
++
)
{
for
(
ipx
=
SCX
;
ipx
<=
SFLUX
;
ipx
++
)
if
(
sblock
[
k
][
ipx
]
!=
0
)
valid
*=
rescaleParam
(
k
,
SOURCES
,
ipx
,
&
cube
[
ipar
++
]);
if
(
source
[
k
].
eps
>=
0
)
source
[
k
].
E
.
b
=
source
[
k
].
E
.
a
*
(
1
.
-
source
[
k
].
eps
)
/
(
1
.
+
source
[
k
].
eps
);
}
// rescale the cosmological parameters
for
(
ipx
=
OMEGAM
;
ipx
<=
WA
;
ipx
++
)
...
...
src/r_shapemodel.c
View file @
42cc33d7
...
...
@@ -26,6 +26,7 @@ void r_shapemodel(FILE *IN,FILE *OUT, long int i)
sshape
->
C
.
x
=
sshape
->
C
.
y
=
0
.;
sshape
->
E
.
a
=
sshape
->
E
.
b
=
sshape
->
E
.
theta
=
0
.;
sshape
->
eps
=
-
1
;
// no ellipticity defined originally
sshape
->
mag
=
0
;
sshape
->
z
=
0
;
sshape
->
dl0s
=
sshape
->
dos
=
sshape
->
dr
=
-
1
;
...
...
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