changed order of files and output format - only ints - no strings

This commit is contained in:
John Beale
2026-07-06 16:05:32 +02:00
parent 7c096f72f8
commit 7d9fc42457
+5 -5
View File
@@ -22,11 +22,11 @@ import re
HEADER = "Reflections measured after indexing"
ROW_ORDER = [
"Number of crystals",
"Wavelength",
"Resolution range",
"Space group",
"Unit cell",
"Number of crystals",
"Total reflections",
"Unique reflections",
"Multiplicity",
@@ -137,9 +137,9 @@ def gather_stats(proc_dir, stream_file=None):
"Resolution range": f"{low_res:.2f} - {high_res:.2f} ({shell_low:.2f} - {shell_high:.2f})",
"Space group": spacegroup or "N/A",
"Unit cell": " ".join(f"{v:.2f}" for v in cell) if cell else "N/A",
"Number of crystals": f"{n_crystals:,}" if n_crystals is not None else "N/A",
"Total reflections": f"{total_measurements:,}" if total_measurements is not None else "N/A",
"Unique reflections": f"{total_unique:,} ({shell_unique:,})" if total_unique is not None else "N/A",
"Number of crystals": n_crystals if n_crystals is not None else "N/A",
"Total reflections": total_measurements if total_measurements is not None else "N/A",
"Unique reflections": f"{total_unique} ({shell_unique})" if total_unique is not None else "N/A",
"Multiplicity": f"{overall_mult:.2f} ({shell_mult:.2f})" if overall_mult is not None else "N/A",
"Completeness (%)": f"{overall_comp:.2f} ({shell_comp:.2f})" if overall_comp is not None else "N/A",
"Mean I/sigma(I)": f"{overall_snr:.2f} ({shell_snr:.2f})" if overall_snr is not None else "N/A",
@@ -187,7 +187,7 @@ def main():
for row in ROW_ORDER:
rows.append([row] + [columns[label][row] for label in columns])
print("\n".join(", ".join(row) for row in rows))
print("\n".join(", ".join(str(v) for v in row) for row in rows))
if args.output:
with open(args.output, "w", newline="") as f: