I made a calculation code with python for the pincell example, finally I am getting this error. How can I solve it?
import openmc
# Load the statepoint file
sp = openmc.StatePoint("statepoint.100.h5")
# Get the list of nuclides in the state
nuclides = sp.get_nuclides
# Get the total number of fission products for each time step
fp_numbers = []
for nuclide in nuclides:
if "fission" in nuclide.name:
fp_numbers.append(sum(nuclide.number[:]))
# Plot the results
import matplotlib.pyplot as plt
plt.plot(fp_numbers)
plt.xlabel("Time step")
plt.ylabel("Number of fission products")
plt.show()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[4], line 7
4 sp = openmc.StatePoint("statepoint.100.h5")
6 # Get the list of nuclides in the state
----> 7 nuclides = sp.get_nuclides
9 # Get the total number of fission products for each time step
10 fp_numbers = []
AttributeError: 'StatePoint' object has no attribute 'get_nuclides'