-
Notifications
You must be signed in to change notification settings - Fork 75
Fix inconsistency in "return_delay" argument of RF pulses #206
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
Conversation
|
I have a few queries regarding this delay event, most of which isn't so much related to this PR, but worth having a little discussion about:
If there is a purpose for the delay event, I see no problems with the PR. Otherwise, I suggest removing it altogether. @schuenke @btasdelen What are your thoughts? |
delay=mr.makeDelay(mr.calcDuration(rf)+rf.ringdownTime);
I am for removing it. |
|
I agree, the ringdown time is already covered in calc_duration. A very specific use case would be to play an RF pulse, which is not aligned to the gradient raster time. However, this is not covered by the current implementation and could easily be done outside. If you wish, I could remove all return_delay arguments and outputs and update this PR. |
|
Yes, it would be good if you could remove the delay outputs. Do note that I merged another PR recently, so it's probably easiest to just do a hard reset on your branch. |
1d28c9e to
1c2395a
Compare
|
I removed the delay outputs and also removed one test, that checked the delay object of the adiabatic pulse. |
|
Thanks for the fix, looks good to me. One small thing: Could you remove the return type hints that included the delay? |
…dded in calc_duration
|
I removed them along with some unnecessary imports |
|
I think this PR is ready, any other comments @FrankZijlstra? |
|
No comments, just forgot 😂. Will merge it now. |
This PR fixes an inconsistent behaviour of the "return_delay" argument for RF pulses. Currently, delays are returned only, if also "return_gz" is set to True, except for adiabatic pulses. However, sometimes it is useful to return a delay, even when no slice gradient is desired. The behaviour is now the same as in make_adiabatic_pulse.py
This PR also replaces the deprecated zero-filling at the end of an RF pulse for sigpy pulses by returning a delay instead.