fix calculation of bandwidth of adiabatic hypsec pulse #83
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When trying to use a slice selective adiabatic hypsec pulse, I got several errors related to the calculation of the bandwidth of the hypsec pulse. I fixed the obvious ones like a wrong import of calc_rf_center() in calc_rf_bandwidth() and a wrong attribute name (rf.sig instead of rf.signal) and provide a new solution for the __find_flank() function:
Using calc_rf_bandwidth() with a cut_off value of 0.5 instead of 0.1 (which makes sense imo because the signal gets normalized to 1 and we are interested in the width at half maximum ?!) yields a bw of 1280 Hz, which is close to the literaure value of ~ 1250 Hz for the hypsec pulse with default settings (beta = 800, mu =4.9)
HOWEVER, simply using the analytic expression for the bw of a hypsec pulse makes far more sense imo. It is given by
bw = mu * beta / pi
As a reference, here the passage from Bernstein - Handbook of MRI pulse sequences:
Using the analytic expression is the way I implemented it now in make_adiabatic_pulse.py