Building in PREPRO-processed activation data (as formatted for FISPACT-II) - #314
Open
eitan-weinstein wants to merge 2 commits into
Open
Building in PREPRO-processed activation data (as formatted for FISPACT-II)#314eitan-weinstein wants to merge 2 commits into
eitan-weinstein wants to merge 2 commits into
Conversation
eitan-weinstein
marked this pull request as ready for review
August 3, 2026 15:55
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #311.
This PR introduces the capability for
tendl_processing.pyto parse groupwise nuclear data produced by PREPRO (via itsGROUPIEmodule) 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:
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.GROUPRandGROUPIE, 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
MFand 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:The special case of
MF == 10fornon_zero_xsallows 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
GENDFParserthat 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 withintendl_processing.pythat only pertained to use withinextract_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 thetendl_processingmodule. 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 aGENDFParserclass, without theGROUPIEcapabilities, I could do work backwards to do so.