Commit 81198925 authored by Mulas, Giacomo's avatar Mulas, Giacomo
Browse files

For some reason, I missed some commits you did

Merge branch 'virtualize_output' of git.ia2.inaf.it:giacomo.mulas/np_tmcode into virtualize_output
parents 2244fd0c 8da1f295
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -905,6 +905,9 @@ int cluster_jxi488_cycle(int jxi488, ScattererConfiguration *sconf, GeometryConf
      output->append_line(virtual_line);
      sprintf(virtual_line, "  FSAS=%15.7lE%15.7lE\n\0", real(cid->c1->fsas[i]), imag(cid->c1->fsas[i]));
      output->append_line(virtual_line);
      double alamb = 2.0 * 3.141592653589793 / cid->vk;
      sprintf(virtual_line, "INSERTION: CS_SPHERE  %15.7lE%15.7lE%15.7lE%15.7lE\n\0", alamb, cid->c1->sscs[i], cid->c1->sabs[i], cid->c1->sexs[i]);
      output->append_line(virtual_line);
      csch = 2.0 * cid->vk * cid->sqsfi / cid->c1->gcsv[i];
      s0 = cid->c1->fsas[i] * exri;
      qschu = imag(s0) * csch;
@@ -1152,6 +1155,9 @@ 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);
	    } // 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]);
@@ -1421,6 +1427,13 @@ int cluster_jxi488_cycle(int jxi488, ScattererConfiguration *sconf, GeometryConf
		    qschu, pschu, s0mag
		    );
	    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);
	    } 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);
	    }
	    output->append_line(virtual_line);
	    bool goto190 = isam >= 0 && (jths > 1 || jphs > 1);
	    if (!goto190) {
	      cid->gapv[0] = cid->gap[0][ilr290 - 1];
+6 −2
Original line number Diff line number Diff line
@@ -115,6 +115,8 @@ def compare_files(config):
        print("INFO: using line-wise mode")
        print("INFO: counting result lines...")
        while (f_lines[0] != ''):
            if (c_lines[0].startswith("INSERTION:")):
                c_lines = [c_file.readline()]
            if (c_lines[0] != ''):
                line_count += 1
            else:
@@ -166,6 +168,8 @@ def compare_files(config):
        else:
            f_lines = [fortran_file.readline()]
            c_lines = [c_file.readline()]
            if (c_lines[0].startswith("INSERTION:")):
                c_lines = [c_file.readline()]
            num_read_lines += 1
        # Start here the comparison loop
        if (len(f_lines) == len(c_lines)):
@@ -429,7 +433,7 @@ def parse_arguments():
        'fortran_file_name': '',
        'c_file_name': '',
        'full_log': False,
        'linewise': False,
        'linewise': True,
        'log_html': False,
        'html_output': 'pycompare.html',
        'warning_threshold': 0.005,
@@ -475,7 +479,7 @@ def print_help():
    print("--full                    Print all lines to log file (default prints only mismatches).")
    print("--help                    Print this help and exit.")
    print("--html[=OPT_OUTPUT_NAME]  Enable logging to HTML file (default logs to \"pycompare.html\").")
    print("--linewise                Load only one line at a time. Useful to compare big files (false by default).")
    print("--linewise                Load only one line at a time. Useful to compare big files (True by default).")
    print("--quick                   Stop on first mismatch (default is to perform a full check).")
    print("--warn                    Set a fractional threshold for numeric warning (default = 0.005).")
    print("                                            ")