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

Merge branch 'master' into newcleanset1

parents e19c4c9d 3d70edc2
......@@ -101,6 +101,42 @@ void checkpar()
}
}
//Double check potentials
for (i = 0; i < G.nlens; i++)
{
if (lens[i].type == 17)
{
if((lens[i].gamma1file[0]==0)||(lens[i].gamma2file[0]==0)||(lens[i].kappafile[0]==0))
{
if((lens[i].gamma1file[0]==0)&&(lens[i].gamma2file[0]==0)&&(lens[i].kappafile[0]==0))
fprintf(stderr, "WARNING: No convergence / shear file provided for potential %d. Magnifications / Shapes will not be correctly computed.\n", i+1);
else
{
fprintf(stderr, "ERROR: Missing convergence or shear file for potential %d. \n", i+1);
exit(-1);
}
}
if((lens[i].dplxfile[0]==0)||(lens[i].dplyfile[0]==0))
{
if((lens[i].dplxfile[0]==0)&&(lens[i].dplyfile[0]==0))
fprintf(stderr, "WARNING: No displacement file provided for potential %d. Predicted positions / displacements will not be correctly computed.\n", i+1);
else
{
fprintf(stderr, "ERROR: Missing displacement file for potential %d. \n", i+1);
exit(-1);
}
}
if(lens[i].potenfile[0]==0)
{
fprintf(stderr, "WARNING: No potential map provided for potential %d. Time delays will not be correctly computed.\n", i+1);
}
}
return;
printf("#REFERENCE 0 %.7f %.7f\n", M.ref_ra, M.ref_dec );
......@@ -170,4 +206,8 @@ void checkpar()
};
};
}
printf("COUCOU %d\n",lens[i].type);
}
......@@ -371,8 +371,10 @@ void pixelsource(int np, char *iname)
}
}
//if (O.setseeing)
// d_seeing(zz, nx, ny, scale);
if (O.setseeing)
d_seeing(zz, nx, ny, scale);
d_seeing_omp(zz, nx, ny, scale); // mod bclement shapemodel_opt
ny_sav = ny;
if (O.setbin)
......
......@@ -598,8 +598,8 @@ void o_print_res(double chi0, double evidence)
fprintf(besto, "\ts_angle2 %.6lf\n", source[i].E2.theta * RTD);
fprintf(besto, "\ts_mag2 %.6lf\n", source[i].mag2);
fprintf(besto, "\ts_index2 %.6lf\n", source[i].var2);
fprintf(besto, "\tend\n");
}
fprintf(besto, "\tend\n");
// SHAPE LIMITS
fprintf(besto, "shapelimit\n");
......
......@@ -29,6 +29,7 @@ void set_default()
extern struct g_cline CL;
extern struct g_observ O;/* default flux dispersion^2 */
extern struct g_pot P[NPOTFILE];
extern struct pot lens[NLMAX];
extern struct ipot ip;
extern struct sigposStr sigposAs;
extern struct g_pixel ps, imFrame;
......@@ -183,6 +184,17 @@ void set_default()
ps.ny = 40;
ps.pixfile[0] = 0;
for( i = 0; i < NLMAX; i++ )
{
lens[i].gamma1file[0]=0;
lens[i].gamma2file[0]=0;
lens[i].kappafile[0]=0;
lens[i].dplxfile[0]=0;
lens[i].dplyfile[0]=0;
lens[i].potenfile[0]=0;
}
/* potfile */
for( i = 0; i < NPOTFILE; i++ )
......
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