Commit 088f1fdd authored by Johan Richard's avatar Johan Richard
Browse files

Corrected feature in best/bestopt

parent 962e6faa
......@@ -176,8 +176,10 @@ void o_print_res(double chi0, double evidence)
// RUNMODE
fprintf(best, "runmode\n");
fprintf(best, "\treference %d %lf %lf\n", M.iref, M.ref_ra, M.ref_dec);
fprintf(best, "\timage %d %s\n", M.image, M.imafile);
fprintf(best, "\tsource %d %s\n", M.source, M.sourfile);
if(M.image)
fprintf(best, "\timage %d %s\n", M.image, M.imafile);
if(M.source)
fprintf(best, "\tsource %d %s\n", M.source, M.sourfile);
if (M.study)
fprintf(best, "\tstudy %d %s\n", M.study, M.studyfile);
if (M.seeing)
......@@ -213,7 +215,7 @@ void o_print_res(double chi0, double evidence)
fprintf(best, "\tend\n");
// SOURCE
if (M.image != 0 || M.source != 0)
if (M.source != 0)
{
fprintf(best, "source\n");
fprintf(best, "\tz_source %.6lf\n", S.zs);
......@@ -221,7 +223,7 @@ void o_print_res(double chi0, double evidence)
};
// IMAGE
if (I.nzlim != 0 || I.zarclet > 0)
if (I.nzlim != 0 || I.zarclet > 0 || I.newton>0)
{
fprintf(best, "image\n");
for( i = 0; i < I.nzlim; i++ )
......@@ -234,6 +236,9 @@ void o_print_res(double chi0, double evidence)
if( I.zarclet > 0 )
fprintf(best, "\tz_arclet %lf\n", I.zarclet);
if( I.newton > 0 )
fprintf(best, "\tnewton %d\n", I.newton);
fprintf(best, "\tend\n");
}
......@@ -417,7 +422,8 @@ void o_print_res(double chi0, double evidence)
// RUNMODE
fprintf(besto, "runmode\n");
fprintf(besto, "\treference %d %lf %lf\n", M.iref, M.ref_ra, M.ref_dec);
fprintf(besto, "\timage %d %s\n", M.image, M.imafile);
if (M.image)
fprintf(besto, "\timage %d %s\n", M.image, M.imafile);
if( strcmp(M.sourfile, "source.best") )
fprintf(besto, "\tsource %d %s\n", M.source, M.sourfile);
......@@ -468,6 +474,9 @@ void o_print_res(double chi0, double evidence)
if (I.zarclet > 0)
fprintf(besto, "\tz_arclet %lf\n", I.zarclet);
if (I.newton > 0 )
fprintf(besto, "\tnewton %d\n", I.newton);
if (zalim.bk > 0)
fprintf(besto, "\tz_a_limit %d %lf %lf\n", zalim.bk, zalim.min, zalim.max);
......
......@@ -136,7 +136,7 @@ int main( int argc, char** argv )
strcpy(M.sourfile, "source.best" );
M.source = 0;
M.image=1;
M.image=0;
evidence=0.;
//recover evidence from burnin if it exists
......
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