Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trajectory_delay does not work with argument of type List. #208

Closed
felixlandmeyer opened this issue Nov 21, 2024 · 2 comments
Closed

trajectory_delay does not work with argument of type List. #208

felixlandmeyer opened this issue Nov 21, 2024 · 2 comments
Assignees

Comments

@felixlandmeyer
Copy link
Contributor

Describe the bug
In:

# Gradient delay handling
if isinstance(trajectory_delay, (int, float)):
gradient_delays = [trajectory_delay] * ng
else:
assert len(trajectory_delay) == ng # Need to have same number of gradient channels
gradient_delays = [trajectory_delay] * ng

I suppose the last line should be
gradient_delays = trajectory_delay
as input trajectory_delay is already a list.

To Reproduce
seq.get_gradients(trajectory_delay = [1e-6, 1.5e-6, 0])
creates nested list of three repetitons of the trajectory delay and raise ValueError in

if np.abs(gradient_delays[j]) > eps:
.

Screenshots
imageDesktop (please complete the following information):

  • pypulseq version: 1.42
@felixlandmeyer
Copy link
Contributor Author

Sorry, it seems that the assignment was automatic.

@felixlandmeyer
Copy link
Contributor Author

Fixed in 2f14543

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

No branches or pull requests

2 participants