Repository navigation
Record data provenance in cross_sections.xml and never mix libraries - #64
Merged
Merged
Conversation
generate_jeff -r 3.3 processes TENDL-2019 evaluations in place of the defective JEFF 3.3 C13 and O17 files. This was only noted in the docstring and a print line. The README now has a footnote, each substitution raises a warning, and the final summary lists the substituted files as not JEFF data.
Every generate and convert script now writes an XML comment at the top of cross_sections.xml with the data source, entry counts by type, the openmc_data version and script, the date, and any evaluations taken from another library (JEFF 3.3 C13/O17). OpenMC's C++ and Python readers ignore comments. convert_mcnp70 and convert_mcnp71 no longer accept --photon, which added eprdata photoatomic data to an ENDF/B library. combine_libraries now records how many entries of each type came from each input. The README explains that it fills any gap from later libraries, and shows how to combine JEFF-4.0 or TENDL-2025 with a photon-only ENDF/B-VIII.1 library.
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.
Builds on #63. Please merge #63 first; this PR's diff then shrinks to its own commit.
Provenance comment in cross_sections.xml
Every generate and convert script now starts
cross_sections.xmlwith an XML comment like this:For
generate_jeff -r 3.3, the comment also lists the C13/O17 TENDL-2019 replacements asNot JEFF data. The newopenmc_data.add_provenancehelper writes it.This doesn't break OpenMC. Both readers look only at
<directory>and<library>, and both skip comments: the C++ reader (root.children("library")incross_sections.cpp) andDataLibrary.from_xml. I checked this by running the OpenMC executable on an annotated JEFF-4.0cross_sections.xml, including a coupled neutron–photon run.DataLibrary.export_to_xmldrops comments, so the README says so.No photon data from other libraries
convert_mcnp70andconvert_mcnp71no longer accept--photon. That option added eprdata photoatomic data to an ENDF/B library. The README now says that each script produces data from one library only.generate_jeffphoton data was already removed in #62.combine_libraries
cross_sections.xmlrecords how many entries of each type came from each input, plus each input's own data source and notes.--helptext and README explain that a later library fills any gap, not just photon data. Combining JEFF-4.0 with a full ENDF/B-VIII.1 library pulled in 59 ENDF neutron nuclides and the ENDF thermal tables. The recommended route is therefore a photon-only library fromgenerate_endf -r viii.1 -p photon.Testing
tests/test_utils.py: the comment survivesDataLibrary.from_xmlwith entries unchanged, and text that isn't allowed in an XML comment is rejected. The non-network test suite passes (150 passed).generate_endf -r viii.1 -p photon, combined it with a JEFF-4.0 library, and ran an OpenMC coupled neutron–photon simulation on the result. Neutron and thermal data were read from JEFF-4.0 and photon data from ENDF/B-VIII.1.