fix(scripts): list min/max calls, typed mains, drop unused header reads

This commit is contained in:
2026-09-30 03:11:05 +03:00
parent dc350aacfc
commit f5b79000a4
4 changed files with 55 additions and 41 deletions
+10 -9
View File
@@ -94,8 +94,6 @@
" endpoint_MeV=0.294,\n",
" transition_type=\"F2\",\n",
" e_step_MeV=0.001,\n",
" use_phase_space=True,\n",
" use_fermi=True,\n",
" use_screening=True,\n",
" use_finite_size=True,\n",
" use_charge_dist=True,\n",
@@ -410,13 +408,16 @@
}
],
"source": [
"multi_analyzer = BetaSpectrumAnalyzer(multi_spectrum, multi_config)\n",
"\n",
"fig, ax = plt.subplots(figsize=(12, 6))\n",
"ax.plot(T_keV, total, \"k-\", linewidth=2.5, label=\"Total spectrum\")\n",
"\n",
"branch_spectra = multi_spectrum.get_branch_normalized_spectra(W)\n",
"for i, bs in enumerate(branch_spectra):\n",
" ax.plot(T_keV, bs, alpha=0.6, linewidth=1.5,\n",
" label=\"Branch {} (E0={:.0f} keV)\".format(i+1, branches[i].endpoint_MeV*1000))\n",
"# Physical branch spectra: core (phase_space x fermi) x all enabled corrections\n",
"for i, b in enumerate(branches):\n",
" physical = multi_analyzer.physical_branch_spectrum(i)\n",
" ax.plot(T_keV, physical, alpha=0.6, linewidth=1.5,\n",
" label=\"Branch {} (E0={:.0f} keV)\".format(i+1, b.endpoint_MeV*1000))\n",
"\n",
"for i, b in enumerate(branches):\n",
" br_end_keV = W_to_T(T_to_W(b.endpoint_MeV))\n",
@@ -430,7 +431,7 @@
"ax.set_xlim(0, W0_max_keV)\n",
"ax.grid(True, alpha=0.3)\n",
"plt.tight_layout()\n",
"plt.show()"
"plt.show()\n"
]
},
{
@@ -541,8 +542,8 @@
}
],
"source": [
"analyzer = BetaSpectrumAnalyzer(multi_spectrum, multi_config)\n",
"analyzer.plot_analysis(show_components=True)"
"analyzer = multi_analyzer\n",
"analyzer.plot_analysis(show_components=True)\n"
]
},
{