You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The binary file is supposed to contain in following order: x, y, z coordinates for delayed neutron precursors, 1, 0, 0,1, wgt (statistical weight ) and g (precursor group) for all stored precursors.
Code for reproducing the issue
import serpentTools
res = serpentTools.read('/home/asnalb/Serpent2N/26.03Transient/Transient500s/inp')
Actual outcome including console output and error traceback if applicable
Traceback (most recent call last):
File "", line 1, in
File "/home/asnalb/.local/lib/python2.7/site-packages/serpentTools/parsers/init.py", line 141, in read
loader = inferReader(filePath)
File "/home/asnalb/.local/lib/python2.7/site-packages/serpentTools/parsers/init.py", line 87, in inferReader
'a specific reader:\n{}'.format(filePath, SUPPORTED_READER_MSG)
serpentTools.messages.SerpentToolsException: Failed to infer filetype and thus accurate reader fromfile path /home/asnalb/Serpent2N/26.03Transient/Transient500s/inp. Pass one of the below options to ensure a specific reader:
branch: BranchingReader
bumat: BumatReader
dep: DepletionReader
depmtx: DepmtxReader
det: DetectorReader
fission: FissionMatrixReader
history: HistoryReader
microxs: MicroXSReader
results: ResultsReader
sensitivity: SensitivityReader
xsplot: XSPlotReader
Expected outcome
I'd like to be able to somehow convert this file to hiuman readable format, modify it and change it back to original binary. Any help would be very much appreciated!
Versions
Version from serpentTools.0.6.2
Python version - 2.7
IPython or Jupyter version if applicable
The text was updated successfully, but these errors were encountered:
So we may be able to help with the first task, the reading. We don't currently have a supported reader for that, hence the error message you're seeing.
One could be implemented and added to the project. There is a format given on the wiki that we could use, basically 9 doubles for each precursor neutron. Interestingly enough, we could use a similar reading process for the live neutron file as well
I'll leave this open for people to claim, but it could be a good addition to the project.
Some thoughts
Both a reader and a writer would have to be implemented. That way we don't store a binary file in the repository.
The data could largely be stored in a single array, maybe stripping out unused value 4-6.
Could make for some cool distribution/visualization plots
Thanks for the prompt reply! I\m trying to squeeze any info on encoding using chardet package from python.
The reason why I am looking into this file to begin with, is that I'm researching molten salt reactors and the delayed neutron precursors for me are actually moving with the flow. I though a quick and maybe not very clean but still usable way could be to take this source.precpoints file and manually shift the delayed neutron precursor coordinates according to flow velocity after each time step.
Interesting concept. If you make some scripts to work with the output before we make a full blown reader/writer, and don't mind sharing them, that would be super helpful!
The binary file is supposed to contain in following order: x, y, z coordinates for delayed neutron precursors, 1, 0, 0,1, wgt (statistical weight ) and g (precursor group) for all stored precursors.
Code for reproducing the issue
Actual outcome including console output and error traceback if applicable
Traceback (most recent call last):
File "", line 1, in
File "/home/asnalb/.local/lib/python2.7/site-packages/serpentTools/parsers/init.py", line 141, in read
loader = inferReader(filePath)
File "/home/asnalb/.local/lib/python2.7/site-packages/serpentTools/parsers/init.py", line 87, in inferReader
'a specific reader:\n{}'.format(filePath, SUPPORTED_READER_MSG)
serpentTools.messages.SerpentToolsException: Failed to infer filetype and thus accurate reader fromfile path /home/asnalb/Serpent2N/26.03Transient/Transient500s/inp. Pass one of the below options to ensure a specific reader:
branch: BranchingReader
bumat: BumatReader
dep: DepletionReader
depmtx: DepmtxReader
det: DetectorReader
fission: FissionMatrixReader
history: HistoryReader
microxs: MicroXSReader
results: ResultsReader
sensitivity: SensitivityReader
xsplot: XSPlotReader
Expected outcome
I'd like to be able to somehow convert this file to hiuman readable format, modify it and change it back to original binary. Any help would be very much appreciated!
Versions
Version from
serpentTools.0.6.2
Python version -
2.7
IPython or Jupyter version if applicable
The text was updated successfully, but these errors were encountered: