Commit 42cc33d7 authored by Johan Richard's avatar Johan Richard
Browse files

Corrected ellipticity in shapemodel optimisation: rescale

parent 83060a1a
......@@ -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++ )
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment