import sandy
import glob
Get a few ENDF-6 decay data files from JEFF-3.3, just to make the notebook run faster.
To process the full radioactive decay data library just replace this line with
sandy.get_endf6_file("jeff_33", "decay", "all")
tape = sandy.get_endf6_file("jeff_33", "decay", [10010, 10040, 270600, 571380])
Then write the data locally to file.
tape.to_file("decay_data.jeff33")
To produce 3 random files you can run the following from the command line:
!python -m sandy.sampling decay_data.jeff33 --samples 3 --processes 1
<frozen runpy>:128: RuntimeWarning: 'sandy.sampling' found in sys.modules after import of package 'sandy', but prior to execution of 'sandy.sampling'; this may result in unpredictable behaviour INFO: processing file: 'decay_data.jeff33' INFO: writing to file 'PERT_MF8_MT457.xlsx'... INFO: Total running time: 0.30 sec
This is equivalent to using the python interface:
cli = "decay_data.jeff33 --samples 3 --processes 1"
sandy.sampling.run(cli.split())
INFO: processing file: 'decay_data.jeff33' INFO: writing to file 'PERT_MF8_MT457.xlsx'... INFO: Total running time: 0.32 sec
Three perturbed decay data file are created.
glob.glob("decay_data*")
['decay_data_0', 'decay_data_2', 'decay_data_1', 'decay_data.jeff33']
You can see that the decay constants, decay energya nd branching ratios of La-138 are perturbed.
Branching ratios are also normalized to 1, ensuring physical consistency.
print(sandy.Endf6.from_file("decay_data.jeff33").data[(1904, 8, 457)][:(66+15)*6])
5.713800+4 1.367220+2 0 0 0 51904 8457 1 3.26930+18 6.31139+16 0 0 6 01904 8457 2 3.625050+4 9.621470+2 1.221250+6 1.389240+4 0.000000+0 0.000000+01904 8457 3 5.000000+0 1.000000+0 0 0 12 21904 8457 4 2.000000+0 0.000000+0 1.740000+6 3.400000+3 6.520000-1 6.000000-31904 8457 5 1.000000+0 0.000000+0 1.051700+6 4.000000+3 3.480000-1 6.000000-31904 8457 6
print(sandy.Endf6.from_file("decay_data_0").data[(1904, 8, 457)][:(66+15)*6])
57138.0000 136.722000 0 0 0 51904 8457 1 3.27506+18 6.31139+16 0 0 6 01904 8457 2 38183.6677 962.147000 1210807.10 13892.4000 0.00000000 0.000000001904 8457 3 5.00000000 1.00000000 0 0 12 21904 8457 4 2.00000000 0.00000000 1740000.00 3400.00000 6.547640-1 6.000000-31904 8457 5 1.00000000 0.00000000 1051700.00 4000.00000 3.452360-1 6.000000-31904 8457 6
print(sandy.Endf6.from_file("decay_data_1").data[(1904, 8, 457)][:(66+15)*6])
57138.0000 136.722000 0 0 0 51904 8457 1 3.29189+18 6.31139+16 0 0 6 01904 8457 2 36356.5545 962.147000 1216139.00 13892.4000 0.00000000 0.000000001904 8457 3 5.00000000 1.00000000 0 0 12 21904 8457 4 2.00000000 0.00000000 1740000.00 3400.00000 6.441183-1 6.000000-31904 8457 5 1.00000000 0.00000000 1051700.00 4000.00000 3.558817-1 6.000000-31904 8457 6
print(sandy.Endf6.from_file("decay_data_2").data[(1904, 8, 457)][:(66+15)*6])
57138.0000 136.722000 0 0 0 51904 8457 1 3.30311+18 6.31139+16 0 0 6 01904 8457 2 37929.3494 962.147000 1204430.64 13892.4000 0.00000000 0.000000001904 8457 3 5.00000000 1.00000000 0 0 12 21904 8457 4 2.00000000 0.00000000 1740000.00 3400.00000 6.522910-1 6.000000-31904 8457 5 1.00000000 0.00000000 1051700.00 4000.00000 3.477090-1 6.000000-31904 8457 6
The gamma decay energy of H-4 is also perturbed, despite having zero uncertainty.
When decay constants and decay energies are found with zero uncertainty, a default 5% uncertainty is assigned by default.
print(sandy.Endf6.from_file("decay_data.jeff33").data[(5, 8, 457)][:(66+15)*3])
1.00400+03 3.99320+00 0 0 0 0 5 8457 1 1.39000-22 1.00000-23 0 0 6 0 5 8457 2 0.00000+00 0.00000+00 0.00000+00 0.00000+00 2.87890+06 0.00000+00 5 8457 3
print(sandy.Endf6.from_file("decay_data_2").data[(5, 8, 457)][:(66+15)*3])
1004.00000 3.99320000 0 0 0 0 5 8457 1 1.17822-22 1.00000-23 0 0 6 0 5 8457 2 0.00000000 0.00000000 0.00000000 0.00000000 2851686.17 0.00000000 5 8457 3