Commit a14ffd50 authored by Johan Richard's avatar Johan Richard
Browse files

Added index and type in shapemodel/limit bestopt and rescale parameters

parent 906d797d
......@@ -547,6 +547,8 @@ void o_print_res(double chi0, double evidence)
fprintf(besto, "\ts_sigx %.6lf\n", source[i].E.a);
fprintf(besto, "\ts_sigy %.6lf\n", source[i].E.b);
fprintf(besto, "\tmag %.6lf\n", source[i].mag);
fprintf(besto, "\ttype %d\n", source[i].type);
fprintf(besto, "\tindex %.6lf\n", source[i].var1);
fprintf(besto, "\tend\n");
// SHAPE LIMITS
......@@ -563,6 +565,8 @@ void o_print_res(double chi0, double evidence)
fprintf(besto, "\ts_sigy %d %.6lf %.6lf\n", sblock[i][SB], smin[i].E.b, smax[i].E.b);
if( sblock[i][SFLUX] )
fprintf(besto, "\tmag %d %.6lf %.6lf\n", sblock[i][SFLUX], smin[i].mag, smax[i].mag);
if( sblock[i][SINDEX] )
fprintf(besto, "\tindex %d %.6lf %.6lf\n", sblock[i][SINDEX], smin[i].var1, smax[i].var1);
fprintf(besto, "\tend\n");
}
......@@ -828,7 +832,7 @@ static void writePotentiel(FILE *best, long int i, int flag)
}
else
{
if (lens[i].type != 0 && fabs(lens[i].type) != 1 && lens[i].type != 7)
if (lens[i].type != 0 && abs(lens[i].type) != 1 && lens[i].type != 7)
{
if( flag & 1 ) fprintf(best, "\tcore_radius %.6lf\n", lens[i].rc);
if( flag & 2 ) fprintf(best, "\tcore_radius_kpc %.6lf\n", lens[i].rckpc );
......
......@@ -270,6 +270,9 @@ int rescaleParam(int id, int type, int ipx, double *pval)
case(STHETA):
val = prior(sblock[id][STHETA], val, smin[id].E.theta, smax[id].E.theta);
break;
case(SINDEX):
val = prior(sblock[id][SINDEX], val, smin[id].var1, smax[id].var1);
break;
case(SFLUX):
val = prior(sblock[id][SFLUX], val, smin[id].mag, smax[id].mag);
break;
......
......@@ -99,6 +99,9 @@ void o_set_lmax(int i, int ipx, double x)
case(SFLUX):
smax[i].mag = x;
break;
case(SINDEX):
smax[i].var1 = x;
break;
case(VFCX):
vfmax.C.x = x;
break;
......
......@@ -100,6 +100,9 @@ void o_set_lmin(int i, int ipx, double x)
case(SFLUX):
smin[i].mag = x;
break;
case(SINDEX):
smin[i].var1 = x;
break;
case(VFCX):
vfmin.C.x = x;
break;
......
Supports Markdown
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