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
After reading the first block of a spectrum file, rfac.read_sp returns without reading the rest. I think there is a logic error in the current recursive implementation of the internal function read_blocks:
What happens is that the loop reads each transition in the first block without reaching the empty line that follows the list of transitions. So the if line.strip() == "" test is never true, and no recursion happens. Then the loop finishes and returns a single block. In addition, if it did actually get to that section, there would be an error because i is not defined. I've locally edited read_sp in a way that seems to work. I can either open a PR or just post a diff, whatever is easier.
The text was updated successfully, but these errors were encountered:
After reading the first block of a spectrum file,
rfac.read_sp
returns without reading the rest. I think there is a logic error in the current recursive implementation of the internal functionread_blocks
:What happens is that the loop reads each transition in the first block without reaching the empty line that follows the list of transitions. So the
if line.strip() == ""
test is never true, and no recursion happens. Then the loop finishes and returns a single block. In addition, if it did actually get to that section, there would be an error becausei
is not defined. I've locally editedread_sp
in a way that seems to work. I can either open a PR or just post a diff, whatever is easier.The text was updated successfully, but these errors were encountered: