luca-fiorito-11 / sandy

Sampling nuclear data and uncertainty
MIT License
45 stars 29 forks source link

ENDF6 Cross Sections with many data points does not extract all data points from endf file #324

Open sasqueechie opened 4 days ago

sasqueechie commented 4 days ago

Hi, I am trying to extract all the datapoints from cross section files for things like U-235 and I am running into an issue where it seems like some part of the reader/extraction method in your code stops processing information after a certain amount of data points OR its like its missing a part of the file when reading and only getting a chunk of it.

The following is what I am running with:

import sandy import pandas as pd import plotly.graph_objects as go import os from scripts import functions as fn

Read ENDF-6 data for a specific nuclide (e.g., U-235)

nuclide = fn.format_input(input("Input nuclide of interest\n"))

fy = sandy.get_endf6_file("endfb_80", "xs", 922350)

fyr = fy.get_records()

fydict = fy.read_section(mat=9228, mf=3, mt=18)

here you can see that it gets most of the upper energy datapoints in detail but then jumps to 1e-5 all of a sudden.

print(fydict['E'], fydict['XS'])

Create a scatter plot with log-log scale

fig = go.Figure()

fig.add_trace(go.Scatter(x=fydict['E'], y=fydict['XS'], mode="lines", name=f"{nuclide}", text="test"))

fig.show()


sasqueechie commented 4 days ago

ex_plot_for_u235_nf_rxn

sasqueechie commented 4 days ago

Looking at the ENDF file itself, it looks like it may actually be extracting all the data available, it is just not plotting/processing

the resonance/capture regions of the graph as seen here:

image

Retrieved by E4-Web: 2024/06/29,01:27:57 1 0 0 0 9.223500+4 2.330248+2 1 1 0 19228 1451 1 0.000000+0 0.000000+0 0 0 0 69228 1451 2 1.000000+0 3.000000+7 0 0 10 89228 1451 3 0.000000+0 0.000000+0 0 0 656 29228 1451 4 92-U -235 IAEA EVAL-NOV17 IAEA CIELO Collaboration 9228 1451 5 NDS 148, 1 (2018) DIST-FEB18 9228 1451 6 ----ENDF/B-VIII.0 MATERIAL 9228 9228 1451 7 -----INCIDENT NEUTRON DATA 9228 1451 8 ------ENDF-6 FORMAT 9228 1451 9 9228 1451 10 Source data included in the evaluation 9228 1451 11 9228 1451 12 Version u235ib46o28t6DNcnu5ef0STzc 9228 1451 13 Source Roberto\ib46\u235.out 9228 1451 14 Resonance Marco\u235-res-28t+-stan.endf 9228 1451 15 Delayed Resonance\U235_dlyd_e71.end 9228 1451 16 Fission Resonance\U235_fissp1_gbDNnu5jd.end 9228 1451 17 Fission xs Resonance\U235_fisxs_STD-2017-final-11Feb17-vp-at.end 9228 1451 18 Mod.Fis.xs 9228 1451 19 Fiss.E Resonance\fis_energy.endf 9228 1451 20 Fiss.gamma Fission_gamma\u5-mf6mt18-pnu-ng_Ionel20171116.endf 9228 1451 21 Covariance Covariance\u235_cov_zc.endf 9228 1451 22 Inel.Cov. Covariance\u235_cov-inel.endf 9228 1451 23 9228 1451 24 9228 1451 25 General information for Version u235ib46o28t6DNcnu5ef0STzc 9228 1451 26 (with corrections for missing data above 20 MeV, 19-Apr-2016) 9228 1451 27 9228 1451 28

sasqueechie commented 4 days ago

So the question now would be, without resorting to outputting a gendf/pendf file (which I've seen works to remedy this issue of now showing those regions), how can I or what functions need to be added to capture that part of the endf file?

sasqueechie commented 4 days ago

After some digging, it might seem that this is a doomed effort short of recreating NJOY or preprocessing some pendf files if I want to pull them up faster at a later time.