style: apply black formatting to pending files
This commit is contained in:
@@ -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."""
|
"""Write the figure header/footer lines from the CSV metadata."""
|
||||||
e_step_keV = (meta["e_step_MeV"] or 0.0) * 1000.0
|
e_step_keV = (meta["e_step_MeV"] or 0.0) * 1000.0
|
||||||
endpoint = meta["endpoint_keV"]
|
endpoint = meta["endpoint_keV"]
|
||||||
header = (
|
header = f"{meta['nuclide']} | E₀={endpoint:.1f} keV | ΔE={e_step_keV:.1f} keV"
|
||||||
f"{meta['nuclide']} "
|
|
||||||
f"| E₀={endpoint:.1f} keV "
|
|
||||||
f"| ΔE={e_step_keV:.1f} keV"
|
|
||||||
)
|
|
||||||
fig.text(
|
fig.text(
|
||||||
0.01,
|
0.01,
|
||||||
0.98,
|
0.98,
|
||||||
|
|||||||
@@ -219,9 +219,7 @@ def main() -> None:
|
|||||||
print(f"{'=' * 60}")
|
print(f"{'=' * 60}")
|
||||||
print(f"Run range: {min(run_ids)} - {max(run_ids)}")
|
print(f"Run range: {min(run_ids)} - {max(run_ids)}")
|
||||||
print(f"Total counts: {min(total_rates):.0f} - {max(total_rates):.0f}")
|
print(f"Total counts: {min(total_rates):.0f} - {max(total_rates):.0f}")
|
||||||
print(
|
print(f"Low-energy fraction: {min(low_fractions):.3f} - {max(low_fractions):.3f}")
|
||||||
f"Low-energy fraction: {min(low_fractions):.3f} " f"- {max(low_fractions):.3f}"
|
|
||||||
)
|
|
||||||
print(f"Endpoint estimate: {min(endpoints):.1f} - {max(endpoints):.1f} keV")
|
print(f"Endpoint estimate: {min(endpoints):.1f} - {max(endpoints):.1f} keV")
|
||||||
|
|
||||||
# Endpoint drift
|
# Endpoint drift
|
||||||
@@ -233,7 +231,7 @@ def main() -> None:
|
|||||||
slope_e = lin_e[0]
|
slope_e = lin_e[0]
|
||||||
intercept_e = lin_e[1]
|
intercept_e = lin_e[1]
|
||||||
r_e = lin_e[2]
|
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" Start (run 1): {intercept_e + slope_e * run_ids[0]:.1f} keV")
|
||||||
print(
|
print(
|
||||||
f" End (run {run_ids[-1]}): {intercept_e + slope_e * run_ids[-1]:.1f} keV"
|
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]
|
slope_r = lin_r[0]
|
||||||
r_r = lin_r[2]
|
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
|
# Save results
|
||||||
results_file = output_dir / "rate_analysis.csv"
|
results_file = output_dir / "rate_analysis.csv"
|
||||||
|
|||||||
Reference in New Issue
Block a user