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_rfcenter() in _calc_rfbandwidth() and a wrong attribute name (rf.sig instead of rf.signal) and provide a new solution for the ___findflank() function:
def __find_flank(x, f, c):
m = np.max(np.abs(f))
f = np.abs(f) / m
i = np.argwhere(f > c)[0]
return x[i]
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_adiabaticpulse.py
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_rfcenter() in _calc_rfbandwidth() and a wrong attribute name (rf.sig instead of rf.signal) and provide a new solution for the ___findflank() 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_adiabaticpulse.py