Closed j-tseng closed 1 year ago
Hey @j-tseng, thanks for catching this bug! Your solution makes sense and you can definitely submit a PR. I'll merge it into the next update.
We are not using Slack anymore since GitHub now has a Discussions tab. I'll remove the link to Slack in the next update.
Describe the Issue
Some b-values with scaling are floating point numbers (see discussion here), which subsequently throws an error in
mrinfoutil.py
at line 399 when converting the string b-value to int.https://github.com/m-ama/PyDesigner/blob/faa1b7593ff5f79b6cf311de29163e4a3737ed8b/designer/preprocessing/mrinfoutil.py#L399
Issue Reproduction
Relevant error message:
ValueError: invalid literal for int() with base 10: '1000.02'
Proposed Solution
My gut suggests changing line 399 to
int(round(float(x)))
to handle this. If that's an acceptable solution, I'm happy to submit a pull request for it!P.S. Would love to join the Slack channel, but it bars me as I "don't have an account in this workspace". Are you still open to users joining your Slack? Thanks!