Skip to content

Building in PREPRO-processed activation data (as formatted for FISPACT-II) - #314

Open
eitan-weinstein wants to merge 2 commits into
svalinn:mainfrom
eitan-weinstein:prepro_gendf_parsing
Open

Building in PREPRO-processed activation data (as formatted for FISPACT-II)#314
eitan-weinstein wants to merge 2 commits into
svalinn:mainfrom
eitan-weinstein:prepro_gendf_parsing

Conversation

@eitan-weinstein

@eitan-weinstein eitan-weinstein commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Closes #311.

This PR introduces the capability for tendl_processing.py to parse groupwise nuclear data produced by PREPRO (via its GROUPIE module) and incorporate it into the ALARAJOY workflow. This is motivated by the desire to compare input groupwise cross-section data between ALARA and FISPACT-II prior to any activation simulations. Unlike the ALARAJOY workflow, which allows users to create their own ALARA binary libraries from TENDL data, FISPACT-II's nuclear data is distributed in it's preprocessed, ready-to-go format through FISPACT-II's NEA GitLab nuclear data repository.

There are two main formatting differences between NJOY/GROUPR-produced GENDF files and those produced by PREPRO/GROUPIE:

  1. For cross-section data, GROUPR-formatted GENDF files will only contain MF3. To produce excitation pathway-specific cross-sections, MF9/10 data can be highlighted during input (see Handling isomers produced beyond (n,n*) reactions #229), but will ultimately be written out in a subsection format within MF3 to the final GENDF output. GROUPIE, on the other hand, preserves MF10 in its GENDF formatting, meaning MF3 will not contain any subsections, just the cumulative reaction cross sections for all pathways (if multiple exist). MF10 contains the pathway data itself.
  2. Actual formatting of each TAB1 data table differs between GROUPR and GROUPIE, requiring different parsing approaches.

To accommodate these differences, I restructured the main data structure in which to store parsed GENDF data to now being a dictionary keyed by MF and valued by a sub-dictionary with keys 'MTs' and 'non_zero_xs' (adapting the nomenclature from my original architecture). The definition of this dictionary is as such:

{
      MF : {
          'MTs' : set(),
          'non_zero_xs' : (
              defaultdict(dict) if MF == 10 else defaultdict(list)
          )
      }
      for MF in self.MFs
 }

The special case of MF == 10 for non_zero_xs allows for the GROUPIE MF10 subsections to be stored with each LFS as the key to a similar list-of-dictionary structure that would otherwise appear at that same level for the standard MF3 case.

The biggest actual changes that I've made in the code itself, however, is in the creation of a new class GENDFParser that stores all of these internal methods relating to the different possibilities for GENDF parsing. As I was building this, I was considering that because there were so many free-floating functions within tendl_processing.py that only pertained to use within extract_gendf_data(), that it would be most appropriate to organize these all within a class. I know that we had discussed that in general, that it would probably not be worth the time/effort to restructure all of ALARAJOYWrapper to an object-oriented architecture, however, in this limited case, it seemed appropriate to me to conceptually distinguish all of the parsing-specific functions from the rest of the tendl_processing module. With all of that said, I recognize that it makes the size of this PR rather large, at least as far as number of lines of code changed is concerned. If you think it would be preferable @gonuke to make a separate preceding PR that just builds out the already existing GENDF parsing functionality to a GENDFParser class, without the GROUPIE capabilities, I could do work backwards to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build parsing capabilities for FISPACT-formatted GENDF files

1 participant