Skip to content

Fix VFA validation for NumPy flip angles#162

Open
ParikshitGupta2605 wants to merge 2 commits into
OSIPI:mainfrom
ParikshitGupta2605:fix-vfa-numpy-flip-angles
Open

Fix VFA validation for NumPy flip angles#162
ParikshitGupta2605 wants to merge 2 commits into
OSIPI:mainfrom
ParikshitGupta2605:fix-vfa-numpy-flip-angles

Conversation

@ParikshitGupta2605

Copy link
Copy Markdown

Summary

This PR fixes the validation of flip_angles in compute_t1_vfa() when provided as a NumPy array.

Previously, the code used:

if not params.flip_angles:

which raises a ValueError for NumPy arrays because their truth value is ambiguous.

Changes

  • Replace the boolean truth-value check with explicit validation for None and empty arrays.
  • Convert flip_angles using np.asarray() before validation.
  • Add a regression test to ensure NumPy arrays are accepted.

Fixes #159

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.

vfa.py bug

1 participant