style: apply black formatting to pending files

This commit is contained in:
2026-09-30 10:41:28 +03:00
parent ea4b652ccb
commit 6bb7b950c7
2 changed files with 4 additions and 10 deletions
+1 -5
View File
@@ -189,11 +189,7 @@ def _apply_figure_header(fig: Figure, meta: Dict[str, Any]) -> None:
"""Write the figure header/footer lines from the CSV metadata."""
e_step_keV = (meta["e_step_MeV"] or 0.0) * 1000.0
endpoint = meta["endpoint_keV"]
header = (
f"{meta['nuclide']} "
f"| E₀={endpoint:.1f} keV "
f"| ΔE={e_step_keV:.1f} keV"
)
header = f"{meta['nuclide']} | E₀={endpoint:.1f} keV | ΔE={e_step_keV:.1f} keV"
fig.text(
0.01,
0.98,
+3 -5
View File
@@ -219,9 +219,7 @@ def main() -> None:
print(f"{'=' * 60}")
print(f"Run range: {min(run_ids)} - {max(run_ids)}")
print(f"Total counts: {min(total_rates):.0f} - {max(total_rates):.0f}")
print(
f"Low-energy fraction: {min(low_fractions):.3f} " f"- {max(low_fractions):.3f}"
)
print(f"Low-energy fraction: {min(low_fractions):.3f} - {max(low_fractions):.3f}")
print(f"Endpoint estimate: {min(endpoints):.1f} - {max(endpoints):.1f} keV")
# Endpoint drift
@@ -233,7 +231,7 @@ def main() -> None:
slope_e = lin_e[0]
intercept_e = lin_e[1]
r_e = lin_e[2]
print(f"\nEndpoint drift: {slope_e:.3f} keV/run (R²={r_e ** 2:.4f})")
print(f"\nEndpoint drift: {slope_e:.3f} keV/run (R²={r_e**2:.4f})")
print(f" Start (run 1): {intercept_e + slope_e * run_ids[0]:.1f} keV")
print(
f" End (run {run_ids[-1]}): {intercept_e + slope_e * run_ids[-1]:.1f} keV"
@@ -245,7 +243,7 @@ def main() -> None:
)
slope_r = lin_r[0]
r_r = lin_r[2]
print(f"\nTotal count rate drift: {slope_r:.0f} counts/run (R²={r_r ** 2:.4f})")
print(f"\nTotal count rate drift: {slope_r:.0f} counts/run (R²={r_r**2:.4f})")
# Save results
results_file = output_dir / "rate_analysis.csv"