Fix XS parsing: only deserialize non-empty 60-char blocks - #69
Open
KungliKung wants to merge 16 commits into
Open
KungliKung wants to merge 16 commits into
KungliKung wants to merge 16 commits into
Conversation
CI: Bump python versions on CI to more modern versions
Contributor
Author
|
After updating my branch recurrent_changes with what has been going on in the main repository I have just realized that now this pull also contains changes that probably should not go to the main repository. Only [Fix XS parsing: only deserialize non-empty 60-char blocks] is proposed to go the main repository at this stage.(1b6f449) |
This branch has not been deployed
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.
In the .out file of PRINTLIB 4 the last line[61:] can be "" when total number of cross-sections cannot be divded by 2.

This results in an ValueError: could not convert string to float: '' for self.xs in fispact_deserialize when an .out file is read in with PrintLib4Reader.
The modification makes sure that only non-empty 60 char blocks are deserialized into nuclide, reaction, daugther, xs and delta_xs.
I dont think line[:60] or line[61:] can be empty in another case then the one described above. So maybe there is more suiting solution.