Commit 62ea163d authored by Eric Jullo's avatar Eric Jullo
Browse files

Remove duplicate call to the function e_grad2() for ampli mode 4,5 and 6

parent bf36aed3
......@@ -129,16 +129,21 @@ void g_ampli(int iamp, int np, double z, char *file)
for (i = 0; i < np; i++)
{
pi.x = i * (F.xmax - F.xmin) / (np - 1) + F.xmin;
amp = e_unmag(&pi, dl0s, dos, z);
/*amplification*/
if (iamp == 1)
if (iamp == 1) {
amp = e_unmag(&pi, dl0s, dos, z);
ampli[j][i] = 1. / (amp.a * amp.b);
}
/*absolute value of amplification*/
else if (iamp == 2)
else if (iamp == 2) {
amp = e_unmag(&pi, dl0s, dos, z);
ampli[j][i] = 1. / fabs(amp.a * amp.b);
}
/*amplification in magnitudes*/
else if (iamp == 3)
else if (iamp == 3) {
amp = e_unmag(&pi, dl0s, dos, z);
ampli[j][i] = -2.5 * log10(fabs(amp.a * amp.b));
}
/**/
else if (iamp == 4)
{
......@@ -177,8 +182,10 @@ void g_ampli(int iamp, int np, double z, char *file)
ampli[j][i] = gam;
}
/*amplification^-1*/
else
else {
amp = e_unmag(&pi, dl0s, dos, z);
ampli[j][i] = (amp.a * amp.b);
}
};
};
......
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