Dear all,
I would like to inquire if there are any convenient tools available to modify HDF5 file information. For instance, I would like to modify the cross-section of some reaction for a specific nuclide.
Thank you!
Best regards,
Tianxiang
Dear all,
I would like to inquire if there are any convenient tools available to modify HDF5 file information. For instance, I would like to modify the cross-section of some reaction for a specific nuclide.
Thank you!
Best regards,
Tianxiang
You can change the values by hdfview, and need to run it with corresponding authority.
While it is possible to use a program like hdfview to modify the .h5 files, I would personally use the openmc.data
API to make a change to a data file. You can see an example of how to use the data API here. The basic pattern would be:
# Load an existing .h5 file
nuc = openmc.data.IncidentNeutron.from_hdf5(filename)
# Make some change
....
# Export to a new .h5 file
nuc.export_to_hdf5("modified.h5")
Thank you so much,I have used similar tools
You’ve been a great help