Created
March 16, 2023 19:30
-
-
Save thomasms/53242efbc75ab64b6cd94b2a600961e9 to your computer and use it in GitHub Desktop.
An example to show Activity Vs Time (log-log) plot for both irraditation and cooling periods - for Andrea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import pypact as pp | |
import pypact.analysis as ppa | |
# your FISPACT-II output file | |
filename = os.path.join( | |
os.path.dirname(os.path.abspath(__file__)), "..", "..", "reference", "test127.out" | |
) | |
tz = ppa.TimeZone.BOTH | |
# this the property you would want to show - activity, atoms, heat, etc... | |
property = "activity" | |
isotopes = [ | |
# you give it [(element_name, isotope number, state (optional))] | |
ppa.NuclideDataEntry(["Ca", 41]), | |
# you can plot multiple if you want | |
# ppa.NuclideDataEntry(["K", 40]) | |
] | |
plt = ppa.LinePlotAdapter() | |
with pp.Reader(filename) as output: | |
ppa.plotproperty( | |
output=output, | |
property=property, | |
isotopes=isotopes, | |
plotter=plt, | |
fractional=False, | |
timeperiod=tz, | |
) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want to just get the values - a list of tuples with (time, activity) - then you can just do it like this: