Commit 703a5a71 authored by Johan Richard's avatar Johan Richard
Browse files

removed default French keywords in best/bestopt

parent 4b2e2a9c
......@@ -143,11 +143,11 @@ int init_grille(char *infile, int noedit)
{
r_dynfile(IN,OUT);
}
else if (!strncmp(first, "grande", 6))
else if ((!strncmp(first, "grande", 6))||(!strncmp(first,"large",5)))
r_large(IN, OUT);
else if (!strncmp(first, "observ", 6))
r_observ(IN, OUT);
else if (!strcmp(first, "champ"))
else if (!strcmp(first, "field"))
r_frame(IN, OUT);
else if (!strcmp(first, "vfield"))
r_vfield(IN, OUT);
......@@ -158,7 +158,7 @@ int init_grille(char *infile, int noedit)
else if (!strcmp(first, "cosmolimit"))
r_cosmolimit(IN, OUT);
}
while (strcmp(first, "fini") != 0 );
while (strncmp(first, "fini", 4) != 0 );
fclose(IN);
fflush(OUT);
......
......@@ -155,8 +155,8 @@ void o_print_res(double chi0, double evidence)
fprintf(best, "#Chi2pos: %.6lf\n", chip);
fprintf(best, "#Chi2_vel: %.6lf\n",chi_vel); //THIS IS MINE
fprintf(best, "#Chi2_mass: %.6lf\n",chi_mass); //THIS IS MINE
fprintf(best, "#Chi2formex: %.6lf\n", chix);
fprintf(best, "#Chi2formey: %.6lf\n", chiy);
fprintf(best, "#Chi2formx: %.6lf\n", chix);
fprintf(best, "#Chi2formy: %.6lf\n", chiy);
fprintf(best, "#Chi2l: %.6lf\n", chil);
if ( M.inverse == 3 )
fprintf( best, "#log(Evidence): %.6lf\n", evidence);
......@@ -193,17 +193,17 @@ void o_print_res(double chi0, double evidence)
if (M.ishearf)
fprintf(best, "\tshearfield %d %.6lf %s %d\n", M.ishearf, M.zshearf, M.shearffile, M.nshearf);
if (M.grille)
fprintf(best, "\tgrille %d %d %lf\n", M.grille, M.ngrille, M.zgrille);
fprintf(best, "\tgrid %d %d %lf\n", M.grille, M.ngrille, M.zgrille);
if (M.pixel)
fprintf(best, "\tpixel %d %d %s\n", M.pixel, M.npixel, M.pixelfile);
fprintf(best, "\tend\n");
// GRILLE
fprintf(best, "grille\n");
fprintf(best, "\tnombre %d\n", G.ngrid);
fprintf(best, "\tpolaire %d\n", 0);
fprintf(best, "\tnlentille %ld\n", G.nlens);
fprintf(best, "grid\n");
fprintf(best, "\tnumber %d\n", G.ngrid);
fprintf(best, "\tpolar %d\n", 0);
fprintf(best, "\tnlens %ld\n", G.nlens);
if ( strcmp(CL.algorithm, "MARCHINGSQUARES") )
fprintf(best, "\tnlens_crit %ld\n", G.nlens_crit);
if ( sigposAs.bk != 0 )
......@@ -335,7 +335,7 @@ void o_print_res(double chi0, double evidence)
fprintf(best, "grande\n");
fprintf(best, "\tiso %d %d %.6lf %.6lf %.6lf\n", L.iso, L.nmaxiso, L.scale, L.zonex, L.zoney);
fprintf(best, "\tname best\n");
fprintf(best, "\tprofil %d %d\n", L.profil, L.pt);
fprintf(best, "\tprofile %d %d\n", L.profil, L.pt);
fprintf(best, "\tcontour %d %d\n", L.ncourbe, L.pt);
fprintf(best, "\tlarge_dist %.6lf\n", L.dlarge);
fprintf(best, "\tend\n");
......@@ -352,7 +352,7 @@ void o_print_res(double chi0, double evidence)
fprintf(best, "\tpsf %d %s\n", O.setseeing, O.psffile);
fprintf(best, "\tbinning %d %d\n", O.setbin, O.bin);
fprintf(best, "\tbruit %d\n", O.bruit);
fprintf(best, "\tnoise %d\n", O.bruit);
fprintf(best, "\tSKY %.6lf\n", O.SKY);
if( O.gain > 0 )
fprintf(best, "\tdispersion %.6lf\n", sqrt(O.SKY / O.gain));
......@@ -378,7 +378,7 @@ void o_print_res(double chi0, double evidence)
}
// COSMOLOGY
fprintf(best, "cosmologie\n");
fprintf(best, "cosmology\n");
fprintf(best,"\tmodel %d\n",C.model);
fprintf(best, "\tH0 %.6lf\n", C.H0);
fprintf(best, "\tomegaM %.6lf\n", C.omegaM);
......@@ -389,7 +389,7 @@ void o_print_res(double chi0, double evidence)
fprintf(best, "\tend\n");
// CHAMP
fprintf(best, "champ\n");
fprintf(best, "field\n");
fprintf(best, "\txmin %.6lf\n", F.xmin);
fprintf(best, "\txmax %.6lf\n", F.xmax);
fprintf(best, "\tymin %.6lf\n", F.ymin);
......@@ -402,7 +402,7 @@ void o_print_res(double chi0, double evidence)
fprintf(best, "\tend\n");
fprintf(best, "fini\n");
fprintf(best, "finish\n");
fclose(best);
......@@ -431,8 +431,8 @@ void o_print_res(double chi0, double evidence)
fprintf(besto, "#Chi2pos: %.6lf\n", chip);
fprintf(besto, "#Chi2_vel: %.6lf\n",chi_vel); //THIS IS MINE TV
fprintf(besto, "#Chi2_mass: %.6lf\n",chi_mass); //THIS IS MINE TV
fprintf(besto, "#Chi2formex: %.6lf\n", chix);
fprintf(besto, "#Chi2formey: %.6lf\n", chiy);
fprintf(besto, "#Chi2formx: %.6lf\n", chix);
fprintf(besto, "#Chi2formy: %.6lf\n", chiy);
fprintf(besto, "#Chi2l: %.6lf\n", chil);
if ( M.inverse == 3 )
fprintf( besto, "#log(Evidence): %.6lf\n", evidence);
......@@ -463,7 +463,7 @@ void o_print_res(double chi0, double evidence)
if (M.ishearf)
fprintf(besto, "\tshearfield %d %.6lf %s %d\n", M.ishearf, M.zshearf, M.shearffile, M.nshearf);
if (M.grille)
fprintf(besto, "\tgrille %d %d %lf\n", M.grille, M.ngrille, M.zgrille);
fprintf(besto, "\tgrid %d %d %lf\n", M.grille, M.ngrille, M.zgrille);
if (M.pixel)
fprintf(besto, "\tpixel %d %d %s\n", M.pixel, M.npixel, M.pixelfile);
......@@ -472,7 +472,7 @@ void o_print_res(double chi0, double evidence)
// IMAGE
fprintf(besto, "image\n");
fprintf(besto, "\tmultfile %d %s\n", I.n_mult, I.multfile);
fprintf(besto, "\tforme %d\n", I.forme);
fprintf(besto, "\tform %d\n", I.forme);
if (I.stat > 0)
fprintf(besto, "\tarcletstat %d %d %s\n", I.stat, I.statmode, I.arclet);
......@@ -509,10 +509,10 @@ void o_print_res(double chi0, double evidence)
fprintf(besto, "\tend\n");
// GRILLE
fprintf(besto, "grille\n");
fprintf(besto, "\tnombre %d\n", G.ngrid);
fprintf(besto, "\tpolaire %d\n", 0);
fprintf(besto, "\tnlentille %ld\n", G.nlens);
fprintf(besto, "grid\n");
fprintf(besto, "\tnumber %d\n", G.ngrid);
fprintf(besto, "\tpolar %d\n", 0);
fprintf(besto, "\tnlens %ld\n", G.nlens);
if ( strcmp(CL.algorithm, "MARCHINGSQUARES") )
fprintf(besto, "\tnlens_crit %ld\n", G.nlens_crit);
......@@ -685,11 +685,12 @@ void o_print_res(double chi0, double evidence)
}
// GRANDE
fprintf(besto, "grande\n");
fprintf(besto, "large\n");
fprintf(besto, "\tiso %d %d %.6lf %.6lf %.6lf\n", L.iso, L.nmaxiso, L.scale, L.zonex, L.zoney);
fprintf(besto, "\tname best\n");
fprintf(besto, "\tprofil %d %d\n", L.profil, L.pt);
fprintf(besto, "\tprofile %d %d\n", L.profil, L.pt);
fprintf(besto, "\tcontour %d %d\n", L.ncourbe, L.pt);
fprintf(besto, "\tvelocity %d\n", L.vitesse);
fprintf(besto, "\tlarge_dist %.6lf\n", L.dlarge);
fprintf(besto, "\tend\n");
......@@ -705,7 +706,7 @@ void o_print_res(double chi0, double evidence)
fprintf(besto, "\tpsf %d %s\n", O.setseeing, O.psffile);
fprintf(besto, "\tbinning %d %d\n", O.setbin, O.bin);
fprintf(besto, "\tbruit %d\n", O.bruit);
fprintf(besto, "\tnoise %d\n", O.bruit);
fprintf(besto, "\tSKY %.6lf\n", O.SKY);
if( O.gain > 0 )
fprintf(besto, "\tdispersion %.6lf\n", sqrt(O.SKY / O.gain));
......@@ -743,7 +744,7 @@ void o_print_res(double chi0, double evidence)
}
// COSMOLOGY
fprintf(besto, "cosmologie\n");
fprintf(besto, "cosmology\n");
fprintf(besto,"\tmodel %d\n",C.model);
fprintf(besto, "\tH0 %.6lf\n", C.H0);
fprintf(besto, "\tomegaM %.6lf\n", C.omegaM);
......@@ -766,7 +767,7 @@ void o_print_res(double chi0, double evidence)
fprintf(besto, "\tend\n");
// CHAMP
fprintf(besto, "champ\n");
fprintf(besto, "field\n");
fprintf(besto, "\txmin %.6lf\n", F.xmin);
fprintf(besto, "\txmax %.6lf\n", F.xmax);
fprintf(besto, "\tymin %.6lf\n", F.ymin);
......@@ -794,7 +795,7 @@ void o_print_res(double chi0, double evidence)
}
/* Write a potentiel section in best file
/* Write a potential section in best file
* flag = 1 : print values in arcsec
* flag = 2 : print values in kpc
* flag = 3 : print values in arcsec and kpc
......@@ -803,8 +804,8 @@ static void writePotentiel(FILE *best, long int i, int flag)
{
extern struct pot lens[];
fprintf(best, "potentiel %s\n", lens[i].n);
fprintf(best, "\tprofil %d\n", lens[i].type);
fprintf(best, "potential %s\n", lens[i].n);
fprintf(best, "\tprofile %d\n", lens[i].type);
if (lens[i].type == 9 )
{
fprintf(best, "\trhos %.4lf\n", lens[i].pmass);
......@@ -837,7 +838,7 @@ static void writePotentiel(FILE *best, long int i, int flag)
fprintf(best, "\ty_centre %.6lf\n", lens[i].C.y);
if (lens[i].type != 0 && lens[i].type != 2 && lens[i].type != 7)
{
fprintf(best, "\tellipticite %.6lf\n", lens[i].emass);
fprintf(best, "\tellipticity %.6lf\n", lens[i].emass);
if ( lens[i].type == 121 )
{
fprintf(best,"\ttheta %.6lf\n",lens[i].theta*RTD); // triaxial NFW
......@@ -937,7 +938,7 @@ static void writeLimit(FILE *best, long int i)
{
if(lens[i].type!=14)
{
fprintf(best, "\tellipticite %d %.6lf %.6lf %.6lf\n", block[i][EMASS],
fprintf(best, "\tellipticity %d %.6lf %.6lf %.6lf\n", block[i][EMASS],
lmin[i].emass, lmax[i].emass, prec[i].epot);
}
else
......
......@@ -118,7 +118,7 @@ void r_image(FILE *IN, FILE *OUT)
fprintf(OUT, "\t%s\t\t%lf\n", second, I.Dmag);
}
else if (!strcmp(second, "forme"))
else if ((!strcmp(second, "forme"))||(!strcmp(second, "form")))
{
sscanf(third, "%d", &I.forme);
......
......@@ -40,7 +40,7 @@ void r_large(FILE *IN, FILE *OUT)
sscanf(third, "%s", L.iname);
fprintf(OUT, "\t%s\t%s\n", second, L.iname);
}
else if (!strcmp(second, "profil"))
else if (!strncmp(second, "profil", 6))
{
sscanf(third, "%d%d", &L.profil, &L.pt);
fprintf(OUT, "\t%s\t%d %d\n", second, L.profil, L.pt);
......@@ -50,7 +50,7 @@ void r_large(FILE *IN, FILE *OUT)
sscanf(third, "%d%d", &L.ncourbe, &L.npt);
fprintf(OUT, "\t%s\t%d %d\n", second, L.ncourbe, L.npt);
}
else if (!strcmp(second, "vitesse"))
else if ((!strcmp(second, "vitesse"))||(!strcmp(second,"velocity")))
{
sscanf(third, "%d", &L.vitesse);
fprintf(OUT, "\t%s\t%d\n", second, L.vitesse);
......
......@@ -31,7 +31,7 @@ void r_observ(FILE *IN, FILE *OUT)
flire(IN, third);
CHECK_THIRD(FILENAME_SIZE+10)
if (!strcmp(second, "bruit"))
if ((!strcmp(second, "bruit"))||(!strcmp(second,"noise")))
{
sscanf(third, "%d", &O.bruit);
fprintf(OUT, "\t%s\t\t%d\n", second, O.bruit);
......
......@@ -98,7 +98,7 @@ void r_runmode(FILE *IN, FILE *OUT)
sscanf(third, "%lf", &M.seeing);
fprintf(OUT, "\t%s\t%lf\n", second, M.seeing);
}
else if (!strcmp(second, "grille"))
else if (!strcmp(second, "grille") || (!strcmp(second, "grid")))
{
sscanf(third, "%d%d%lf", &M.grille, &M.ngrille, &M.zgrille);
......
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