Skip to content
Snippets Groups Projects
Commit 3c6365e2 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Merge branch 'rosalba_output' into 'master'

Output insertion format

See merge request giacomo.mulas/np_tmcode!36
parents 2cd3ef3d 9fc461d5
No related branches found
No related tags found
No related merge requests found
......@@ -1158,9 +1158,11 @@ int cluster_jxi488_cycle(int jxi488, ScattererConfiguration *sconf, GeometryConf
output->append_line(virtual_line);
sprintf(virtual_line, " Fk=%15.7lE\n\0", fz);
output->append_line(virtual_line);
double alamb = 2.0 * 3.141592653589793 / cid->vk;
sprintf(virtual_line, "INSERTION: CSM_CLUSTER %15.7lE%15.7lE%15.7lE%15.7lE\n\0", alamb, scasm, abssm, extsm);
output->append_line(virtual_line);
if (ilr210 == 1) {
double alamb = 2.0 * 3.141592653589793 / cid->vk;
sprintf(virtual_line, "INSERTION: CSM_CLUSTER %15.7lE%15.7lE%15.7lE%15.7lE\n\0", alamb, scasm, abssm, extsm);
output->append_line(virtual_line);
}
} // ilr210 loop
double rmbrif = (real(cid->c1ao->fsacm[0][0]) - real(cid->c1ao->fsacm[1][1])) / real(cid->c1ao->fsacm[0][0]);
double rmdchr = (imag(cid->c1ao->fsacm[0][0]) - imag(cid->c1ao->fsacm[1][1])) / imag(cid->c1ao->fsacm[0][0]);
......@@ -1432,9 +1434,9 @@ int cluster_jxi488_cycle(int jxi488, ScattererConfiguration *sconf, GeometryConf
output->append_line(virtual_line);
double alamb = 2.0 * 3.141592653589793 / cid->vk;
if (ilr290 == 1) {
sprintf(virtual_line, "INSERTION: CS1_CLUSTER %9.2lf%9.2lf%9.2lf%9.2lf%9.2lf%13.5lf%13.5lf%13.5lf\n\0", alamb, th, ph, ths, phs, scasec, abssec, extsec);
sprintf(virtual_line, "INSERTION: CS1_CLUSTER %13.5lE%10.3lE%10.3lE%15.7lE%15.7lE%15.7lE\n\0", alamb, th, ths, scasec, abssec, extsec);
} else if (ilr290 == 2) {
sprintf(virtual_line, "INSERTION: CS2_CLUSTER %9.2lf%9.2lf%9.2lf%9.2lf%9.2lf%13.5lf%13.5lf%13.5lf\n\0", alamb, th, ph, ths, phs, scasec, abssec, extsec);
sprintf(virtual_line, "INSERTION: CS2_CLUSTER %13.5lE%10.3lE%10.3lE%15.7lE%15.7lE%15.7lE\n\0", alamb, th, ths, scasec, abssec, extsec);
}
output->append_line(virtual_line);
bool goto190 = isam >= 0 && (jths > 1 || jphs > 1);
......
......@@ -170,11 +170,12 @@ def compare_files(config):
c_lines = [c_file.readline()]
if (c_lines[0].startswith("INSERTION:")):
c_lines = [c_file.readline()]
num_read_lines += 1
num_read_lines += 1
# Start here the comparison loop
if (len(f_lines) == len(c_lines)):
for li in range(len(f_lines)):
line_result = compare_lines(f_lines[li], c_lines[li], config, li + 1, num_len, l_file)
line_result = compare_lines(f_lines[li], c_lines[li], config, num_read_lines, num_len, l_file)
mismatch_count['errors'] += line_result[0]
mismatch_count['warnings'] += line_result[1]
mismatch_count['noisy'] += line_result[2]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment