-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add examples/standard_studies/std201/ directory
- Loading branch information
Showing
18 changed files
with
229,939 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Table 11. Thermal Neutron Constants (cross sections and average total neutron yield) for fissile actinides for neutrons with energy 0.0253 eV. | ||
# The 0.4 % unrecognized systematic uncertainty is included in the uncertainties of the total neutron yields (nu-bar). | ||
# | ||
Quantity U3 U3-UNC U5 U5-UNC PU9 PU9-UNC PU1 PU1-UNC | ||
SF 533.0 2.2 587.3 1.4 752.4 2.2 1023.6 10.8 | ||
SG 44.9 0.9 99.5 1.3 269.8 2.5 362.3 6.1 | ||
SS 12.2 0.7 14.09 0.22 7.8 1.0 11.9 2.6 | ||
# Nu-bar, Total average | ||
# neutron yield | ||
# per 1 fission 2.487+-0.011 2.425+-0.011 2.878+-0.013 2.940+-0.013 | ||
# Total average neutron yield per 1 fission in Cf-252(sf) 3.764+-0.016 |
105,126 changes: 105,126 additions & 0 deletions
105,126
examples/standard_studies/std2017/explore_mcmc_problem.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import pandas as pd | ||
import numpy as np | ||
|
||
|
||
def translate_to_absreacs(reacs): | ||
absreacs = [] | ||
for reac in reacs: | ||
if reac.startswith('MT:2-'): | ||
absreac = 'MT:1-' + reac[5:] | ||
elif reac.startswith('MT:4-'): | ||
absreac = 'MT:3-' + reac[5:] | ||
elif reac.startswith('MT:8-'): | ||
absreac = 'MT:5-' + reac[5:] | ||
elif reac.startswith('MT:9-'): | ||
absreac = 'MT:7-' + reac[5:] | ||
else: | ||
absreac = reac | ||
absreacs.append(absreac) | ||
return np.array(absreacs) | ||
|
||
|
||
def renormalize_data(priortable, exptable, priorvals, expvals): | ||
renorm_vals = np.array(expvals) | ||
expids = exptable.loc[exptable.REAC.str.match('MT:[2489]-'), 'NODE'].unique() | ||
for expid in expids: | ||
norm_node = 'norm_' + expid[4:] | ||
norm_index = priortable.index[priortable.NODE == norm_node] | ||
if len(norm_index) != 1: | ||
raise IndexError( | ||
f'exactly one normalization error must be present for {expid}' | ||
) | ||
norm_index = norm_index[0] | ||
norm_fact = priorvals[norm_index] | ||
exp_idcs = exptable.index[exptable.NODE == expid] | ||
renorm_vals[exp_idcs] /= norm_fact | ||
return renorm_vals | ||
|
||
|
||
import sys | ||
sys.path.append('../../..') | ||
from gmapy.data_management.object_utils import load_objects | ||
|
||
priortable, exptable, is_adj = load_objects('../../tensorflow/example-005/output/01_model_preparation_output.pkl', 'priortable', 'exptable', 'is_adj') | ||
optres, = load_objects('../../tensorflow/example-005/output/02_parameter_optimization_output.pkl', 'optres') | ||
red_priortable = priortable[is_adj].reset_index(drop=True) | ||
|
||
renorm_data = renormalize_data(red_priortable, exptable, optres.position.numpy(), exptable.DATA) | ||
absreacs = translate_to_absreacs(exptable.REAC) | ||
|
||
exptable['ABSREAC'] = absreacs | ||
exptable['RENORM_DATA'] = renorm_data | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.