Skip to content

Fix XS parsing: only deserialize non-empty 60-char blocks - #69

Open
KungliKung wants to merge 16 commits into
fispact:masterfrom
KungliKung:recurrent_changes
Open

KungliKung wants to merge 16 commits into
fispact:masterfrom
KungliKung:recurrent_changes

Conversation

@KungliKung

Copy link
Copy Markdown
Contributor

In the .out file of PRINTLIB 4 the last line[61:] can be "" when total number of cross-sections cannot be divded by 2.
image

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.

@KungliKung

KungliKung commented Oct 1, 2026 •

Copy link
Copy Markdown
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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants