8 from class_files.nucleus_class
import nucleus
11 path =
"mumpower_beoh350_bdf_frdm2012_bstr12-gtff_frldm2015.dat"
15 columns = [
"name",
"Z",
"N",
"A",
"P0",
"P1",
"P2",
"P3",
"P4",
"P5",
"P6",
"P7",
"P8",
"P9",
"P10",
16 "P0f",
"P1f",
"P2f",
"P3f",
"P4f",
"P5f",
"P6f",
"P7f",
"P8f",
"P9f",
"P10f"]
22 with open(path,
"r")
as f:
25 if (l[0] ==
"#")
or (l.strip()==
""):
28 data = np.array(l.split()).astype(float)
33 entry = [nucleus_name]+list(data[0:14])
36 entry = entry+list(data)
38 total_data.append(entry)
42 df = pd.DataFrame(total_data, columns=columns)
45 df[
"Total_pf"] = df[
"P0f"]+df[
"P1f"]+df[
"P2f"]+df[
"P3f"]+df[
"P4f"]+df[
"P5f"]+df[
"P6f"]+df[
"P7f"]+df[
"P8f"]+df[
"P9f"]+df[
"P10f"]
47 df = df[df[
"Total_pf"]>0]
54 for it, row
in df.iterrows():
55 fcont = fcont + row[
"name"].rjust(5) + 4*
" "+4*
" "+
"mp22\n"
57 fcont = fcont + f
"{row[f'P{i}f']:.3f}"+4*
" "
61 with open(
"fission_rates_bdf_mp22.dat",
"w")
as f:
65 print(f
"File fission_rates_bdf_mp22.dat created with {rate_counter} entries.")