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
Describe the bug
Creating a gradient with make_trapezoid(), providing system, area, duration and rise_time creates a gradient with a slew rate bigger than system.max_slew without warning.
To Reproduce
import pypulseq as pp
system = pp.Opts()
# Set max slew to 50 T/m/s
system.max_slew = 50 * system.gamma # Hz/m/s
grad_spoil = pp.make_trapezoid(channel='z', system=system, area = 800, duration = 1e-3, rise_time = 200e-6)
grad_slew_rate = grad_spoil.amplitude/grad_spoil.rise_time/system.gamma
print(f"Slew rate of gradient: {round(grad_slew_rate)} T/m/s")
# Slew rate of gradient: 117 T/m/s
Expected behavior
If I set max_slew as a system spec I dont want it to be exceeded.
Desktop (please complete the following information):
OS: [e.g. Win11]
pypulseq version: [e.g. 1.4.2]
The text was updated successfully, but these errors were encountered:
Describe the bug
Creating a gradient with make_trapezoid(), providing system, area, duration and rise_time creates a gradient with a slew rate bigger than system.max_slew without warning.
To Reproduce
Expected behavior
If I set max_slew as a system spec I dont want it to be exceeded.
Desktop (please complete the following information):
pypulseq
version: [e.g. 1.4.2]The text was updated successfully, but these errors were encountered: