Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Fiorito committed Aug 21, 2024
1 parent 6f9240a commit 4bba855
Show file tree
Hide file tree
Showing 3 changed files with 355 additions and 251 deletions.
242 changes: 10 additions & 232 deletions notebooks/notebook_random_files.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "5d3b107b",
"metadata": {},
"outputs": [],
Expand All @@ -29,7 +29,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "b3edf647",
"metadata": {},
"outputs": [],
Expand All @@ -41,7 +41,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "fe3e9a70",
"metadata": {},
"outputs": [],
Expand All @@ -52,7 +52,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "f7bbc4cb",
"metadata": {},
"outputs": [],
Expand All @@ -63,130 +63,10 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "359426ec",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO: processing file: '942390.jeff_33'\n",
"INFO: Zero or no temperature was requested, NJOY processing will stop after RECONR.\n",
" If you want to process 0K cross sections use `temperature=0.1`.\n",
" \n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"moder\n",
"20 -21 /\n",
"reconr\n",
"-21 -22 /\n",
"'sandy runs njoy'/\n",
"9437 0 0 /\n",
"1.0 0. /\n",
"0/\n",
"moder\n",
"-22 30 /\n",
"errorr\n",
"-21 -22 0 33 0 /\n",
"9437 2 2 0 1 /\n",
"0 0.0 /\n",
"0 33 1/\n",
"stop\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO: writing to file 'PERT_94239_MF33.xlsx'...\n",
"WARNING: Large condition number of covariance matrix: 1.34e+08\n",
"INFO: Zero or no temperature was requested, NJOY processing will stop after RECONR.\n",
" If you want to process 0K cross sections use `temperature=0.1`.\n",
" \n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"moder\n",
"20 -21 /\n",
"reconr\n",
"-21 -22 /\n",
"'sandy runs njoy'/\n",
"9437 0 0 /\n",
"1.0 0. /\n",
"0/\n",
"moder\n",
"-22 30 /\n",
"stop\n",
"Processing xs sample 0...\n",
"moder\n",
"20 -21 /\n",
"moder\n",
"99 -22 /\n",
"broadr\n",
"-21 -22 -23 /\n",
"9437 1 0 0 0. /\n",
"1.0 /\n",
"300.0 /\n",
"0 /\n",
"moder\n",
"-23 30 /\n",
"acer\n",
"-21 -23 0 50 70 /\n",
"1 0 1 .03 0 /\n",
"'sandy runs acer'/\n",
"9437 300.0 /\n",
"1 1 /\n",
"/\n",
"stop\n",
"writing to file '94239_0.03c'\n",
"writing to file '94239_0.03c.xsd'\n",
"Processing xs sample 1...\n",
"moder\n",
"20 -21 /\n",
"moder\n",
"99 -22 /\n",
"broadr\n",
"-21 -22 -23 /\n",
"9437 1 0 0 0. /\n",
"1.0 /\n",
"300.0 /\n",
"0 /\n",
"moder\n",
"-23 30 /\n",
"acer\n",
"-21 -23 0 50 70 /\n",
"1 0 1 .03 0 /\n",
"'sandy runs acer'/\n",
"9437 300.0 /\n",
"1 1 /\n",
"/\n",
"stop\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO: Total running time: 28.69 sec\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"writing to file '94239_1.03c'\n",
"writing to file '94239_1.03c.xsd'\n"
]
}
],
"outputs": [],
"source": [
"# command line\n",
"cli = f\"{filename} --processes {processes} --samples {nsmp} --mf 33 --temperatures 300 --acer --debug\"\n",
Expand Down Expand Up @@ -236,50 +116,10 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "c92b642b",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO: Zero or no temperature was requested, NJOY processing will stop after RECONR.\n",
" If you want to process 0K cross sections use `temperature=0.1`.\n",
" \n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"moder\n",
"20 -21 /\n",
"reconr\n",
"-21 -22 /\n",
"'sandy runs njoy'/\n",
"9437 0 0 /\n",
"1.0 0. /\n",
"0/\n",
"moder\n",
"-22 30 /\n",
"errorr\n",
"-21 -22 0 33 0 /\n",
"9437 2 2 0 1 /\n",
"0 0.0 /\n",
"0 33 1/\n",
"stop\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO: writing to file 'PERT_94239_MF33.xlsx'...\n",
"WARNING: Large condition number of covariance matrix: 1.34e+08\n"
]
}
],
"outputs": [],
"source": [
"# this generates samples for cross sections and nubar\n",
"smps = endf6.get_perturbations(\n",
Expand All @@ -297,72 +137,10 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "2bbd5244",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO: Zero or no temperature was requested, NJOY processing will stop after RECONR.\n",
" If you want to process 0K cross sections use `temperature=0.1`.\n",
" \n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Processing xs sample 0...\n",
"moder\n",
"20 -21 /\n",
"moder\n",
"99 -22 /\n",
"broadr\n",
"-21 -22 -23 /\n",
"9437 1 0 0 0. /\n",
"1.0 /\n",
"300.0 /\n",
"0 /\n",
"moder\n",
"-23 30 /\n",
"acer\n",
"-21 -23 0 50 70 /\n",
"1 0 1 .03 0 /\n",
"'sandy runs acer'/\n",
"9437 300.0 /\n",
"1 1 /\n",
"/\n",
"stop\n",
"writing to file '94239_0.03c'\n",
"writing to file '94239_0.03c.xsd'\n",
"Processing xs sample 1...\n",
"moder\n",
"20 -21 /\n",
"moder\n",
"99 -22 /\n",
"broadr\n",
"-21 -22 -23 /\n",
"9437 1 0 0 0. /\n",
"1.0 /\n",
"300.0 /\n",
"0 /\n",
"moder\n",
"-23 30 /\n",
"acer\n",
"-21 -23 0 50 70 /\n",
"1 0 1 .03 0 /\n",
"'sandy runs acer'/\n",
"9437 300.0 /\n",
"1 1 /\n",
"/\n",
"stop\n",
"writing to file '94239_1.03c'\n",
"writing to file '94239_1.03c.xsd'\n"
]
}
],
"outputs": [],
"source": [
"# This part applies the perturbations (samples) to the best-estimates and writes perturbed output files samples for cross sections and nubar\n",
"outs = endf6.apply_perturbations(\n",
Expand Down
22 changes: 3 additions & 19 deletions notebooks/notebook_random_files_2steps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "bdb63027",
"metadata": {},
"outputs": [],
Expand All @@ -47,7 +47,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "8243ff58",
"metadata": {},
"outputs": [],
Expand All @@ -69,23 +69,7 @@
"execution_count": null,
"id": "95b729dc",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"INFO: processing file: '942410.jeff33'\n",
"INFO: Zero or no temperature was requested, NJOY processing will stop after RECONR.\n",
" If you want to process 0K cross sections use `temperature=0.1`.\n",
" \n",
"INFO: writing to file 'PERT_94241_MF31.xlsx'...\n",
"INFO: writing to file 'PERT_94241_MF33.xlsx'...\n",
"INFO: Zero or no temperature was requested, NJOY processing will stop after RECONR.\n",
" If you want to process 0K cross sections use `temperature=0.1`.\n",
" \n"
]
}
],
"outputs": [],
"source": [
"cl = \"942410.jeff33 --samples 2 --seed33 1 --seed31 1 --mt33 2\"\n",
"sandy.sampling.run(cl.split())"
Expand Down
Loading

0 comments on commit 4bba855

Please sign in to comment.