Normalize flip_angles in DCEAcquisitionParams.__post_init__ - #167
Conversation
|
Thanks for the earlier feedback, @ltorres6 and @MohamedNasser8 — I've reopened this with the updated approach. What changed: Moved the fix from vfa.py into DCEAcquisitionParams.post_init (osipy/common/types.py), so flip_angles is normalized into a validated list[float] once, at construction — accepting lists, tuples, and NumPy arrays, and raising a clear ValueError for None, non-numeric, non-1D, or non-finite input. |
MohamedNasser8
left a comment
There was a problem hiding this comment.
Thanks @ParikshitGupta2605! Left a couple of comments to fix
27bc348 to
5d85896
Compare
|
@MohamedNasser8 - addressed both: Pushed both fixes, threads resolved. Tests are passing locally. Let me know if you need anything else! |
|
Hi @MohamedNasser8, I'd like to get more involved with OSIPI and contribute to the project. Would it be possible to send me an invite to the OSIPI Slack workspace so I can introduce myself in the project channel, as mentioned in the contributing guidelines? Thank you! |
|
Hey @ParikshitGupta2605 you can join by sending email to |
|
Thanks for letting me know! No worries about the delay. |
Normalization now happens in DCEAcquisitionParams.post_init, the VFA-specific empty check is restored (load-bearing, not dead code since fixed-T1/t1_assumed acquisitions legitimately construct with empty flip_angles), redundant casts in runner.py/vfa.py are cleaned up, and tests are broadened to cover construction-time validation directly (None, scalar, non-numeric, NaN/inf, 2D array, empty-with-t1_assumed). Ready for another look.